{-# LANGUAGE ExplicitForAll #-} {-# 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 different functions to run the operation postCustomersCustomerSourcesId module StripeAPI.Operations.PostCustomersCustomerSourcesId where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader 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.Either 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 Data.Vector import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified Network.HTTP.Client import qualified Network.HTTP.Client as Network.HTTP.Client.Request import qualified Network.HTTP.Client as Network.HTTP.Client.Types import qualified Network.HTTP.Simple import qualified Network.HTTP.Types import qualified Network.HTTP.Types as Network.HTTP.Types.Status import qualified Network.HTTP.Types as Network.HTTP.Types.URI import qualified StripeAPI.Common import StripeAPI.Types import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | > POST /v1/customers/{customer}/sources/{id} -- -- \

Update a specified source for a given customer.\<\/p> postCustomersCustomerSourcesId :: forall m. StripeAPI.Common.MonadHTTP m => -- | Contains all available parameters of this operation (query and path parameters) PostCustomersCustomerSourcesIdParameters -> -- | The request body to send GHC.Maybe.Maybe PostCustomersCustomerSourcesIdRequestBody -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostCustomersCustomerSourcesIdResponse) postCustomersCustomerSourcesId parameters body = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either PostCustomersCustomerSourcesIdResponseError GHC.Base.id GHC.Base.. ( \response body -> if | (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 200) (Network.HTTP.Client.Types.responseStatus response) -> PostCustomersCustomerSourcesIdResponse200 Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String PostCustomersCustomerSourcesIdResponseBody200 ) | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> PostCustomersCustomerSourcesIdResponseDefault Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Error ) | GHC.Base.otherwise -> Data.Either.Left "Missing default response type" ) response_0 ) response_0 ) (StripeAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack ("/v1/customers/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ StripeAPI.Common.stringifyModel (postCustomersCustomerSourcesIdParametersPathCustomer parameters))) GHC.Base.++ ("/sources/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ StripeAPI.Common.stringifyModel (postCustomersCustomerSourcesIdParametersPathId parameters))) GHC.Base.++ ""))))) GHC.Base.mempty body StripeAPI.Common.RequestBodyEncodingFormData) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.parameters@ in the specification. data PostCustomersCustomerSourcesIdParameters = PostCustomersCustomerSourcesIdParameters { -- | pathCustomer: Represents the parameter named \'customer\' -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdParametersPathCustomer :: Data.Text.Internal.Text, -- | pathId: Represents the parameter named \'id\' -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdParametersPathId :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdParameters where toJSON obj = Data.Aeson.Types.Internal.object ("pathCustomer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdParametersPathCustomer obj : "pathId" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdParametersPathId obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("pathCustomer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdParametersPathCustomer obj) GHC.Base.<> ("pathId" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdParametersPathId obj)) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdParameters where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdParameters" (\obj -> (GHC.Base.pure PostCustomersCustomerSourcesIdParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathCustomer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathId")) -- | Create a new 'PostCustomersCustomerSourcesIdParameters' with all required fields. mkPostCustomersCustomerSourcesIdParameters :: -- | 'postCustomersCustomerSourcesIdParametersPathCustomer' Data.Text.Internal.Text -> -- | 'postCustomersCustomerSourcesIdParametersPathId' Data.Text.Internal.Text -> PostCustomersCustomerSourcesIdParameters mkPostCustomersCustomerSourcesIdParameters postCustomersCustomerSourcesIdParametersPathCustomer postCustomersCustomerSourcesIdParametersPathId = PostCustomersCustomerSourcesIdParameters { postCustomersCustomerSourcesIdParametersPathCustomer = postCustomersCustomerSourcesIdParametersPathCustomer, postCustomersCustomerSourcesIdParametersPathId = postCustomersCustomerSourcesIdParametersPathId } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification. data PostCustomersCustomerSourcesIdRequestBody = PostCustomersCustomerSourcesIdRequestBody { -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | account_holder_type: The type of entity that holds the account. This can be either \`individual\` or \`company\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAccountHolderType :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_country: Billing address country, if provided when creating card. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line1: Address line 1 (Street address\/PO Box\/Company name). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyAddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | exp_month: Two digit number representing the card’s expiration month. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyExpMonth :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | exp_year: Four digit number representing the card’s expiration year. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyExpYear :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | expand: Specifies which fields in the response should be expanded. postCustomersCustomerSourcesIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])), -- | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to \`metadata\`. postCustomersCustomerSourcesIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdRequestBodyMetadata'Variants), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | owner postCustomersCustomerSourcesIdRequestBodyOwner :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdRequestBodyOwner') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdRequestBody where toJSON obj = Data.Aeson.Types.Internal.object ("account_holder_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAccountHolderType obj : "address_city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressCity obj : "address_country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressCountry obj : "address_line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressLine1 obj : "address_line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressLine2 obj : "address_state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressState obj : "address_zip" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressZip obj : "exp_month" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpMonth obj : "exp_year" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpYear obj : "expand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpand obj : "metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyMetadata obj : "name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyName obj : "owner" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account_holder_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAccountHolderType obj) GHC.Base.<> (("address_city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressCity obj) GHC.Base.<> (("address_country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressCountry obj) GHC.Base.<> (("address_line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressLine1 obj) GHC.Base.<> (("address_line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressLine2 obj) GHC.Base.<> (("address_state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressState obj) GHC.Base.<> (("address_zip" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyAddressZip obj) GHC.Base.<> (("exp_month" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpMonth obj) GHC.Base.<> (("exp_year" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpYear obj) GHC.Base.<> (("expand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyExpand obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyMetadata obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyName obj) GHC.Base.<> ("owner" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner obj)))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdRequestBody where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdRequestBody" (\obj -> (((((((((((((GHC.Base.pure PostCustomersCustomerSourcesIdRequestBody GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_state")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_month")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_year")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "expand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "owner")) -- | Create a new 'PostCustomersCustomerSourcesIdRequestBody' with all required fields. mkPostCustomersCustomerSourcesIdRequestBody :: PostCustomersCustomerSourcesIdRequestBody mkPostCustomersCustomerSourcesIdRequestBody = PostCustomersCustomerSourcesIdRequestBody { postCustomersCustomerSourcesIdRequestBodyAccountHolderName = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAccountHolderType = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressCity = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressCountry = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressLine1 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressLine2 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressState = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyAddressZip = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyExpMonth = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyExpYear = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyExpand = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyMetadata = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyName = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner = GHC.Maybe.Nothing } -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.account_holder_type@ in the specification. -- -- The type of entity that holds the account. This can be either \`individual\` or \`company\`. data PostCustomersCustomerSourcesIdRequestBodyAccountHolderType' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'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. PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"company"@ PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumCompany | -- | Represents the JSON value @"individual"@ PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumIndividual deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdRequestBodyAccountHolderType' where toJSON (PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'Other val) = val toJSON (PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumCompany) = "company" toJSON (PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumIndividual) = "individual" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdRequestBodyAccountHolderType' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "company" -> PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumCompany | val GHC.Classes.== "individual" -> PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'EnumIndividual | GHC.Base.otherwise -> PostCustomersCustomerSourcesIdRequestBodyAccountHolderType'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.metadata.anyOf@ in the specification. -- -- 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to \`metadata\`. data PostCustomersCustomerSourcesIdRequestBodyMetadata'Variants = -- | Represents the JSON value @""@ PostCustomersCustomerSourcesIdRequestBodyMetadata'EmptyString | PostCustomersCustomerSourcesIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdRequestBodyMetadata'Variants where toJSON (PostCustomersCustomerSourcesIdRequestBodyMetadata'Object a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSourcesIdRequestBodyMetadata'EmptyString) = "" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdRequestBodyMetadata'Variants where parseJSON val = if | val GHC.Classes.== "" -> GHC.Base.pure PostCustomersCustomerSourcesIdRequestBodyMetadata'EmptyString | GHC.Base.otherwise -> case (PostCustomersCustomerSourcesIdRequestBodyMetadata'Object Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched" of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.owner@ in the specification. data PostCustomersCustomerSourcesIdRequestBodyOwner' = PostCustomersCustomerSourcesIdRequestBodyOwner' { -- | address postCustomersCustomerSourcesIdRequestBodyOwner'Address :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdRequestBodyOwner'Address'), -- | email postCustomersCustomerSourcesIdRequestBodyOwner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdRequestBodyOwner' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address obj : "email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Email obj : "name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Name obj : "phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Phone obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Name obj) GHC.Base.<> ("phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Phone obj)))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdRequestBodyOwner' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdRequestBodyOwner'" (\obj -> (((GHC.Base.pure PostCustomersCustomerSourcesIdRequestBodyOwner' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) -- | Create a new 'PostCustomersCustomerSourcesIdRequestBodyOwner'' with all required fields. mkPostCustomersCustomerSourcesIdRequestBodyOwner' :: PostCustomersCustomerSourcesIdRequestBodyOwner' mkPostCustomersCustomerSourcesIdRequestBodyOwner' = PostCustomersCustomerSourcesIdRequestBodyOwner' { postCustomersCustomerSourcesIdRequestBodyOwner'Address = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Email = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Name = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Phone = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.owner.properties.address@ in the specification. data PostCustomersCustomerSourcesIdRequestBodyOwner'Address' = PostCustomersCustomerSourcesIdRequestBodyOwner'Address' { -- | city -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line1 -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | line2 -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdRequestBodyOwner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdRequestBodyOwner'Address' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'City obj : "country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdRequestBodyOwner'Address'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdRequestBodyOwner'Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdRequestBodyOwner'Address'" (\obj -> (((((GHC.Base.pure PostCustomersCustomerSourcesIdRequestBodyOwner'Address' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "state")) -- | Create a new 'PostCustomersCustomerSourcesIdRequestBodyOwner'Address'' with all required fields. mkPostCustomersCustomerSourcesIdRequestBodyOwner'Address' :: PostCustomersCustomerSourcesIdRequestBodyOwner'Address' mkPostCustomersCustomerSourcesIdRequestBodyOwner'Address' = PostCustomersCustomerSourcesIdRequestBodyOwner'Address' { postCustomersCustomerSourcesIdRequestBodyOwner'Address'City = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Address'Country = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line1 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Address'Line2 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Address'PostalCode = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdRequestBodyOwner'Address'State = GHC.Maybe.Nothing } -- | Represents a response of the operation 'postCustomersCustomerSourcesId'. -- -- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'PostCustomersCustomerSourcesIdResponseError' is used. data PostCustomersCustomerSourcesIdResponse = -- | Means either no matching case available or a parse error PostCustomersCustomerSourcesIdResponseError GHC.Base.String | -- | Successful response. PostCustomersCustomerSourcesIdResponse200 PostCustomersCustomerSourcesIdResponseBody200 | -- | Error response. PostCustomersCustomerSourcesIdResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf@ in the specification. data PostCustomersCustomerSourcesIdResponseBody200 = PostCustomersCustomerSourcesIdResponseBody200 { -- | account: The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. postCustomersCustomerSourcesIdResponseBody200Account :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Account'Variants), -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | account_holder_type: The type of entity that holds the account. This can be either \`individual\` or \`company\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ach_credit_transfer postCustomersCustomerSourcesIdResponseBody200AchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer), -- | ach_debit postCustomersCustomerSourcesIdResponseBody200AchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit), -- | acss_debit postCustomersCustomerSourcesIdResponseBody200AcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_country: Billing address country, if provided when creating card. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line1: Address line 1 (Street address\/PO Box\/Company name). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line1_check: If \`address_line1\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip_check: If \`address_zip\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200AddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | alipay postCustomersCustomerSourcesIdResponseBody200Alipay :: (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. postCustomersCustomerSourcesIdResponseBody200Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | au_becs_debit postCustomersCustomerSourcesIdResponseBody200AuBecsDebit :: (GHC.Maybe.Maybe SourceTypeAuBecsDebit), -- | available_payout_methods: A set of available payout methods for this card. Only values from this set should be passed as the \`method\` when creating a payout. postCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods :: (GHC.Maybe.Maybe ([PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'])), -- | bancontact postCustomersCustomerSourcesIdResponseBody200Bancontact :: (GHC.Maybe.Maybe SourceTypeBancontact), -- | bank_name: Name of the bank associated with the routing number (e.g., \`WELLS FARGO\`). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200BankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | brand: Card brand. Can be \`American Express\`, \`Diners Club\`, \`Discover\`, \`JCB\`, \`MasterCard\`, \`UnionPay\`, \`Visa\`, or \`Unknown\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | card postCustomersCustomerSourcesIdResponseBody200Card :: (GHC.Maybe.Maybe SourceTypeCard), -- | card_present postCustomersCustomerSourcesIdResponseBody200CardPresent :: (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 postCustomersCustomerSourcesIdResponseBody200ClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | code_verification: postCustomersCustomerSourcesIdResponseBody200CodeVerification :: (GHC.Maybe.Maybe SourceCodeVerificationFlow), -- | country: Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you\'ve collected. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. postCustomersCustomerSourcesIdResponseBody200Created :: (GHC.Maybe.Maybe GHC.Types.Int), -- | currency: Three-letter [ISO code for currency](https:\/\/stripe.com\/docs\/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. postCustomersCustomerSourcesIdResponseBody200Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. postCustomersCustomerSourcesIdResponseBody200Customer :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Customer'Variants), -- | cvc_check: If a CVC was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. A result of unchecked indicates that CVC was provided but hasn\'t been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https:\/\/support.stripe.com\/questions\/check-if-a-card-is-valid-without-a-charge). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200CvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | default_for_currency: Whether this card is the default external account for its currency. postCustomersCustomerSourcesIdResponseBody200DefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | dynamic_last4: (For tokenized numbers only.) The last four digits of the device account number. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200DynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | eps postCustomersCustomerSourcesIdResponseBody200Eps :: (GHC.Maybe.Maybe SourceTypeEps), -- | exp_month: Two-digit number representing the card\'s expiration month. postCustomersCustomerSourcesIdResponseBody200ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int), -- | exp_year: Four-digit number representing the card\'s expiration year. postCustomersCustomerSourcesIdResponseBody200ExpYear :: (GHC.Maybe.Maybe GHC.Types.Int), -- | fingerprint: Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. -- -- *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Fingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | flow: The authentication \`flow\` of the source. \`flow\` is one of \`redirect\`, \`receiver\`, \`code_verification\`, \`none\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Flow :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | funding: Card funding type. Can be \`credit\`, \`debit\`, \`prepaid\`, or \`unknown\`. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | giropay postCustomersCustomerSourcesIdResponseBody200Giropay :: (GHC.Maybe.Maybe SourceTypeGiropay), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ideal postCustomersCustomerSourcesIdResponseBody200Ideal :: (GHC.Maybe.Maybe SourceTypeIdeal), -- | klarna postCustomersCustomerSourcesIdResponseBody200Klarna :: (GHC.Maybe.Maybe SourceTypeKlarna), -- | last4: The last four digits of the card. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Last4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode. postCustomersCustomerSourcesIdResponseBody200Livemode :: (GHC.Maybe.Maybe 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. postCustomersCustomerSourcesIdResponseBody200Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | multibanco postCustomersCustomerSourcesIdResponseBody200Multibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | object: String representing the object\'s type. Objects of the same type share the same value. postCustomersCustomerSourcesIdResponseBody200Object :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Object'), -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types. postCustomersCustomerSourcesIdResponseBody200Owner :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Owner'), -- | p24 postCustomersCustomerSourcesIdResponseBody200P24 :: (GHC.Maybe.Maybe SourceTypeP24), -- | receiver: postCustomersCustomerSourcesIdResponseBody200Receiver :: (GHC.Maybe.Maybe SourceReceiverFlow), -- | recipient: The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. postCustomersCustomerSourcesIdResponseBody200Recipient :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Recipient'Variants), -- | redirect: postCustomersCustomerSourcesIdResponseBody200Redirect :: (GHC.Maybe.Maybe SourceRedirectFlow), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | sepa_debit postCustomersCustomerSourcesIdResponseBody200SepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit), -- | sofort postCustomersCustomerSourcesIdResponseBody200Sofort :: (GHC.Maybe.Maybe SourceTypeSofort), -- | source_order: postCustomersCustomerSourcesIdResponseBody200SourceOrder :: (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 postCustomersCustomerSourcesIdResponseBody200StatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | status: For bank accounts, possible values are \`new\`, \`validated\`, \`verified\`, \`verification_failed\`, or \`errored\`. A bank account that hasn\'t had any activity or validation performed is \`new\`. If Stripe can determine that the bank account exists, its status will be \`validated\`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be \`verified\`. If the verification failed for any reason, such as microdeposit failure, the status will be \`verification_failed\`. If a transfer sent to this bank account fails, we\'ll set the status to \`errored\` and will not continue to send transfers until the bank details are updated. -- -- For external accounts, possible values are \`new\` and \`errored\`. Validations aren\'t run against external accounts because they\'re only used for payouts. This means the other statuses don\'t apply. If a transfer fails, the status is set to \`errored\` and transfers are stopped until account details are updated. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | three_d_secure postCustomersCustomerSourcesIdResponseBody200ThreeDSecure :: (GHC.Maybe.Maybe SourceTypeThreeDSecure), -- | tokenization_method: If the card number is tokenized, this is the method that was used. Can be \`android_pay\` (includes Google Pay), \`apple_pay\`, \`masterpass\`, \`visa_checkout\`, or null. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200TokenizationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | 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. postCustomersCustomerSourcesIdResponseBody200Type :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Type'), -- | 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 postCustomersCustomerSourcesIdResponseBody200Usage :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | wechat postCustomersCustomerSourcesIdResponseBody200Wechat :: (GHC.Maybe.Maybe SourceTypeWechat) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200 where toJSON obj = Data.Aeson.Types.Internal.object ("account" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Account obj : "account_holder_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AccountHolderType obj : "ach_credit_transfer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AchCreditTransfer obj : "ach_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AchDebit obj : "acss_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AcssDebit obj : "address_city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressCity obj : "address_country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressCountry obj : "address_line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine1 obj : "address_line1_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine1Check obj : "address_line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine2 obj : "address_state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressState obj : "address_zip" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressZip obj : "address_zip_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressZipCheck obj : "alipay" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Alipay obj : "amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Amount obj : "au_becs_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AuBecsDebit obj : "available_payout_methods" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods obj : "bancontact" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Bancontact obj : "bank_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200BankName obj : "brand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Brand obj : "card" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Card obj : "card_present" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CardPresent obj : "client_secret" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ClientSecret obj : "code_verification" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CodeVerification obj : "country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Country obj : "created" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Created obj : "currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Currency obj : "customer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Customer obj : "cvc_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CvcCheck obj : "default_for_currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200DefaultForCurrency obj : "dynamic_last4" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200DynamicLast4 obj : "eps" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Eps obj : "exp_month" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ExpMonth obj : "exp_year" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ExpYear obj : "fingerprint" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Fingerprint obj : "flow" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Flow obj : "funding" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Funding obj : "giropay" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Giropay obj : "id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Id obj : "ideal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Ideal obj : "klarna" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Klarna obj : "last4" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Last4 obj : "livemode" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Livemode obj : "metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Metadata obj : "multibanco" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Multibanco obj : "name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Name obj : "object" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Object obj : "owner" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner obj : "p24" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200P24 obj : "receiver" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Receiver obj : "recipient" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Recipient obj : "redirect" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Redirect obj : "routing_number" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200RoutingNumber obj : "sepa_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Sofort obj : "source_order" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200SourceOrder obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200StatementDescriptor obj : "status" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Status obj : "three_d_secure" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ThreeDSecure obj : "tokenization_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200TokenizationMethod obj : "type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Type obj : "usage" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Usage obj : "wechat" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Wechat obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Account obj) GHC.Base.<> (("account_holder_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AccountHolderType obj) GHC.Base.<> (("ach_credit_transfer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AchCreditTransfer obj) GHC.Base.<> (("ach_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AchDebit obj) GHC.Base.<> (("acss_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AcssDebit obj) GHC.Base.<> (("address_city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressCity obj) GHC.Base.<> (("address_country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressCountry obj) GHC.Base.<> (("address_line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine1 obj) GHC.Base.<> (("address_line1_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine1Check obj) GHC.Base.<> (("address_line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressLine2 obj) GHC.Base.<> (("address_state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressState obj) GHC.Base.<> (("address_zip" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressZip obj) GHC.Base.<> (("address_zip_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AddressZipCheck obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Alipay obj) GHC.Base.<> (("amount" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Amount obj) GHC.Base.<> (("au_becs_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AuBecsDebit obj) GHC.Base.<> (("available_payout_methods" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Bancontact obj) GHC.Base.<> (("bank_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200BankName obj) GHC.Base.<> (("brand" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Brand obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CardPresent obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ClientSecret obj) GHC.Base.<> (("code_verification" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CodeVerification obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Country obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Created obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Currency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Customer obj) GHC.Base.<> (("cvc_check" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200CvcCheck obj) GHC.Base.<> (("default_for_currency" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200DefaultForCurrency obj) GHC.Base.<> (("dynamic_last4" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200DynamicLast4 obj) GHC.Base.<> (("eps" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Eps obj) GHC.Base.<> (("exp_month" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ExpMonth obj) GHC.Base.<> (("exp_year" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ExpYear obj) GHC.Base.<> (("fingerprint" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Fingerprint obj) GHC.Base.<> (("flow" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Flow obj) GHC.Base.<> (("funding" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Funding obj) GHC.Base.<> (("giropay" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Giropay obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Id obj) GHC.Base.<> (("ideal" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Ideal obj) GHC.Base.<> (("klarna" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Klarna obj) GHC.Base.<> (("last4" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Last4 obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Livemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Metadata obj) GHC.Base.<> (("multibanco" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Multibanco obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Name obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Object obj) GHC.Base.<> (("owner" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200P24 obj) GHC.Base.<> (("receiver" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Receiver obj) GHC.Base.<> (("recipient" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Recipient obj) GHC.Base.<> (("redirect" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Redirect obj) GHC.Base.<> (("routing_number" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200RoutingNumber obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200SepaDebit obj) GHC.Base.<> (("sofort" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Sofort obj) GHC.Base.<> (("source_order" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200SourceOrder obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200StatementDescriptor obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Status obj) GHC.Base.<> (("three_d_secure" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200ThreeDSecure obj) GHC.Base.<> (("tokenization_method" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200TokenizationMethod obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Type obj) GHC.Base.<> (("usage" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Usage obj) GHC.Base.<> ("wechat" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Wechat obj)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200 where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdResponseBody200" (\obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((GHC.Base.pure PostCustomersCustomerSourcesIdResponseBody200 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_credit_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_state")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "alipay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "au_becs_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "available_payout_methods")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "brand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card_present")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "client_secret")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "code_verification")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cvc_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_for_currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "dynamic_last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "eps")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_month")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_year")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "fingerprint")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "flow")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "funding")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "giropay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ideal")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "klarna")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "multibanco")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "owner")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "p24")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "receiver")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "recipient")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "redirect")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "routing_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sepa_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sofort")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "source_order")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "three_d_secure")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tokenization_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "wechat")) -- | Create a new 'PostCustomersCustomerSourcesIdResponseBody200' with all required fields. mkPostCustomersCustomerSourcesIdResponseBody200 :: PostCustomersCustomerSourcesIdResponseBody200 mkPostCustomersCustomerSourcesIdResponseBody200 = PostCustomersCustomerSourcesIdResponseBody200 { postCustomersCustomerSourcesIdResponseBody200Account = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AccountHolderName = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AccountHolderType = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AchCreditTransfer = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AchDebit = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AcssDebit = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressCity = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressCountry = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressLine1 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressLine1Check = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressLine2 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressState = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressZip = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AddressZipCheck = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Alipay = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Amount = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AuBecsDebit = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Bancontact = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200BankName = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Brand = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Card = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200CardPresent = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200ClientSecret = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200CodeVerification = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Country = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Created = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Currency = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Customer = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200CvcCheck = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200DefaultForCurrency = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200DynamicLast4 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Eps = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200ExpMonth = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200ExpYear = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Fingerprint = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Flow = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Funding = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Giropay = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Id = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Ideal = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Klarna = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Last4 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Livemode = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Metadata = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Multibanco = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Name = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Object = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200P24 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Receiver = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Recipient = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Redirect = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200RoutingNumber = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200SepaDebit = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Sofort = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200SourceOrder = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200StatementDescriptor = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Status = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200ThreeDSecure = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200TokenizationMethod = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Type = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Usage = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Wechat = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.account.anyOf@ in the specification. -- -- The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. data PostCustomersCustomerSourcesIdResponseBody200Account'Variants = PostCustomersCustomerSourcesIdResponseBody200Account'Text Data.Text.Internal.Text | PostCustomersCustomerSourcesIdResponseBody200Account'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Account'Variants where toJSON (PostCustomersCustomerSourcesIdResponseBody200Account'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSourcesIdResponseBody200Account'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Account'Variants where parseJSON val = case (PostCustomersCustomerSourcesIdResponseBody200Account'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PostCustomersCustomerSourcesIdResponseBody200Account'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.available_payout_methods.items@ in the specification. data PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'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. PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"instant"@ PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumInstant | -- | Represents the JSON value @"standard"@ PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods' where toJSON (PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'Other val) = val toJSON (PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumInstant) = "instant" toJSON (PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumInstant | val GHC.Classes.== "standard" -> PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'EnumStandard | GHC.Base.otherwise -> PostCustomersCustomerSourcesIdResponseBody200AvailablePayoutMethods'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.customer.anyOf@ in the specification. -- -- The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. data PostCustomersCustomerSourcesIdResponseBody200Customer'Variants = PostCustomersCustomerSourcesIdResponseBody200Customer'Text Data.Text.Internal.Text | PostCustomersCustomerSourcesIdResponseBody200Customer'Customer Customer | PostCustomersCustomerSourcesIdResponseBody200Customer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Customer'Variants where toJSON (PostCustomersCustomerSourcesIdResponseBody200Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSourcesIdResponseBody200Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSourcesIdResponseBody200Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Customer'Variants where parseJSON val = case (PostCustomersCustomerSourcesIdResponseBody200Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PostCustomersCustomerSourcesIdResponseBody200Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PostCustomersCustomerSourcesIdResponseBody200Customer'DeletedCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data PostCustomersCustomerSourcesIdResponseBody200Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSourcesIdResponseBody200Object'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. PostCustomersCustomerSourcesIdResponseBody200Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"card"@ PostCustomersCustomerSourcesIdResponseBody200Object'EnumCard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Object' where toJSON (PostCustomersCustomerSourcesIdResponseBody200Object'Other val) = val toJSON (PostCustomersCustomerSourcesIdResponseBody200Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSourcesIdResponseBody200Object'EnumCard) = "card" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "card" -> PostCustomersCustomerSourcesIdResponseBody200Object'EnumCard | GHC.Base.otherwise -> PostCustomersCustomerSourcesIdResponseBody200Object'Other val ) -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.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 PostCustomersCustomerSourcesIdResponseBody200Owner' = PostCustomersCustomerSourcesIdResponseBody200Owner' { -- | address: Owner\'s address. postCustomersCustomerSourcesIdResponseBody200Owner'Address :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Owner'Address'), -- | email: Owner\'s email address. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Owner\'s full name. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone: Owner\'s phone number (including extension). -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'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. postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress :: (GHC.Maybe.Maybe PostCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Owner' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address obj : "email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Email obj : "name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Name obj : "phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Phone obj : "verified_address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress obj : "verified_email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedEmail obj : "verified_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedName obj : "verified_phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedPhone obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Phone obj) GHC.Base.<> (("verified_address" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress obj) GHC.Base.<> (("verified_email" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedEmail obj) GHC.Base.<> (("verified_name" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedName obj) GHC.Base.<> ("verified_phone" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedPhone obj)))))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Owner' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdResponseBody200Owner'" (\obj -> (((((((GHC.Base.pure PostCustomersCustomerSourcesIdResponseBody200Owner' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_phone")) -- | Create a new 'PostCustomersCustomerSourcesIdResponseBody200Owner'' with all required fields. mkPostCustomersCustomerSourcesIdResponseBody200Owner' :: PostCustomersCustomerSourcesIdResponseBody200Owner' mkPostCustomersCustomerSourcesIdResponseBody200Owner' = PostCustomersCustomerSourcesIdResponseBody200Owner' { postCustomersCustomerSourcesIdResponseBody200Owner'Address = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Email = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Name = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Phone = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedEmail = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedName = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedPhone = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.owner.anyOf.properties.address.anyOf@ in the specification. -- -- Owner\\\'s address. data PostCustomersCustomerSourcesIdResponseBody200Owner'Address' = PostCustomersCustomerSourcesIdResponseBody200Owner'Address' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Owner'Address' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'City obj : "country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'Address'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Owner'Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdResponseBody200Owner'Address'" (\obj -> (((((GHC.Base.pure PostCustomersCustomerSourcesIdResponseBody200Owner'Address' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "state")) -- | Create a new 'PostCustomersCustomerSourcesIdResponseBody200Owner'Address'' with all required fields. mkPostCustomersCustomerSourcesIdResponseBody200Owner'Address' :: PostCustomersCustomerSourcesIdResponseBody200Owner'Address' mkPostCustomersCustomerSourcesIdResponseBody200Owner'Address' = PostCustomersCustomerSourcesIdResponseBody200Owner'Address' { postCustomersCustomerSourcesIdResponseBody200Owner'Address'City = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Address'Country = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line1 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Address'Line2 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Address'PostalCode = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'Address'State = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.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 PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' = PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'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 postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'City obj : "country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Country obj : "line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' where parseJSON = Data.Aeson.Types.FromJSON.withObject "PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'" (\obj -> (((((GHC.Base.pure PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "state")) -- | Create a new 'PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'' with all required fields. mkPostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' :: PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' mkPostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' = PostCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress' { postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'City = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Country = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line1 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'Line2 = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'PostalCode = GHC.Maybe.Nothing, postCustomersCustomerSourcesIdResponseBody200Owner'VerifiedAddress'State = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.properties.recipient.anyOf@ in the specification. -- -- The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. data PostCustomersCustomerSourcesIdResponseBody200Recipient'Variants = PostCustomersCustomerSourcesIdResponseBody200Recipient'Text Data.Text.Internal.Text | PostCustomersCustomerSourcesIdResponseBody200Recipient'Recipient Recipient deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Recipient'Variants where toJSON (PostCustomersCustomerSourcesIdResponseBody200Recipient'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (PostCustomersCustomerSourcesIdResponseBody200Recipient'Recipient a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Recipient'Variants where parseJSON val = case (PostCustomersCustomerSourcesIdResponseBody200Recipient'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((PostCustomersCustomerSourcesIdResponseBody200Recipient'Recipient Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/customers\/{customer}\/sources\/{id}.POST.responses.200.content.application\/json.schema.anyOf.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 PostCustomersCustomerSourcesIdResponseBody200Type' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. PostCustomersCustomerSourcesIdResponseBody200Type'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. PostCustomersCustomerSourcesIdResponseBody200Type'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"ach_credit_transfer"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchCreditTransfer | -- | Represents the JSON value @"ach_debit"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchDebit | -- | Represents the JSON value @"acss_debit"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumAcssDebit | -- | Represents the JSON value @"alipay"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumAlipay | -- | Represents the JSON value @"au_becs_debit"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumAuBecsDebit | -- | Represents the JSON value @"bancontact"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumBancontact | -- | Represents the JSON value @"card"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumCard | -- | Represents the JSON value @"card_present"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumCardPresent | -- | Represents the JSON value @"eps"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumEps | -- | Represents the JSON value @"giropay"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumGiropay | -- | Represents the JSON value @"ideal"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumIdeal | -- | Represents the JSON value @"klarna"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumKlarna | -- | Represents the JSON value @"multibanco"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumMultibanco | -- | Represents the JSON value @"p24"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumP24 | -- | Represents the JSON value @"sepa_debit"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumSepaDebit | -- | Represents the JSON value @"sofort"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumSofort | -- | Represents the JSON value @"three_d_secure"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumThreeDSecure | -- | Represents the JSON value @"wechat"@ PostCustomersCustomerSourcesIdResponseBody200Type'EnumWechat deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON PostCustomersCustomerSourcesIdResponseBody200Type' where toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'Other val) = val toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchCreditTransfer) = "ach_credit_transfer" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchDebit) = "ach_debit" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumAcssDebit) = "acss_debit" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumAlipay) = "alipay" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumAuBecsDebit) = "au_becs_debit" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumBancontact) = "bancontact" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumCard) = "card" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumCardPresent) = "card_present" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumEps) = "eps" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumGiropay) = "giropay" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumIdeal) = "ideal" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumKlarna) = "klarna" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumMultibanco) = "multibanco" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumP24) = "p24" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumSepaDebit) = "sepa_debit" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumSofort) = "sofort" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumThreeDSecure) = "three_d_secure" toJSON (PostCustomersCustomerSourcesIdResponseBody200Type'EnumWechat) = "wechat" instance Data.Aeson.Types.FromJSON.FromJSON PostCustomersCustomerSourcesIdResponseBody200Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ach_credit_transfer" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchCreditTransfer | val GHC.Classes.== "ach_debit" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumAchDebit | val GHC.Classes.== "acss_debit" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumAcssDebit | val GHC.Classes.== "alipay" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumAlipay | val GHC.Classes.== "au_becs_debit" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumAuBecsDebit | val GHC.Classes.== "bancontact" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumBancontact | val GHC.Classes.== "card" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumCard | val GHC.Classes.== "card_present" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumCardPresent | val GHC.Classes.== "eps" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumEps | val GHC.Classes.== "giropay" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumGiropay | val GHC.Classes.== "ideal" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumIdeal | val GHC.Classes.== "klarna" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumKlarna | val GHC.Classes.== "multibanco" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumMultibanco | val GHC.Classes.== "p24" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumP24 | val GHC.Classes.== "sepa_debit" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumSepaDebit | val GHC.Classes.== "sofort" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumSofort | val GHC.Classes.== "three_d_secure" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumThreeDSecure | val GHC.Classes.== "wechat" -> PostCustomersCustomerSourcesIdResponseBody200Type'EnumWechat | GHC.Base.otherwise -> PostCustomersCustomerSourcesIdResponseBody200Type'Other val )