{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the types generated from the schema Source
module StripeAPI.Types.Source 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.Address
import {-# SOURCE #-} StripeAPI.Types.SourceCodeVerificationFlow
import {-# SOURCE #-} StripeAPI.Types.SourceOrder
import {-# SOURCE #-} StripeAPI.Types.SourceOwner
import {-# SOURCE #-} StripeAPI.Types.SourceReceiverFlow
import {-# SOURCE #-} StripeAPI.Types.SourceRedirectFlow
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchCreditTransfer
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAcssDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAlipay
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAuBecsDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeBancontact
import {-# SOURCE #-} StripeAPI.Types.SourceTypeCard
import {-# SOURCE #-} StripeAPI.Types.SourceTypeCardPresent
import {-# SOURCE #-} StripeAPI.Types.SourceTypeEps
import {-# SOURCE #-} StripeAPI.Types.SourceTypeGiropay
import {-# SOURCE #-} StripeAPI.Types.SourceTypeIdeal
import {-# SOURCE #-} StripeAPI.Types.SourceTypeKlarna
import {-# SOURCE #-} StripeAPI.Types.SourceTypeMultibanco
import {-# SOURCE #-} StripeAPI.Types.SourceTypeP24
import {-# SOURCE #-} StripeAPI.Types.SourceTypeSepaDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeSofort
import {-# SOURCE #-} StripeAPI.Types.SourceTypeThreeDSecure
import {-# SOURCE #-} StripeAPI.Types.SourceTypeWechat
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.source@ in the specification.
--
-- \`Source\` objects allow you to accept a variety of payment methods. They
-- represent a customer\'s payment instrument, and can be used with the Stripe API
-- just like a \`Card\` object: once chargeable, they can be charged, or can be
-- attached to customers.
--
-- Related guides: [Sources API](https:\/\/stripe.com\/docs\/sources) and [Sources & Customers](https:\/\/stripe.com\/docs\/sources\/customers).
data Source = Source
  { -- | ach_credit_transfer
    Source -> Maybe SourceTypeAchCreditTransfer
sourceAchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer),
    -- | ach_debit
    Source -> Maybe SourceTypeAchDebit
sourceAchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit),
    -- | acss_debit
    Source -> Maybe SourceTypeAcssDebit
sourceAcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit),
    -- | alipay
    Source -> Maybe SourceTypeAlipay
sourceAlipay :: (GHC.Maybe.Maybe SourceTypeAlipay),
    -- | amount: A positive integer in the smallest currency unit (that is, 100 cents for \$1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for \`single_use\` sources.
    Source -> Maybe Int
sourceAmount :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | au_becs_debit
    Source -> Maybe SourceTypeAuBecsDebit
sourceAuBecsDebit :: (GHC.Maybe.Maybe SourceTypeAuBecsDebit),
    -- | bancontact
    Source -> Maybe SourceTypeBancontact
sourceBancontact :: (GHC.Maybe.Maybe SourceTypeBancontact),
    -- | card
    Source -> Maybe SourceTypeCard
sourceCard :: (GHC.Maybe.Maybe SourceTypeCard),
    -- | card_present
    Source -> Maybe SourceTypeCardPresent
sourceCardPresent :: (GHC.Maybe.Maybe SourceTypeCardPresent),
    -- | client_secret: The client secret of the source. Used for client-side retrieval using a publishable key.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Text
sourceClientSecret :: Data.Text.Internal.Text,
    -- | code_verification:
    Source -> Maybe SourceCodeVerificationFlow
sourceCodeVerification :: (GHC.Maybe.Maybe SourceCodeVerificationFlow),
    -- | created: Time at which the object was created. Measured in seconds since the Unix epoch.
    Source -> Int
sourceCreated :: GHC.Types.Int,
    -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for \`single_use\` sources.
    Source -> Maybe Text
sourceCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | customer: The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Maybe Text
sourceCustomer :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | eps
    Source -> Maybe SourceTypeEps
sourceEps :: (GHC.Maybe.Maybe SourceTypeEps),
    -- | flow: The authentication \`flow\` of the source. \`flow\` is one of \`redirect\`, \`receiver\`, \`code_verification\`, \`none\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Text
sourceFlow :: Data.Text.Internal.Text,
    -- | giropay
    Source -> Maybe SourceTypeGiropay
sourceGiropay :: (GHC.Maybe.Maybe SourceTypeGiropay),
    -- | id: Unique identifier for the object.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Text
sourceId :: Data.Text.Internal.Text,
    -- | ideal
    Source -> Maybe SourceTypeIdeal
sourceIdeal :: (GHC.Maybe.Maybe SourceTypeIdeal),
    -- | klarna
    Source -> Maybe SourceTypeKlarna
sourceKlarna :: (GHC.Maybe.Maybe SourceTypeKlarna),
    -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.
    Source -> Bool
sourceLivemode :: GHC.Types.Bool,
    -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    Source -> Maybe Object
sourceMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
    -- | multibanco
    Source -> Maybe SourceTypeMultibanco
sourceMultibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco),
    -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types.
    Source -> Maybe SourceOwner'
sourceOwner :: (GHC.Maybe.Maybe SourceOwner'),
    -- | p24
    Source -> Maybe SourceTypeP24
sourceP24 :: (GHC.Maybe.Maybe SourceTypeP24),
    -- | receiver:
    Source -> Maybe SourceReceiverFlow
sourceReceiver :: (GHC.Maybe.Maybe SourceReceiverFlow),
    -- | redirect:
    Source -> Maybe SourceRedirectFlow
sourceRedirect :: (GHC.Maybe.Maybe SourceRedirectFlow),
    -- | sepa_debit
    Source -> Maybe SourceTypeSepaDebit
sourceSepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit),
    -- | sofort
    Source -> Maybe SourceTypeSofort
sourceSofort :: (GHC.Maybe.Maybe SourceTypeSofort),
    -- | source_order:
    Source -> Maybe SourceOrder
sourceSourceOrder :: (GHC.Maybe.Maybe SourceOrder),
    -- | statement_descriptor: Extra information about a source. This will appear on your customer\'s statement every time you charge the source.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Maybe Text
sourceStatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | status: The status of the source, one of \`canceled\`, \`chargeable\`, \`consumed\`, \`failed\`, or \`pending\`. Only \`chargeable\` sources can be used to create a charge.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Text
sourceStatus :: Data.Text.Internal.Text,
    -- | three_d_secure
    Source -> Maybe SourceTypeThreeDSecure
sourceThreeDSecure :: (GHC.Maybe.Maybe SourceTypeThreeDSecure),
    -- | type: The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used.
    Source -> SourceType'
sourceType :: SourceType',
    -- | usage: Either \`reusable\` or \`single_use\`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Source -> Maybe Text
sourceUsage :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | wechat
    Source -> Maybe SourceTypeWechat
sourceWechat :: (GHC.Maybe.Maybe SourceTypeWechat)
  }
  deriving
    ( Int -> Source -> ShowS
[Source] -> ShowS
Source -> String
(Int -> Source -> ShowS)
-> (Source -> String) -> ([Source] -> ShowS) -> Show Source
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Source] -> ShowS
$cshowList :: [Source] -> ShowS
show :: Source -> String
$cshow :: Source -> String
showsPrec :: Int -> Source -> ShowS
$cshowsPrec :: Int -> Source -> ShowS
GHC.Show.Show,
      Source -> Source -> Bool
(Source -> Source -> Bool)
-> (Source -> Source -> Bool) -> Eq Source
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Source -> Source -> Bool
$c/= :: Source -> Source -> Bool
== :: Source -> Source -> Bool
$c== :: Source -> Source -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON Source where
  toJSON :: Source -> Value
toJSON Source
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"ach_credit_transfer" Text -> Maybe SourceTypeAchCreditTransfer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAchCreditTransfer
sourceAchCreditTransfer Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ach_debit" Text -> Maybe SourceTypeAchDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAchDebit
sourceAchDebit Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"acss_debit" Text -> Maybe SourceTypeAcssDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAcssDebit
sourceAcssDebit Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"alipay" Text -> Maybe SourceTypeAlipay -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAlipay
sourceAlipay Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Int
sourceAmount Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"au_becs_debit" Text -> Maybe SourceTypeAuBecsDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAuBecsDebit
sourceAuBecsDebit Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bancontact" Text -> Maybe SourceTypeBancontact -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeBancontact
sourceBancontact Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"card" Text -> Maybe SourceTypeCard -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeCard
sourceCard Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"card_present" Text -> Maybe SourceTypeCardPresent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeCardPresent
sourceCardPresent Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"client_secret" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceClientSecret Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"code_verification" Text -> Maybe SourceCodeVerificationFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceCodeVerificationFlow
sourceCodeVerification Source
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..= Source -> Int
sourceCreated Source
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..= Source -> Maybe Text
sourceCurrency Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceCustomer Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"eps" Text -> Maybe SourceTypeEps -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeEps
sourceEps Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"flow" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceFlow Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"giropay" Text -> Maybe SourceTypeGiropay -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeGiropay
sourceGiropay Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceId Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ideal" Text -> Maybe SourceTypeIdeal -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeIdeal
sourceIdeal Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"klarna" Text -> Maybe SourceTypeKlarna -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeKlarna
sourceKlarna Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Bool
sourceLivemode Source
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..= Source -> Maybe Object
sourceMetadata Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"multibanco" Text -> Maybe SourceTypeMultibanco -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeMultibanco
sourceMultibanco Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"owner" Text -> Maybe SourceOwner' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceOwner'
sourceOwner Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"p24" Text -> Maybe SourceTypeP24 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeP24
sourceP24 Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"receiver" Text -> Maybe SourceReceiverFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceReceiverFlow
sourceReceiver Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"redirect" Text -> Maybe SourceRedirectFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceRedirectFlow
sourceRedirect Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"sepa_debit" Text -> Maybe SourceTypeSepaDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeSepaDebit
sourceSepaDebit Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"sofort" Text -> Maybe SourceTypeSofort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeSofort
sourceSofort Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"source_order" Text -> Maybe SourceOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceOrder
sourceSourceOrder Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"statement_descriptor" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceStatementDescriptor Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceStatus Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"three_d_secure" Text -> Maybe SourceTypeThreeDSecure -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeThreeDSecure
sourceThreeDSecure Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> SourceType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> SourceType'
sourceType Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"usage" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceUsage Source
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"wechat" Text -> Maybe SourceTypeWechat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeWechat
sourceWechat Source
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
"source" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: Source -> Encoding
toEncoding Source
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"ach_credit_transfer" Text -> Maybe SourceTypeAchCreditTransfer -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAchCreditTransfer
sourceAchCreditTransfer Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ach_debit" Text -> Maybe SourceTypeAchDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAchDebit
sourceAchDebit Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"acss_debit" Text -> Maybe SourceTypeAcssDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAcssDebit
sourceAcssDebit Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"alipay" Text -> Maybe SourceTypeAlipay -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAlipay
sourceAlipay Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Int
sourceAmount Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"au_becs_debit" Text -> Maybe SourceTypeAuBecsDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeAuBecsDebit
sourceAuBecsDebit Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bancontact" Text -> Maybe SourceTypeBancontact -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeBancontact
sourceBancontact Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"card" Text -> Maybe SourceTypeCard -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeCard
sourceCard Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"card_present" Text -> Maybe SourceTypeCardPresent -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeCardPresent
sourceCardPresent Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"client_secret" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceClientSecret Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"code_verification" Text -> Maybe SourceCodeVerificationFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceCodeVerificationFlow
sourceCodeVerification Source
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..= Source -> Int
sourceCreated Source
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..= Source -> Maybe Text
sourceCurrency Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceCustomer Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"eps" Text -> Maybe SourceTypeEps -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeEps
sourceEps Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"flow" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceFlow Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"giropay" Text -> Maybe SourceTypeGiropay -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeGiropay
sourceGiropay Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceId Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ideal" Text -> Maybe SourceTypeIdeal -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeIdeal
sourceIdeal Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"klarna" Text -> Maybe SourceTypeKlarna -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeKlarna
sourceKlarna Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Bool
sourceLivemode Source
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..= Source -> Maybe Object
sourceMetadata Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"multibanco" Text -> Maybe SourceTypeMultibanco -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeMultibanco
sourceMultibanco Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"owner" Text -> Maybe SourceOwner' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceOwner'
sourceOwner Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"p24" Text -> Maybe SourceTypeP24 -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeP24
sourceP24 Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"receiver" Text -> Maybe SourceReceiverFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceReceiverFlow
sourceReceiver Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"redirect" Text -> Maybe SourceRedirectFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceRedirectFlow
sourceRedirect Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"sepa_debit" Text -> Maybe SourceTypeSepaDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeSepaDebit
sourceSepaDebit Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"sofort" Text -> Maybe SourceTypeSofort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeSofort
sourceSofort Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"source_order" Text -> Maybe SourceOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceOrder
sourceSourceOrder Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"statement_descriptor" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceStatementDescriptor Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Text
sourceStatus Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"three_d_secure" Text -> Maybe SourceTypeThreeDSecure -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeThreeDSecure
sourceThreeDSecure Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> SourceType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> SourceType'
sourceType Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"usage" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe Text
sourceUsage Source
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"wechat" Text -> Maybe SourceTypeWechat -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Source -> Maybe SourceTypeWechat
sourceWechat Source
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
"source")))))))))))))))))))))))))))))))))))))

instance Data.Aeson.Types.FromJSON.FromJSON Source where
  parseJSON :: Value -> Parser Source
parseJSON = String -> (Object -> Parser Source) -> Value -> Parser Source
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Source" (\Object
obj -> ((((((((((((((((((((((((((((((((((((Maybe SourceTypeAchCreditTransfer
 -> Maybe SourceTypeAchDebit
 -> Maybe SourceTypeAcssDebit
 -> Maybe SourceTypeAlipay
 -> Maybe Int
 -> Maybe SourceTypeAuBecsDebit
 -> Maybe SourceTypeBancontact
 -> Maybe SourceTypeCard
 -> Maybe SourceTypeCardPresent
 -> Text
 -> Maybe SourceCodeVerificationFlow
 -> Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeEps
 -> Text
 -> Maybe SourceTypeGiropay
 -> Text
 -> Maybe SourceTypeIdeal
 -> Maybe SourceTypeKlarna
 -> Bool
 -> Maybe Object
 -> Maybe SourceTypeMultibanco
 -> Maybe SourceOwner'
 -> Maybe SourceTypeP24
 -> Maybe SourceReceiverFlow
 -> Maybe SourceRedirectFlow
 -> Maybe SourceTypeSepaDebit
 -> Maybe SourceTypeSofort
 -> Maybe SourceOrder
 -> Maybe Text
 -> Text
 -> Maybe SourceTypeThreeDSecure
 -> SourceType'
 -> Maybe Text
 -> Maybe SourceTypeWechat
 -> Source)
-> Parser
     (Maybe SourceTypeAchCreditTransfer
      -> Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe SourceTypeAchCreditTransfer
-> Maybe SourceTypeAchDebit
-> Maybe SourceTypeAcssDebit
-> Maybe SourceTypeAlipay
-> Maybe Int
-> Maybe SourceTypeAuBecsDebit
-> Maybe SourceTypeBancontact
-> Maybe SourceTypeCard
-> Maybe SourceTypeCardPresent
-> Text
-> Maybe SourceCodeVerificationFlow
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeEps
-> Text
-> Maybe SourceTypeGiropay
-> Text
-> Maybe SourceTypeIdeal
-> Maybe SourceTypeKlarna
-> Bool
-> Maybe Object
-> Maybe SourceTypeMultibanco
-> Maybe SourceOwner'
-> Maybe SourceTypeP24
-> Maybe SourceReceiverFlow
-> Maybe SourceRedirectFlow
-> Maybe SourceTypeSepaDebit
-> Maybe SourceTypeSofort
-> Maybe SourceOrder
-> Maybe Text
-> Text
-> Maybe SourceTypeThreeDSecure
-> SourceType'
-> Maybe Text
-> Maybe SourceTypeWechat
-> Source
Source Parser
  (Maybe SourceTypeAchCreditTransfer
   -> Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeAchCreditTransfer)
-> Parser
     (Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAchCreditTransfer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ach_credit_transfer")) Parser
  (Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeAchDebit)
-> Parser
     (Maybe SourceTypeAcssDebit
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAchDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ach_debit")) Parser
  (Maybe SourceTypeAcssDebit
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeAcssDebit)
-> Parser
     (Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAcssDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"acss_debit")) Parser
  (Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeAlipay)
-> Parser
     (Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAlipay)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"alipay")) Parser
  (Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe Int)
-> Parser
     (Maybe SourceTypeAuBecsDebit
      -> Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"amount")) Parser
  (Maybe SourceTypeAuBecsDebit
   -> Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeAuBecsDebit)
-> Parser
     (Maybe SourceTypeBancontact
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAuBecsDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"au_becs_debit")) Parser
  (Maybe SourceTypeBancontact
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeBancontact)
-> Parser
     (Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeBancontact)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bancontact")) Parser
  (Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeCard)
-> Parser
     (Maybe SourceTypeCardPresent
      -> Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeCard)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"card")) Parser
  (Maybe SourceTypeCardPresent
   -> Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeCardPresent)
-> Parser
     (Text
      -> Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeCardPresent)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"card_present")) Parser
  (Text
   -> Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Text
-> Parser
     (Maybe SourceCodeVerificationFlow
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"client_secret")) Parser
  (Maybe SourceCodeVerificationFlow
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceCodeVerificationFlow)
-> Parser
     (Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceCodeVerificationFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"code_verification")) Parser
  (Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Int
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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 Text
   -> Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeEps
      -> Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"customer")) Parser
  (Maybe SourceTypeEps
   -> Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeEps)
-> Parser
     (Text
      -> Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeEps)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"eps")) Parser
  (Text
   -> Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Text
-> Parser
     (Maybe SourceTypeGiropay
      -> Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"flow")) Parser
  (Maybe SourceTypeGiropay
   -> Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeGiropay)
-> Parser
     (Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeGiropay)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"giropay")) Parser
  (Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Text
-> Parser
     (Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"id")) Parser
  (Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeIdeal)
-> Parser
     (Maybe SourceTypeKlarna
      -> Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeIdeal)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ideal")) Parser
  (Maybe SourceTypeKlarna
   -> Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeKlarna)
-> Parser
     (Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeKlarna)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"klarna")) Parser
  (Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Bool
-> Parser
     (Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"livemode")) Parser
  (Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe Object)
-> Parser
     (Maybe SourceTypeMultibanco
      -> Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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 SourceTypeMultibanco
   -> Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeMultibanco)
-> Parser
     (Maybe SourceOwner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeMultibanco)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"multibanco")) Parser
  (Maybe SourceOwner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceOwner')
-> Parser
     (Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceOwner')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"owner")) Parser
  (Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeP24)
-> Parser
     (Maybe SourceReceiverFlow
      -> Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeP24)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"p24")) Parser
  (Maybe SourceReceiverFlow
   -> Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceReceiverFlow)
-> Parser
     (Maybe SourceRedirectFlow
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceReceiverFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"receiver")) Parser
  (Maybe SourceRedirectFlow
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceRedirectFlow)
-> Parser
     (Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceRedirectFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"redirect")) Parser
  (Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeSepaDebit)
-> Parser
     (Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeSepaDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"sepa_debit")) Parser
  (Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceTypeSofort)
-> Parser
     (Maybe SourceOrder
      -> Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeSofort)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"sofort")) Parser
  (Maybe SourceOrder
   -> Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe SourceOrder)
-> Parser
     (Maybe Text
      -> Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceOrder)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"source_order")) Parser
  (Maybe Text
   -> Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Maybe SourceTypeThreeDSecure
      -> SourceType'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> Source)
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
"statement_descriptor")) Parser
  (Text
   -> Maybe SourceTypeThreeDSecure
   -> SourceType'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> Source)
-> Parser Text
-> Parser
     (Maybe SourceTypeThreeDSecure
      -> SourceType' -> Maybe Text -> Maybe SourceTypeWechat -> Source)
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
"status")) Parser
  (Maybe SourceTypeThreeDSecure
   -> SourceType' -> Maybe Text -> Maybe SourceTypeWechat -> Source)
-> Parser (Maybe SourceTypeThreeDSecure)
-> Parser
     (SourceType' -> Maybe Text -> Maybe SourceTypeWechat -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeThreeDSecure)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"three_d_secure")) Parser
  (SourceType' -> Maybe Text -> Maybe SourceTypeWechat -> Source)
-> Parser SourceType'
-> Parser (Maybe Text -> Maybe SourceTypeWechat -> Source)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser SourceType'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"type")) Parser (Maybe Text -> Maybe SourceTypeWechat -> Source)
-> Parser (Maybe Text) -> Parser (Maybe SourceTypeWechat -> Source)
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
"usage")) Parser (Maybe SourceTypeWechat -> Source)
-> Parser (Maybe SourceTypeWechat) -> Parser Source
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeWechat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"wechat"))

-- | Create a new 'Source' with all required fields.
mkSource ::
  -- | 'sourceClientSecret'
  Data.Text.Internal.Text ->
  -- | 'sourceCreated'
  GHC.Types.Int ->
  -- | 'sourceFlow'
  Data.Text.Internal.Text ->
  -- | 'sourceId'
  Data.Text.Internal.Text ->
  -- | 'sourceLivemode'
  GHC.Types.Bool ->
  -- | 'sourceStatus'
  Data.Text.Internal.Text ->
  -- | 'sourceType'
  SourceType' ->
  Source
mkSource :: Text
-> Int -> Text -> Text -> Bool -> Text -> SourceType' -> Source
mkSource Text
sourceClientSecret Int
sourceCreated Text
sourceFlow Text
sourceId Bool
sourceLivemode Text
sourceStatus SourceType'
sourceType =
  Source :: Maybe SourceTypeAchCreditTransfer
-> Maybe SourceTypeAchDebit
-> Maybe SourceTypeAcssDebit
-> Maybe SourceTypeAlipay
-> Maybe Int
-> Maybe SourceTypeAuBecsDebit
-> Maybe SourceTypeBancontact
-> Maybe SourceTypeCard
-> Maybe SourceTypeCardPresent
-> Text
-> Maybe SourceCodeVerificationFlow
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeEps
-> Text
-> Maybe SourceTypeGiropay
-> Text
-> Maybe SourceTypeIdeal
-> Maybe SourceTypeKlarna
-> Bool
-> Maybe Object
-> Maybe SourceTypeMultibanco
-> Maybe SourceOwner'
-> Maybe SourceTypeP24
-> Maybe SourceReceiverFlow
-> Maybe SourceRedirectFlow
-> Maybe SourceTypeSepaDebit
-> Maybe SourceTypeSofort
-> Maybe SourceOrder
-> Maybe Text
-> Text
-> Maybe SourceTypeThreeDSecure
-> SourceType'
-> Maybe Text
-> Maybe SourceTypeWechat
-> Source
Source
    { sourceAchCreditTransfer :: Maybe SourceTypeAchCreditTransfer
sourceAchCreditTransfer = Maybe SourceTypeAchCreditTransfer
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceAchDebit :: Maybe SourceTypeAchDebit
sourceAchDebit = Maybe SourceTypeAchDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceAcssDebit :: Maybe SourceTypeAcssDebit
sourceAcssDebit = Maybe SourceTypeAcssDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceAlipay :: Maybe SourceTypeAlipay
sourceAlipay = Maybe SourceTypeAlipay
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceAmount :: Maybe Int
sourceAmount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceAuBecsDebit :: Maybe SourceTypeAuBecsDebit
sourceAuBecsDebit = Maybe SourceTypeAuBecsDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceBancontact :: Maybe SourceTypeBancontact
sourceBancontact = Maybe SourceTypeBancontact
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceCard :: Maybe SourceTypeCard
sourceCard = Maybe SourceTypeCard
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceCardPresent :: Maybe SourceTypeCardPresent
sourceCardPresent = Maybe SourceTypeCardPresent
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceClientSecret :: Text
sourceClientSecret = Text
sourceClientSecret,
      sourceCodeVerification :: Maybe SourceCodeVerificationFlow
sourceCodeVerification = Maybe SourceCodeVerificationFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceCreated :: Int
sourceCreated = Int
sourceCreated,
      sourceCurrency :: Maybe Text
sourceCurrency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceCustomer :: Maybe Text
sourceCustomer = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceEps :: Maybe SourceTypeEps
sourceEps = Maybe SourceTypeEps
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceFlow :: Text
sourceFlow = Text
sourceFlow,
      sourceGiropay :: Maybe SourceTypeGiropay
sourceGiropay = Maybe SourceTypeGiropay
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceId :: Text
sourceId = Text
sourceId,
      sourceIdeal :: Maybe SourceTypeIdeal
sourceIdeal = Maybe SourceTypeIdeal
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceKlarna :: Maybe SourceTypeKlarna
sourceKlarna = Maybe SourceTypeKlarna
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceLivemode :: Bool
sourceLivemode = Bool
sourceLivemode,
      sourceMetadata :: Maybe Object
sourceMetadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceMultibanco :: Maybe SourceTypeMultibanco
sourceMultibanco = Maybe SourceTypeMultibanco
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner :: Maybe SourceOwner'
sourceOwner = Maybe SourceOwner'
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceP24 :: Maybe SourceTypeP24
sourceP24 = Maybe SourceTypeP24
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceReceiver :: Maybe SourceReceiverFlow
sourceReceiver = Maybe SourceReceiverFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceRedirect :: Maybe SourceRedirectFlow
sourceRedirect = Maybe SourceRedirectFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceSepaDebit :: Maybe SourceTypeSepaDebit
sourceSepaDebit = Maybe SourceTypeSepaDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceSofort :: Maybe SourceTypeSofort
sourceSofort = Maybe SourceTypeSofort
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceSourceOrder :: Maybe SourceOrder
sourceSourceOrder = Maybe SourceOrder
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceStatementDescriptor :: Maybe Text
sourceStatementDescriptor = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceStatus :: Text
sourceStatus = Text
sourceStatus,
      sourceThreeDSecure :: Maybe SourceTypeThreeDSecure
sourceThreeDSecure = Maybe SourceTypeThreeDSecure
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceType :: SourceType'
sourceType = SourceType'
sourceType,
      sourceUsage :: Maybe Text
sourceUsage = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceWechat :: Maybe SourceTypeWechat
sourceWechat = Maybe SourceTypeWechat
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.source.properties.owner.anyOf@ in the specification.
--
-- Information about the owner of the payment instrument that may be used or required by particular source types.
data SourceOwner' = SourceOwner'
  { -- | address: Owner\'s address.
    SourceOwner' -> Maybe SourceOwner'Address'
sourceOwner'Address :: (GHC.Maybe.Maybe SourceOwner'Address'),
    -- | email: Owner\'s email address.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | name: Owner\'s full name.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | phone: Owner\'s phone number (including extension).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_address: Verified owner\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    SourceOwner' -> Maybe SourceOwner'VerifiedAddress'
sourceOwner'VerifiedAddress :: (GHC.Maybe.Maybe SourceOwner'VerifiedAddress'),
    -- | verified_email: Verified owner\'s email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'VerifiedEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_name: Verified owner\'s full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'VerifiedName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_phone: Verified owner\'s phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner' -> Maybe Text
sourceOwner'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> SourceOwner' -> ShowS
[SourceOwner'] -> ShowS
SourceOwner' -> String
(Int -> SourceOwner' -> ShowS)
-> (SourceOwner' -> String)
-> ([SourceOwner'] -> ShowS)
-> Show SourceOwner'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceOwner'] -> ShowS
$cshowList :: [SourceOwner'] -> ShowS
show :: SourceOwner' -> String
$cshow :: SourceOwner' -> String
showsPrec :: Int -> SourceOwner' -> ShowS
$cshowsPrec :: Int -> SourceOwner' -> ShowS
GHC.Show.Show,
      SourceOwner' -> SourceOwner' -> Bool
(SourceOwner' -> SourceOwner' -> Bool)
-> (SourceOwner' -> SourceOwner' -> Bool) -> Eq SourceOwner'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceOwner' -> SourceOwner' -> Bool
$c/= :: SourceOwner' -> SourceOwner' -> Bool
== :: SourceOwner' -> SourceOwner' -> Bool
$c== :: SourceOwner' -> SourceOwner' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON SourceOwner' where
  toJSON :: SourceOwner' -> Value
toJSON SourceOwner'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"address" Text -> Maybe SourceOwner'Address' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe SourceOwner'Address'
sourceOwner'Address SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'Email SourceOwner'
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..= SourceOwner' -> Maybe Text
sourceOwner'Name SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'Phone SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_address" Text -> Maybe SourceOwner'VerifiedAddress' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe SourceOwner'VerifiedAddress'
sourceOwner'VerifiedAddress SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedEmail SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedName SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedPhone SourceOwner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: SourceOwner' -> Encoding
toEncoding SourceOwner'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"address" Text -> Maybe SourceOwner'Address' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe SourceOwner'Address'
sourceOwner'Address SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'Email SourceOwner'
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..= SourceOwner' -> Maybe Text
sourceOwner'Name SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'Phone SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_address" Text -> Maybe SourceOwner'VerifiedAddress' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe SourceOwner'VerifiedAddress'
sourceOwner'VerifiedAddress SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedEmail SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedName SourceOwner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verified_phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner' -> Maybe Text
sourceOwner'VerifiedPhone SourceOwner'
obj))))))))

instance Data.Aeson.Types.FromJSON.FromJSON SourceOwner' where
  parseJSON :: Value -> Parser SourceOwner'
parseJSON = String
-> (Object -> Parser SourceOwner') -> Value -> Parser SourceOwner'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SourceOwner'" (\Object
obj -> ((((((((Maybe SourceOwner'Address'
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceOwner'VerifiedAddress'
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> SourceOwner')
-> Parser
     (Maybe SourceOwner'Address'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceOwner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe SourceOwner'Address'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceOwner'VerifiedAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'
SourceOwner' Parser
  (Maybe SourceOwner'Address'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceOwner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner')
-> Parser (Maybe SourceOwner'Address')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceOwner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceOwner'Address')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceOwner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceOwner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner')
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
"email")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceOwner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceOwner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner')
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 Text
   -> Maybe SourceOwner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceOwner'VerifiedAddress'
      -> Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner')
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
"phone")) Parser
  (Maybe SourceOwner'VerifiedAddress'
   -> Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner')
-> Parser (Maybe SourceOwner'VerifiedAddress')
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceOwner'VerifiedAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_address")) Parser (Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SourceOwner')
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
"verified_email")) Parser (Maybe Text -> Maybe Text -> SourceOwner')
-> Parser (Maybe Text) -> Parser (Maybe Text -> SourceOwner')
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
"verified_name")) Parser (Maybe Text -> SourceOwner')
-> Parser (Maybe Text) -> Parser SourceOwner'
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
"verified_phone"))

-- | Create a new 'SourceOwner'' with all required fields.
mkSourceOwner' :: SourceOwner'
mkSourceOwner' :: SourceOwner'
mkSourceOwner' =
  SourceOwner' :: Maybe SourceOwner'Address'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceOwner'VerifiedAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'
SourceOwner'
    { sourceOwner'Address :: Maybe SourceOwner'Address'
sourceOwner'Address = Maybe SourceOwner'Address'
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Email :: Maybe Text
sourceOwner'Email = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Name :: Maybe Text
sourceOwner'Name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Phone :: Maybe Text
sourceOwner'Phone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress :: Maybe SourceOwner'VerifiedAddress'
sourceOwner'VerifiedAddress = Maybe SourceOwner'VerifiedAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedEmail :: Maybe Text
sourceOwner'VerifiedEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedName :: Maybe Text
sourceOwner'VerifiedName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedPhone :: Maybe Text
sourceOwner'VerifiedPhone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.source.properties.owner.anyOf.properties.address.anyOf@ in the specification.
--
-- Owner\\\'s address.
data SourceOwner'Address' = SourceOwner'Address'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'Address' -> Maybe Text
sourceOwner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> SourceOwner'Address' -> ShowS
[SourceOwner'Address'] -> ShowS
SourceOwner'Address' -> String
(Int -> SourceOwner'Address' -> ShowS)
-> (SourceOwner'Address' -> String)
-> ([SourceOwner'Address'] -> ShowS)
-> Show SourceOwner'Address'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceOwner'Address'] -> ShowS
$cshowList :: [SourceOwner'Address'] -> ShowS
show :: SourceOwner'Address' -> String
$cshow :: SourceOwner'Address' -> String
showsPrec :: Int -> SourceOwner'Address' -> ShowS
$cshowsPrec :: Int -> SourceOwner'Address' -> ShowS
GHC.Show.Show,
      SourceOwner'Address' -> SourceOwner'Address' -> Bool
(SourceOwner'Address' -> SourceOwner'Address' -> Bool)
-> (SourceOwner'Address' -> SourceOwner'Address' -> Bool)
-> Eq SourceOwner'Address'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceOwner'Address' -> SourceOwner'Address' -> Bool
$c/= :: SourceOwner'Address' -> SourceOwner'Address' -> Bool
== :: SourceOwner'Address' -> SourceOwner'Address' -> Bool
$c== :: SourceOwner'Address' -> SourceOwner'Address' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON SourceOwner'Address' where
  toJSON :: SourceOwner'Address' -> Value
toJSON SourceOwner'Address'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'City SourceOwner'Address'
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..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Country SourceOwner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line1 SourceOwner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line2 SourceOwner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'PostalCode SourceOwner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'State SourceOwner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: SourceOwner'Address' -> Encoding
toEncoding SourceOwner'Address'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'City SourceOwner'Address'
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..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Country SourceOwner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line1 SourceOwner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'Line2 SourceOwner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'PostalCode SourceOwner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'Address' -> Maybe Text
sourceOwner'Address'State SourceOwner'Address'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON SourceOwner'Address' where
  parseJSON :: Value -> Parser SourceOwner'Address'
parseJSON = String
-> (Object -> Parser SourceOwner'Address')
-> Value
-> Parser SourceOwner'Address'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SourceOwner'Address'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> SourceOwner'Address')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner'Address')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'Address'
SourceOwner'Address' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner'Address')
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
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner'Address')
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 Text -> Maybe Text -> Maybe Text -> SourceOwner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner'Address')
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
"line1")) Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> SourceOwner'Address')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SourceOwner'Address')
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
"line2")) Parser (Maybe Text -> Maybe Text -> SourceOwner'Address')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SourceOwner'Address')
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
"postal_code")) Parser (Maybe Text -> SourceOwner'Address')
-> Parser (Maybe Text) -> Parser SourceOwner'Address'
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
"state"))

-- | Create a new 'SourceOwner'Address'' with all required fields.
mkSourceOwner'Address' :: SourceOwner'Address'
mkSourceOwner'Address' :: SourceOwner'Address'
mkSourceOwner'Address' =
  SourceOwner'Address' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'Address'
SourceOwner'Address'
    { sourceOwner'Address'City :: Maybe Text
sourceOwner'Address'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Address'Country :: Maybe Text
sourceOwner'Address'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Address'Line1 :: Maybe Text
sourceOwner'Address'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Address'Line2 :: Maybe Text
sourceOwner'Address'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Address'PostalCode :: Maybe Text
sourceOwner'Address'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'Address'State :: Maybe Text
sourceOwner'Address'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.source.properties.owner.anyOf.properties.verified_address.anyOf@ in the specification.
--
-- Verified owner\\\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
data SourceOwner'VerifiedAddress' = SourceOwner'VerifiedAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> SourceOwner'VerifiedAddress' -> ShowS
[SourceOwner'VerifiedAddress'] -> ShowS
SourceOwner'VerifiedAddress' -> String
(Int -> SourceOwner'VerifiedAddress' -> ShowS)
-> (SourceOwner'VerifiedAddress' -> String)
-> ([SourceOwner'VerifiedAddress'] -> ShowS)
-> Show SourceOwner'VerifiedAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceOwner'VerifiedAddress'] -> ShowS
$cshowList :: [SourceOwner'VerifiedAddress'] -> ShowS
show :: SourceOwner'VerifiedAddress' -> String
$cshow :: SourceOwner'VerifiedAddress' -> String
showsPrec :: Int -> SourceOwner'VerifiedAddress' -> ShowS
$cshowsPrec :: Int -> SourceOwner'VerifiedAddress' -> ShowS
GHC.Show.Show,
      SourceOwner'VerifiedAddress'
-> SourceOwner'VerifiedAddress' -> Bool
(SourceOwner'VerifiedAddress'
 -> SourceOwner'VerifiedAddress' -> Bool)
-> (SourceOwner'VerifiedAddress'
    -> SourceOwner'VerifiedAddress' -> Bool)
-> Eq SourceOwner'VerifiedAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceOwner'VerifiedAddress'
-> SourceOwner'VerifiedAddress' -> Bool
$c/= :: SourceOwner'VerifiedAddress'
-> SourceOwner'VerifiedAddress' -> Bool
== :: SourceOwner'VerifiedAddress'
-> SourceOwner'VerifiedAddress' -> Bool
$c== :: SourceOwner'VerifiedAddress'
-> SourceOwner'VerifiedAddress' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON SourceOwner'VerifiedAddress' where
  toJSON :: SourceOwner'VerifiedAddress' -> Value
toJSON SourceOwner'VerifiedAddress'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'City SourceOwner'VerifiedAddress'
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..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Country SourceOwner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line1 SourceOwner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line2 SourceOwner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'PostalCode SourceOwner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'State SourceOwner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: SourceOwner'VerifiedAddress' -> Encoding
toEncoding SourceOwner'VerifiedAddress'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'City SourceOwner'VerifiedAddress'
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..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Country SourceOwner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line1 SourceOwner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'Line2 SourceOwner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'PostalCode SourceOwner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= SourceOwner'VerifiedAddress' -> Maybe Text
sourceOwner'VerifiedAddress'State SourceOwner'VerifiedAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON SourceOwner'VerifiedAddress' where
  parseJSON :: Value -> Parser SourceOwner'VerifiedAddress'
parseJSON = String
-> (Object -> Parser SourceOwner'VerifiedAddress')
-> Value
-> Parser SourceOwner'VerifiedAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"SourceOwner'VerifiedAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> SourceOwner'VerifiedAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner'VerifiedAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'VerifiedAddress'
SourceOwner'VerifiedAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner'VerifiedAddress')
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
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SourceOwner'VerifiedAddress')
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 Text
   -> Maybe Text
   -> Maybe Text
   -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> SourceOwner'VerifiedAddress')
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
"line1")) Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> SourceOwner'VerifiedAddress')
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
"line2")) Parser (Maybe Text -> Maybe Text -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SourceOwner'VerifiedAddress')
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
"postal_code")) Parser (Maybe Text -> SourceOwner'VerifiedAddress')
-> Parser (Maybe Text) -> Parser SourceOwner'VerifiedAddress'
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
"state"))

-- | Create a new 'SourceOwner'VerifiedAddress'' with all required fields.
mkSourceOwner'VerifiedAddress' :: SourceOwner'VerifiedAddress'
mkSourceOwner'VerifiedAddress' :: SourceOwner'VerifiedAddress'
mkSourceOwner'VerifiedAddress' =
  SourceOwner'VerifiedAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SourceOwner'VerifiedAddress'
SourceOwner'VerifiedAddress'
    { sourceOwner'VerifiedAddress'City :: Maybe Text
sourceOwner'VerifiedAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress'Country :: Maybe Text
sourceOwner'VerifiedAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress'Line1 :: Maybe Text
sourceOwner'VerifiedAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress'Line2 :: Maybe Text
sourceOwner'VerifiedAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress'PostalCode :: Maybe Text
sourceOwner'VerifiedAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      sourceOwner'VerifiedAddress'State :: Maybe Text
sourceOwner'VerifiedAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the enum schema located at @components.schemas.source.properties.type@ in the specification.
--
-- The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used.
data SourceType'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    SourceType'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    SourceType'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"ach_credit_transfer"@
    SourceType'EnumAchCreditTransfer
  | -- | Represents the JSON value @"ach_debit"@
    SourceType'EnumAchDebit
  | -- | Represents the JSON value @"acss_debit"@
    SourceType'EnumAcssDebit
  | -- | Represents the JSON value @"alipay"@
    SourceType'EnumAlipay
  | -- | Represents the JSON value @"au_becs_debit"@
    SourceType'EnumAuBecsDebit
  | -- | Represents the JSON value @"bancontact"@
    SourceType'EnumBancontact
  | -- | Represents the JSON value @"card"@
    SourceType'EnumCard
  | -- | Represents the JSON value @"card_present"@
    SourceType'EnumCardPresent
  | -- | Represents the JSON value @"eps"@
    SourceType'EnumEps
  | -- | Represents the JSON value @"giropay"@
    SourceType'EnumGiropay
  | -- | Represents the JSON value @"ideal"@
    SourceType'EnumIdeal
  | -- | Represents the JSON value @"klarna"@
    SourceType'EnumKlarna
  | -- | Represents the JSON value @"multibanco"@
    SourceType'EnumMultibanco
  | -- | Represents the JSON value @"p24"@
    SourceType'EnumP24
  | -- | Represents the JSON value @"sepa_debit"@
    SourceType'EnumSepaDebit
  | -- | Represents the JSON value @"sofort"@
    SourceType'EnumSofort
  | -- | Represents the JSON value @"three_d_secure"@
    SourceType'EnumThreeDSecure
  | -- | Represents the JSON value @"wechat"@
    SourceType'EnumWechat
  deriving (Int -> SourceType' -> ShowS
[SourceType'] -> ShowS
SourceType' -> String
(Int -> SourceType' -> ShowS)
-> (SourceType' -> String)
-> ([SourceType'] -> ShowS)
-> Show SourceType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceType'] -> ShowS
$cshowList :: [SourceType'] -> ShowS
show :: SourceType' -> String
$cshow :: SourceType' -> String
showsPrec :: Int -> SourceType' -> ShowS
$cshowsPrec :: Int -> SourceType' -> ShowS
GHC.Show.Show, SourceType' -> SourceType' -> Bool
(SourceType' -> SourceType' -> Bool)
-> (SourceType' -> SourceType' -> Bool) -> Eq SourceType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceType' -> SourceType' -> Bool
$c/= :: SourceType' -> SourceType' -> Bool
== :: SourceType' -> SourceType' -> Bool
$c== :: SourceType' -> SourceType' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON SourceType' where
  toJSON :: SourceType' -> Value
toJSON (SourceType'Other Value
val) = Value
val
  toJSON (SourceType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (SourceType'
SourceType'EnumAchCreditTransfer) = Value
"ach_credit_transfer"
  toJSON (SourceType'
SourceType'EnumAchDebit) = Value
"ach_debit"
  toJSON (SourceType'
SourceType'EnumAcssDebit) = Value
"acss_debit"
  toJSON (SourceType'
SourceType'EnumAlipay) = Value
"alipay"
  toJSON (SourceType'
SourceType'EnumAuBecsDebit) = Value
"au_becs_debit"
  toJSON (SourceType'
SourceType'EnumBancontact) = Value
"bancontact"
  toJSON (SourceType'
SourceType'EnumCard) = Value
"card"
  toJSON (SourceType'
SourceType'EnumCardPresent) = Value
"card_present"
  toJSON (SourceType'
SourceType'EnumEps) = Value
"eps"
  toJSON (SourceType'
SourceType'EnumGiropay) = Value
"giropay"
  toJSON (SourceType'
SourceType'EnumIdeal) = Value
"ideal"
  toJSON (SourceType'
SourceType'EnumKlarna) = Value
"klarna"
  toJSON (SourceType'
SourceType'EnumMultibanco) = Value
"multibanco"
  toJSON (SourceType'
SourceType'EnumP24) = Value
"p24"
  toJSON (SourceType'
SourceType'EnumSepaDebit) = Value
"sepa_debit"
  toJSON (SourceType'
SourceType'EnumSofort) = Value
"sofort"
  toJSON (SourceType'
SourceType'EnumThreeDSecure) = Value
"three_d_secure"
  toJSON (SourceType'
SourceType'EnumWechat) = Value
"wechat"

instance Data.Aeson.Types.FromJSON.FromJSON SourceType' where
  parseJSON :: Value -> Parser SourceType'
parseJSON Value
val =
    SourceType' -> Parser SourceType'
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
"ach_credit_transfer" -> SourceType'
SourceType'EnumAchCreditTransfer
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ach_debit" -> SourceType'
SourceType'EnumAchDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"acss_debit" -> SourceType'
SourceType'EnumAcssDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"alipay" -> SourceType'
SourceType'EnumAlipay
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"au_becs_debit" -> SourceType'
SourceType'EnumAuBecsDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"bancontact" -> SourceType'
SourceType'EnumBancontact
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card" -> SourceType'
SourceType'EnumCard
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card_present" -> SourceType'
SourceType'EnumCardPresent
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"eps" -> SourceType'
SourceType'EnumEps
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"giropay" -> SourceType'
SourceType'EnumGiropay
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ideal" -> SourceType'
SourceType'EnumIdeal
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"klarna" -> SourceType'
SourceType'EnumKlarna
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"multibanco" -> SourceType'
SourceType'EnumMultibanco
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"p24" -> SourceType'
SourceType'EnumP24
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sepa_debit" -> SourceType'
SourceType'EnumSepaDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sofort" -> SourceType'
SourceType'EnumSofort
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"three_d_secure" -> SourceType'
SourceType'EnumThreeDSecure
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"wechat" -> SourceType'
SourceType'EnumWechat
            | Bool
GHC.Base.otherwise -> Value -> SourceType'
SourceType'Other Value
val
      )