{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.ExternalAccount 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.Account
import {-# SOURCE #-} StripeAPI.Types.BankAccount
import {-# SOURCE #-} StripeAPI.Types.Card
import {-# SOURCE #-} StripeAPI.Types.Customer
import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer
import {-# SOURCE #-} StripeAPI.Types.Recipient
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data ExternalAccount = ExternalAccount
{
ExternalAccount -> Maybe ExternalAccountAccount'Variants
externalAccountAccount :: (GHC.Maybe.Maybe ExternalAccountAccount'Variants),
ExternalAccount -> Maybe Text
externalAccountAccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountAddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe [ExternalAccountAvailablePayoutMethods']
externalAccountAvailablePayoutMethods :: (GHC.Maybe.Maybe ([ExternalAccountAvailablePayoutMethods'])),
ExternalAccount -> Maybe Text
externalAccountBankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountBrand :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe ExternalAccountCustomer'Variants
externalAccountCustomer :: (GHC.Maybe.Maybe ExternalAccountCustomer'Variants),
ExternalAccount -> Maybe Text
externalAccountCvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Bool
externalAccountDefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool),
ExternalAccount -> Maybe Text
externalAccountDynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Int
externalAccountExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int),
ExternalAccount -> Maybe Int
externalAccountExpYear :: (GHC.Maybe.Maybe GHC.Types.Int),
ExternalAccount -> Maybe Text
externalAccountFingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountFunding :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountId :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Object
externalAccountMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
ExternalAccount -> Maybe Text
externalAccountName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe ExternalAccountRecipient'Variants
externalAccountRecipient :: (GHC.Maybe.Maybe ExternalAccountRecipient'Variants),
ExternalAccount -> Maybe Text
externalAccountRoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountStatus :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ExternalAccount -> Maybe Text
externalAccountTokenizationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> ExternalAccount -> ShowS
[ExternalAccount] -> ShowS
ExternalAccount -> String
(Int -> ExternalAccount -> ShowS)
-> (ExternalAccount -> String)
-> ([ExternalAccount] -> ShowS)
-> Show ExternalAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalAccount] -> ShowS
$cshowList :: [ExternalAccount] -> ShowS
show :: ExternalAccount -> String
$cshow :: ExternalAccount -> String
showsPrec :: Int -> ExternalAccount -> ShowS
$cshowsPrec :: Int -> ExternalAccount -> ShowS
GHC.Show.Show,
ExternalAccount -> ExternalAccount -> Bool
(ExternalAccount -> ExternalAccount -> Bool)
-> (ExternalAccount -> ExternalAccount -> Bool)
-> Eq ExternalAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalAccount -> ExternalAccount -> Bool
$c/= :: ExternalAccount -> ExternalAccount -> Bool
== :: ExternalAccount -> ExternalAccount -> Bool
$c== :: ExternalAccount -> ExternalAccount -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON ExternalAccount where
toJSON :: ExternalAccount -> Value
toJSON ExternalAccount
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"account" Text -> Maybe ExternalAccountAccount'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountAccount'Variants
externalAccountAccount ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAccountHolderName ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_type" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAccountHolderType ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressCity ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressCountry ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine1 ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line1_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine1Check ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine2 ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressState ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressZip ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressZipCheck ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"available_payout_methods" Text -> Maybe [ExternalAccountAvailablePayoutMethods'] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe [ExternalAccountAvailablePayoutMethods']
externalAccountAvailablePayoutMethods ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bank_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountBankName ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"brand" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountBrand ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCountry ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCurrency ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe ExternalAccountCustomer'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountCustomer'Variants
externalAccountCustomer ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cvc_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCvcCheck ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_for_currency" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Bool
externalAccountDefaultForCurrency ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"dynamic_last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountDynamicLast4 ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_month" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Int
externalAccountExpMonth ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_year" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Int
externalAccountExpYear ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fingerprint" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountFingerprint ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"funding" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountFunding ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountId ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountLast4 ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Object
externalAccountMetadata ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountName ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"recipient" Text -> Maybe ExternalAccountRecipient'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountRecipient'Variants
externalAccountRecipient ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"routing_number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountRoutingNumber ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountStatus ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tokenization_method" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountTokenizationMethod ExternalAccount
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: ExternalAccount -> Encoding
toEncoding ExternalAccount
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"account" Text -> Maybe ExternalAccountAccount'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountAccount'Variants
externalAccountAccount ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAccountHolderName ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_type" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAccountHolderType ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressCity ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressCountry ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine1 ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line1_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine1Check ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressLine2 ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressState ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressZip ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountAddressZipCheck ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"available_payout_methods" Text -> Maybe [ExternalAccountAvailablePayoutMethods'] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe [ExternalAccountAvailablePayoutMethods']
externalAccountAvailablePayoutMethods ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bank_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountBankName ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"brand" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountBrand ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCountry ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCurrency ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe ExternalAccountCustomer'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountCustomer'Variants
externalAccountCustomer ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cvc_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountCvcCheck ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_for_currency" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Bool
externalAccountDefaultForCurrency ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"dynamic_last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountDynamicLast4 ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_month" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Int
externalAccountExpMonth ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_year" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Int
externalAccountExpYear ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fingerprint" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountFingerprint ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"funding" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountFunding ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountId ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountLast4 ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Object
externalAccountMetadata ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountName ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"recipient" Text -> Maybe ExternalAccountRecipient'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe ExternalAccountRecipient'Variants
externalAccountRecipient ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"routing_number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountRoutingNumber ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountStatus ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tokenization_method" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ExternalAccount -> Maybe Text
externalAccountTokenizationMethod ExternalAccount
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account")))))))))))))))))))))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON ExternalAccount where
parseJSON :: Value -> Parser ExternalAccount
parseJSON = String
-> (Object -> Parser ExternalAccount)
-> Value
-> Parser ExternalAccount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"ExternalAccount" (\Object
obj -> ((((((((((((((((((((((((((((((((Maybe ExternalAccountAccount'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser
(Maybe ExternalAccountAccount'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe ExternalAccountAccount'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount
ExternalAccount Parser
(Maybe ExternalAccountAccount'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe ExternalAccountAccount'Variants)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ExternalAccountAccount'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_holder_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_holder_type")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_city")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_country")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line1")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line1_check")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line2")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_state")) Parser
(Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_zip")) Parser
(Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_zip_check")) Parser
(Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe [ExternalAccountAvailablePayoutMethods'])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe [ExternalAccountAvailablePayoutMethods'])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"available_payout_methods")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bank_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"brand")) Parser
(Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"country")) Parser
(Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"currency")) Parser
(Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe ExternalAccountCustomer'Variants)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ExternalAccountCustomer'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"cvc_check")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"default_for_currency")) Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"dynamic_last4")) Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
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
"exp_month")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
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
"exp_year")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"fingerprint")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"funding")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"last4")) Parser
(Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Object)
-> Parser
(Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
(Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount)
-> Parser (Maybe Text)
-> Parser
(Maybe ExternalAccountRecipient'Variants
-> Maybe Text -> Maybe Text -> Maybe Text -> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"name")) Parser
(Maybe ExternalAccountRecipient'Variants
-> Maybe Text -> Maybe Text -> Maybe Text -> ExternalAccount)
-> Parser (Maybe ExternalAccountRecipient'Variants)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ExternalAccountRecipient'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"recipient")) Parser (Maybe Text -> Maybe Text -> Maybe Text -> ExternalAccount)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"routing_number")) Parser (Maybe Text -> Maybe Text -> ExternalAccount)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ExternalAccount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"status")) Parser (Maybe Text -> ExternalAccount)
-> Parser (Maybe Text) -> Parser ExternalAccount
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tokenization_method"))
mkExternalAccount :: ExternalAccount
mkExternalAccount :: ExternalAccount
mkExternalAccount =
ExternalAccount :: Maybe ExternalAccountAccount'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountAvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ExternalAccountCustomer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ExternalAccountRecipient'Variants
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ExternalAccount
ExternalAccount
{ externalAccountAccount :: Maybe ExternalAccountAccount'Variants
externalAccountAccount = Maybe ExternalAccountAccount'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAccountHolderName :: Maybe Text
externalAccountAccountHolderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAccountHolderType :: Maybe Text
externalAccountAccountHolderType = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressCity :: Maybe Text
externalAccountAddressCity = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressCountry :: Maybe Text
externalAccountAddressCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressLine1 :: Maybe Text
externalAccountAddressLine1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressLine1Check :: Maybe Text
externalAccountAddressLine1Check = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressLine2 :: Maybe Text
externalAccountAddressLine2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressState :: Maybe Text
externalAccountAddressState = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressZip :: Maybe Text
externalAccountAddressZip = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAddressZipCheck :: Maybe Text
externalAccountAddressZipCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountAvailablePayoutMethods :: Maybe [ExternalAccountAvailablePayoutMethods']
externalAccountAvailablePayoutMethods = Maybe [ExternalAccountAvailablePayoutMethods']
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountBankName :: Maybe Text
externalAccountBankName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountBrand :: Maybe Text
externalAccountBrand = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountCountry :: Maybe Text
externalAccountCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountCurrency :: Maybe Text
externalAccountCurrency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountCustomer :: Maybe ExternalAccountCustomer'Variants
externalAccountCustomer = Maybe ExternalAccountCustomer'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountCvcCheck :: Maybe Text
externalAccountCvcCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountDefaultForCurrency :: Maybe Bool
externalAccountDefaultForCurrency = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountDynamicLast4 :: Maybe Text
externalAccountDynamicLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountExpMonth :: Maybe Int
externalAccountExpMonth = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountExpYear :: Maybe Int
externalAccountExpYear = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountFingerprint :: Maybe Text
externalAccountFingerprint = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountFunding :: Maybe Text
externalAccountFunding = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountId :: Maybe Text
externalAccountId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountLast4 :: Maybe Text
externalAccountLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountMetadata :: Maybe Object
externalAccountMetadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountName :: Maybe Text
externalAccountName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountRecipient :: Maybe ExternalAccountRecipient'Variants
externalAccountRecipient = Maybe ExternalAccountRecipient'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountRoutingNumber :: Maybe Text
externalAccountRoutingNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountStatus :: Maybe Text
externalAccountStatus = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
externalAccountTokenizationMethod :: Maybe Text
externalAccountTokenizationMethod = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data ExternalAccountAccount'Variants
= ExternalAccountAccount'Text Data.Text.Internal.Text
| ExternalAccountAccount'Account Account
deriving (Int -> ExternalAccountAccount'Variants -> ShowS
[ExternalAccountAccount'Variants] -> ShowS
ExternalAccountAccount'Variants -> String
(Int -> ExternalAccountAccount'Variants -> ShowS)
-> (ExternalAccountAccount'Variants -> String)
-> ([ExternalAccountAccount'Variants] -> ShowS)
-> Show ExternalAccountAccount'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalAccountAccount'Variants] -> ShowS
$cshowList :: [ExternalAccountAccount'Variants] -> ShowS
show :: ExternalAccountAccount'Variants -> String
$cshow :: ExternalAccountAccount'Variants -> String
showsPrec :: Int -> ExternalAccountAccount'Variants -> ShowS
$cshowsPrec :: Int -> ExternalAccountAccount'Variants -> ShowS
GHC.Show.Show, ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool
(ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool)
-> (ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool)
-> Eq ExternalAccountAccount'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool
$c/= :: ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool
== :: ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool
$c== :: ExternalAccountAccount'Variants
-> ExternalAccountAccount'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ExternalAccountAccount'Variants where
toJSON :: ExternalAccountAccount'Variants -> Value
toJSON (ExternalAccountAccount'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (ExternalAccountAccount'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a
instance Data.Aeson.Types.FromJSON.FromJSON ExternalAccountAccount'Variants where
parseJSON :: Value -> Parser ExternalAccountAccount'Variants
parseJSON Value
val = case (Text -> ExternalAccountAccount'Variants
ExternalAccountAccount'Text (Text -> ExternalAccountAccount'Variants)
-> Result Text -> Result ExternalAccountAccount'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountAccount'Variants
-> Result ExternalAccountAccount'Variants
-> Result ExternalAccountAccount'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> ExternalAccountAccount'Variants
ExternalAccountAccount'Account (Account -> ExternalAccountAccount'Variants)
-> Result Account -> Result ExternalAccountAccount'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountAccount'Variants
-> Result ExternalAccountAccount'Variants
-> Result ExternalAccountAccount'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result ExternalAccountAccount'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success ExternalAccountAccount'Variants
a -> ExternalAccountAccount'Variants
-> Parser ExternalAccountAccount'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure ExternalAccountAccount'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser ExternalAccountAccount'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data ExternalAccountAvailablePayoutMethods'
=
ExternalAccountAvailablePayoutMethods'Other Data.Aeson.Types.Internal.Value
|
ExternalAccountAvailablePayoutMethods'Typed Data.Text.Internal.Text
|
ExternalAccountAvailablePayoutMethods'EnumInstant
|
ExternalAccountAvailablePayoutMethods'EnumStandard
deriving (Int -> ExternalAccountAvailablePayoutMethods' -> ShowS
[ExternalAccountAvailablePayoutMethods'] -> ShowS
ExternalAccountAvailablePayoutMethods' -> String
(Int -> ExternalAccountAvailablePayoutMethods' -> ShowS)
-> (ExternalAccountAvailablePayoutMethods' -> String)
-> ([ExternalAccountAvailablePayoutMethods'] -> ShowS)
-> Show ExternalAccountAvailablePayoutMethods'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalAccountAvailablePayoutMethods'] -> ShowS
$cshowList :: [ExternalAccountAvailablePayoutMethods'] -> ShowS
show :: ExternalAccountAvailablePayoutMethods' -> String
$cshow :: ExternalAccountAvailablePayoutMethods' -> String
showsPrec :: Int -> ExternalAccountAvailablePayoutMethods' -> ShowS
$cshowsPrec :: Int -> ExternalAccountAvailablePayoutMethods' -> ShowS
GHC.Show.Show, ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool
(ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool)
-> (ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool)
-> Eq ExternalAccountAvailablePayoutMethods'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool
$c/= :: ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool
== :: ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool
$c== :: ExternalAccountAvailablePayoutMethods'
-> ExternalAccountAvailablePayoutMethods' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ExternalAccountAvailablePayoutMethods' where
toJSON :: ExternalAccountAvailablePayoutMethods' -> Value
toJSON (ExternalAccountAvailablePayoutMethods'Other Value
val) = Value
val
toJSON (ExternalAccountAvailablePayoutMethods'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ExternalAccountAvailablePayoutMethods'
ExternalAccountAvailablePayoutMethods'EnumInstant) = Value
"instant"
toJSON (ExternalAccountAvailablePayoutMethods'
ExternalAccountAvailablePayoutMethods'EnumStandard) = Value
"standard"
instance Data.Aeson.Types.FromJSON.FromJSON ExternalAccountAvailablePayoutMethods' where
parseJSON :: Value -> Parser ExternalAccountAvailablePayoutMethods'
parseJSON Value
val =
ExternalAccountAvailablePayoutMethods'
-> Parser ExternalAccountAvailablePayoutMethods'
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
"instant" -> ExternalAccountAvailablePayoutMethods'
ExternalAccountAvailablePayoutMethods'EnumInstant
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"standard" -> ExternalAccountAvailablePayoutMethods'
ExternalAccountAvailablePayoutMethods'EnumStandard
| Bool
GHC.Base.otherwise -> Value -> ExternalAccountAvailablePayoutMethods'
ExternalAccountAvailablePayoutMethods'Other Value
val
)
data ExternalAccountCustomer'Variants
= ExternalAccountCustomer'Text Data.Text.Internal.Text
| ExternalAccountCustomer'Customer Customer
| ExternalAccountCustomer'DeletedCustomer DeletedCustomer
deriving (Int -> ExternalAccountCustomer'Variants -> ShowS
[ExternalAccountCustomer'Variants] -> ShowS
ExternalAccountCustomer'Variants -> String
(Int -> ExternalAccountCustomer'Variants -> ShowS)
-> (ExternalAccountCustomer'Variants -> String)
-> ([ExternalAccountCustomer'Variants] -> ShowS)
-> Show ExternalAccountCustomer'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalAccountCustomer'Variants] -> ShowS
$cshowList :: [ExternalAccountCustomer'Variants] -> ShowS
show :: ExternalAccountCustomer'Variants -> String
$cshow :: ExternalAccountCustomer'Variants -> String
showsPrec :: Int -> ExternalAccountCustomer'Variants -> ShowS
$cshowsPrec :: Int -> ExternalAccountCustomer'Variants -> ShowS
GHC.Show.Show, ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool
(ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool)
-> (ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool)
-> Eq ExternalAccountCustomer'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool
$c/= :: ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool
== :: ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool
$c== :: ExternalAccountCustomer'Variants
-> ExternalAccountCustomer'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ExternalAccountCustomer'Variants where
toJSON :: ExternalAccountCustomer'Variants -> Value
toJSON (ExternalAccountCustomer'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (ExternalAccountCustomer'Customer Customer
a) = Customer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Customer
a
toJSON (ExternalAccountCustomer'DeletedCustomer DeletedCustomer
a) = DeletedCustomer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedCustomer
a
instance Data.Aeson.Types.FromJSON.FromJSON ExternalAccountCustomer'Variants where
parseJSON :: Value -> Parser ExternalAccountCustomer'Variants
parseJSON Value
val = case (Text -> ExternalAccountCustomer'Variants
ExternalAccountCustomer'Text (Text -> ExternalAccountCustomer'Variants)
-> Result Text -> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Customer -> ExternalAccountCustomer'Variants
ExternalAccountCustomer'Customer (Customer -> ExternalAccountCustomer'Variants)
-> Result Customer -> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Customer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedCustomer -> ExternalAccountCustomer'Variants
ExternalAccountCustomer'DeletedCustomer (DeletedCustomer -> ExternalAccountCustomer'Variants)
-> Result DeletedCustomer
-> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedCustomer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
-> Result ExternalAccountCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result ExternalAccountCustomer'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
Data.Aeson.Types.Internal.Success ExternalAccountCustomer'Variants
a -> ExternalAccountCustomer'Variants
-> Parser ExternalAccountCustomer'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure ExternalAccountCustomer'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser ExternalAccountCustomer'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data ExternalAccountRecipient'Variants
= ExternalAccountRecipient'Text Data.Text.Internal.Text
| ExternalAccountRecipient'Recipient Recipient
deriving (Int -> ExternalAccountRecipient'Variants -> ShowS
[ExternalAccountRecipient'Variants] -> ShowS
ExternalAccountRecipient'Variants -> String
(Int -> ExternalAccountRecipient'Variants -> ShowS)
-> (ExternalAccountRecipient'Variants -> String)
-> ([ExternalAccountRecipient'Variants] -> ShowS)
-> Show ExternalAccountRecipient'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalAccountRecipient'Variants] -> ShowS
$cshowList :: [ExternalAccountRecipient'Variants] -> ShowS
show :: ExternalAccountRecipient'Variants -> String
$cshow :: ExternalAccountRecipient'Variants -> String
showsPrec :: Int -> ExternalAccountRecipient'Variants -> ShowS
$cshowsPrec :: Int -> ExternalAccountRecipient'Variants -> ShowS
GHC.Show.Show, ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool
(ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool)
-> (ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool)
-> Eq ExternalAccountRecipient'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool
$c/= :: ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool
== :: ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool
$c== :: ExternalAccountRecipient'Variants
-> ExternalAccountRecipient'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ExternalAccountRecipient'Variants where
toJSON :: ExternalAccountRecipient'Variants -> Value
toJSON (ExternalAccountRecipient'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (ExternalAccountRecipient'Recipient Recipient
a) = Recipient -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Recipient
a
instance Data.Aeson.Types.FromJSON.FromJSON ExternalAccountRecipient'Variants where
parseJSON :: Value -> Parser ExternalAccountRecipient'Variants
parseJSON Value
val = case (Text -> ExternalAccountRecipient'Variants
ExternalAccountRecipient'Text (Text -> ExternalAccountRecipient'Variants)
-> Result Text -> Result ExternalAccountRecipient'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountRecipient'Variants
-> Result ExternalAccountRecipient'Variants
-> Result ExternalAccountRecipient'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Recipient -> ExternalAccountRecipient'Variants
ExternalAccountRecipient'Recipient (Recipient -> ExternalAccountRecipient'Variants)
-> Result Recipient -> Result ExternalAccountRecipient'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Recipient
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ExternalAccountRecipient'Variants
-> Result ExternalAccountRecipient'Variants
-> Result ExternalAccountRecipient'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result ExternalAccountRecipient'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success ExternalAccountRecipient'Variants
a -> ExternalAccountRecipient'Variants
-> Parser ExternalAccountRecipient'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure ExternalAccountRecipient'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser ExternalAccountRecipient'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a