{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.IssuingAuthorizationRequest where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.IssuingAuthorizationAmountDetails
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data IssuingAuthorizationRequest = IssuingAuthorizationRequest
{
IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestAmount :: GHC.Types.Int,
IssuingAuthorizationRequest
-> Maybe IssuingAuthorizationRequestAmountDetails'
issuingAuthorizationRequestAmountDetails :: (GHC.Maybe.Maybe IssuingAuthorizationRequestAmountDetails'),
IssuingAuthorizationRequest -> Bool
issuingAuthorizationRequestApproved :: GHC.Types.Bool,
IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestCreated :: GHC.Types.Int,
IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestCurrency :: Data.Text.Internal.Text,
IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestMerchantAmount :: GHC.Types.Int,
IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestMerchantCurrency :: Data.Text.Internal.Text,
IssuingAuthorizationRequest -> IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason :: IssuingAuthorizationRequestReason'
}
deriving
( Int -> IssuingAuthorizationRequest -> ShowS
[IssuingAuthorizationRequest] -> ShowS
IssuingAuthorizationRequest -> String
(Int -> IssuingAuthorizationRequest -> ShowS)
-> (IssuingAuthorizationRequest -> String)
-> ([IssuingAuthorizationRequest] -> ShowS)
-> Show IssuingAuthorizationRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationRequest] -> ShowS
$cshowList :: [IssuingAuthorizationRequest] -> ShowS
show :: IssuingAuthorizationRequest -> String
$cshow :: IssuingAuthorizationRequest -> String
showsPrec :: Int -> IssuingAuthorizationRequest -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationRequest -> ShowS
GHC.Show.Show,
IssuingAuthorizationRequest -> IssuingAuthorizationRequest -> Bool
(IssuingAuthorizationRequest
-> IssuingAuthorizationRequest -> Bool)
-> (IssuingAuthorizationRequest
-> IssuingAuthorizationRequest -> Bool)
-> Eq IssuingAuthorizationRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationRequest -> IssuingAuthorizationRequest -> Bool
$c/= :: IssuingAuthorizationRequest -> IssuingAuthorizationRequest -> Bool
== :: IssuingAuthorizationRequest -> IssuingAuthorizationRequest -> Bool
$c== :: IssuingAuthorizationRequest -> IssuingAuthorizationRequest -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationRequest where
toJSON :: IssuingAuthorizationRequest -> Value
toJSON IssuingAuthorizationRequest
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestAmount IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_details" Text -> Maybe IssuingAuthorizationRequestAmountDetails' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest
-> Maybe IssuingAuthorizationRequestAmountDetails'
issuingAuthorizationRequestAmountDetails IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"approved" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Bool
issuingAuthorizationRequestApproved IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestCreated IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestCurrency IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"merchant_amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestMerchantAmount IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"merchant_currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestMerchantCurrency IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"reason" Text -> IssuingAuthorizationRequestReason' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason IssuingAuthorizationRequest
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingAuthorizationRequest -> Encoding
toEncoding IssuingAuthorizationRequest
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestAmount IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_details" Text -> Maybe IssuingAuthorizationRequestAmountDetails' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest
-> Maybe IssuingAuthorizationRequestAmountDetails'
issuingAuthorizationRequestAmountDetails IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"approved" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Bool
issuingAuthorizationRequestApproved IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestCreated IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestCurrency IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"merchant_amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Int
issuingAuthorizationRequestMerchantAmount IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"merchant_currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> Text
issuingAuthorizationRequestMerchantCurrency IssuingAuthorizationRequest
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"reason" Text -> IssuingAuthorizationRequestReason' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequest -> IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason IssuingAuthorizationRequest
obj))))))))
instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationRequest where
parseJSON :: Value -> Parser IssuingAuthorizationRequest
parseJSON = String
-> (Object -> Parser IssuingAuthorizationRequest)
-> Value
-> Parser IssuingAuthorizationRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingAuthorizationRequest" (\Object
obj -> ((((((((Int
-> Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser
(Int
-> Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Int
-> Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest
IssuingAuthorizationRequest Parser
(Int
-> Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Int
-> Parser
(Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount")) Parser
(Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser (Maybe IssuingAuthorizationRequestAmountDetails')
-> Parser
(Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe IssuingAuthorizationRequestAmountDetails')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"amount_details")) Parser
(Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Bool
-> Parser
(Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"approved")) Parser
(Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Int
-> Parser
(Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"created")) Parser
(Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Text
-> Parser
(Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"currency")) Parser
(Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Int
-> Parser
(Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"merchant_amount")) Parser
(Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest)
-> Parser Text
-> Parser
(IssuingAuthorizationRequestReason' -> IssuingAuthorizationRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"merchant_currency")) Parser
(IssuingAuthorizationRequestReason' -> IssuingAuthorizationRequest)
-> Parser IssuingAuthorizationRequestReason'
-> Parser IssuingAuthorizationRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser IssuingAuthorizationRequestReason'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"reason"))
mkIssuingAuthorizationRequest ::
GHC.Types.Int ->
GHC.Types.Bool ->
GHC.Types.Int ->
Data.Text.Internal.Text ->
GHC.Types.Int ->
Data.Text.Internal.Text ->
IssuingAuthorizationRequestReason' ->
IssuingAuthorizationRequest
mkIssuingAuthorizationRequest :: Int
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest
mkIssuingAuthorizationRequest Int
issuingAuthorizationRequestAmount Bool
issuingAuthorizationRequestApproved Int
issuingAuthorizationRequestCreated Text
issuingAuthorizationRequestCurrency Int
issuingAuthorizationRequestMerchantAmount Text
issuingAuthorizationRequestMerchantCurrency IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason =
IssuingAuthorizationRequest :: Int
-> Maybe IssuingAuthorizationRequestAmountDetails'
-> Bool
-> Int
-> Text
-> Int
-> Text
-> IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequest
IssuingAuthorizationRequest
{ issuingAuthorizationRequestAmount :: Int
issuingAuthorizationRequestAmount = Int
issuingAuthorizationRequestAmount,
issuingAuthorizationRequestAmountDetails :: Maybe IssuingAuthorizationRequestAmountDetails'
issuingAuthorizationRequestAmountDetails = Maybe IssuingAuthorizationRequestAmountDetails'
forall a. Maybe a
GHC.Maybe.Nothing,
issuingAuthorizationRequestApproved :: Bool
issuingAuthorizationRequestApproved = Bool
issuingAuthorizationRequestApproved,
issuingAuthorizationRequestCreated :: Int
issuingAuthorizationRequestCreated = Int
issuingAuthorizationRequestCreated,
issuingAuthorizationRequestCurrency :: Text
issuingAuthorizationRequestCurrency = Text
issuingAuthorizationRequestCurrency,
issuingAuthorizationRequestMerchantAmount :: Int
issuingAuthorizationRequestMerchantAmount = Int
issuingAuthorizationRequestMerchantAmount,
issuingAuthorizationRequestMerchantCurrency :: Text
issuingAuthorizationRequestMerchantCurrency = Text
issuingAuthorizationRequestMerchantCurrency,
issuingAuthorizationRequestReason :: IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason = IssuingAuthorizationRequestReason'
issuingAuthorizationRequestReason
}
data IssuingAuthorizationRequestAmountDetails' = IssuingAuthorizationRequestAmountDetails'
{
IssuingAuthorizationRequestAmountDetails' -> Maybe Int
issuingAuthorizationRequestAmountDetails'AtmFee :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( Int -> IssuingAuthorizationRequestAmountDetails' -> ShowS
[IssuingAuthorizationRequestAmountDetails'] -> ShowS
IssuingAuthorizationRequestAmountDetails' -> String
(Int -> IssuingAuthorizationRequestAmountDetails' -> ShowS)
-> (IssuingAuthorizationRequestAmountDetails' -> String)
-> ([IssuingAuthorizationRequestAmountDetails'] -> ShowS)
-> Show IssuingAuthorizationRequestAmountDetails'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationRequestAmountDetails'] -> ShowS
$cshowList :: [IssuingAuthorizationRequestAmountDetails'] -> ShowS
show :: IssuingAuthorizationRequestAmountDetails' -> String
$cshow :: IssuingAuthorizationRequestAmountDetails' -> String
showsPrec :: Int -> IssuingAuthorizationRequestAmountDetails' -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationRequestAmountDetails' -> ShowS
GHC.Show.Show,
IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool
(IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool)
-> (IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool)
-> Eq IssuingAuthorizationRequestAmountDetails'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool
$c/= :: IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool
== :: IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool
$c== :: IssuingAuthorizationRequestAmountDetails'
-> IssuingAuthorizationRequestAmountDetails' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationRequestAmountDetails' where
toJSON :: IssuingAuthorizationRequestAmountDetails' -> Value
toJSON IssuingAuthorizationRequestAmountDetails'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"atm_fee" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequestAmountDetails' -> Maybe Int
issuingAuthorizationRequestAmountDetails'AtmFee IssuingAuthorizationRequestAmountDetails'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingAuthorizationRequestAmountDetails' -> Encoding
toEncoding IssuingAuthorizationRequestAmountDetails'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs (Text
"atm_fee" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationRequestAmountDetails' -> Maybe Int
issuingAuthorizationRequestAmountDetails'AtmFee IssuingAuthorizationRequestAmountDetails'
obj)
instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationRequestAmountDetails' where
parseJSON :: Value -> Parser IssuingAuthorizationRequestAmountDetails'
parseJSON = String
-> (Object -> Parser IssuingAuthorizationRequestAmountDetails')
-> Value
-> Parser IssuingAuthorizationRequestAmountDetails'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingAuthorizationRequestAmountDetails'" (\Object
obj -> (Maybe Int -> IssuingAuthorizationRequestAmountDetails')
-> Parser (Maybe Int -> IssuingAuthorizationRequestAmountDetails')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int -> IssuingAuthorizationRequestAmountDetails'
IssuingAuthorizationRequestAmountDetails' Parser (Maybe Int -> IssuingAuthorizationRequestAmountDetails')
-> Parser (Maybe Int)
-> Parser IssuingAuthorizationRequestAmountDetails'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"atm_fee"))
mkIssuingAuthorizationRequestAmountDetails' :: IssuingAuthorizationRequestAmountDetails'
mkIssuingAuthorizationRequestAmountDetails' :: IssuingAuthorizationRequestAmountDetails'
mkIssuingAuthorizationRequestAmountDetails' = IssuingAuthorizationRequestAmountDetails' :: Maybe Int -> IssuingAuthorizationRequestAmountDetails'
IssuingAuthorizationRequestAmountDetails' {issuingAuthorizationRequestAmountDetails'AtmFee :: Maybe Int
issuingAuthorizationRequestAmountDetails'AtmFee = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing}
data IssuingAuthorizationRequestReason'
=
IssuingAuthorizationRequestReason'Other Data.Aeson.Types.Internal.Value
|
IssuingAuthorizationRequestReason'Typed Data.Text.Internal.Text
|
IssuingAuthorizationRequestReason'EnumAccountDisabled
|
IssuingAuthorizationRequestReason'EnumCardActive
|
IssuingAuthorizationRequestReason'EnumCardInactive
|
IssuingAuthorizationRequestReason'EnumCardholderInactive
|
IssuingAuthorizationRequestReason'EnumCardholderVerificationRequired
|
IssuingAuthorizationRequestReason'EnumInsufficientFunds
|
IssuingAuthorizationRequestReason'EnumNotAllowed
|
IssuingAuthorizationRequestReason'EnumSpendingControls
|
IssuingAuthorizationRequestReason'EnumSuspectedFraud
|
IssuingAuthorizationRequestReason'EnumVerificationFailed
|
IssuingAuthorizationRequestReason'EnumWebhookApproved
|
IssuingAuthorizationRequestReason'EnumWebhookDeclined
|
IssuingAuthorizationRequestReason'EnumWebhookTimeout
deriving (Int -> IssuingAuthorizationRequestReason' -> ShowS
[IssuingAuthorizationRequestReason'] -> ShowS
IssuingAuthorizationRequestReason' -> String
(Int -> IssuingAuthorizationRequestReason' -> ShowS)
-> (IssuingAuthorizationRequestReason' -> String)
-> ([IssuingAuthorizationRequestReason'] -> ShowS)
-> Show IssuingAuthorizationRequestReason'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationRequestReason'] -> ShowS
$cshowList :: [IssuingAuthorizationRequestReason'] -> ShowS
show :: IssuingAuthorizationRequestReason' -> String
$cshow :: IssuingAuthorizationRequestReason' -> String
showsPrec :: Int -> IssuingAuthorizationRequestReason' -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationRequestReason' -> ShowS
GHC.Show.Show, IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool
(IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool)
-> (IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool)
-> Eq IssuingAuthorizationRequestReason'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool
$c/= :: IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool
== :: IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool
$c== :: IssuingAuthorizationRequestReason'
-> IssuingAuthorizationRequestReason' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationRequestReason' where
toJSON :: IssuingAuthorizationRequestReason' -> Value
toJSON (IssuingAuthorizationRequestReason'Other Value
val) = Value
val
toJSON (IssuingAuthorizationRequestReason'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumAccountDisabled) = Value
"account_disabled"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardActive) = Value
"card_active"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardInactive) = Value
"card_inactive"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardholderInactive) = Value
"cardholder_inactive"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardholderVerificationRequired) = Value
"cardholder_verification_required"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumInsufficientFunds) = Value
"insufficient_funds"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumNotAllowed) = Value
"not_allowed"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumSpendingControls) = Value
"spending_controls"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumSuspectedFraud) = Value
"suspected_fraud"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumVerificationFailed) = Value
"verification_failed"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookApproved) = Value
"webhook_approved"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookDeclined) = Value
"webhook_declined"
toJSON (IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookTimeout) = Value
"webhook_timeout"
instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationRequestReason' where
parseJSON :: Value -> Parser IssuingAuthorizationRequestReason'
parseJSON Value
val =
IssuingAuthorizationRequestReason'
-> Parser IssuingAuthorizationRequestReason'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"account_disabled" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumAccountDisabled
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card_active" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardActive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card_inactive" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardInactive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"cardholder_inactive" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardholderInactive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"cardholder_verification_required" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumCardholderVerificationRequired
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"insufficient_funds" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumInsufficientFunds
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"not_allowed" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumNotAllowed
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"spending_controls" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumSpendingControls
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"suspected_fraud" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumSuspectedFraud
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumVerificationFailed
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"webhook_approved" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookApproved
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"webhook_declined" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookDeclined
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"webhook_timeout" -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'EnumWebhookTimeout
| Bool
GHC.Base.otherwise -> Value -> IssuingAuthorizationRequestReason'
IssuingAuthorizationRequestReason'Other Value
val
)