{-# LANGUAGE MultiWayIf #-} -- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator. {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema Account module StripeAPI.Types.Account where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import qualified Data.Aeson as Data.Aeson.Types import qualified Data.Aeson as Data.Aeson.Types.FromJSON import qualified Data.Aeson as Data.Aeson.Types.Internal import qualified Data.Aeson as Data.Aeson.Types.ToJSON import qualified Data.ByteString.Char8 import qualified Data.ByteString.Char8 as Data.ByteString.Internal import qualified Data.Foldable import qualified Data.Functor import qualified Data.Maybe import qualified Data.Scientific import qualified Data.Text import qualified Data.Text.Internal import qualified Data.Time.Calendar as Data.Time.Calendar.Days import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified StripeAPI.Common import StripeAPI.TypeAlias import {-# SOURCE #-} StripeAPI.Types.AccountBacsDebitPaymentsSettings import {-# SOURCE #-} StripeAPI.Types.AccountBrandingSettings import {-# SOURCE #-} StripeAPI.Types.AccountBusinessProfile import {-# SOURCE #-} StripeAPI.Types.AccountCapabilities import {-# SOURCE #-} StripeAPI.Types.AccountCardIssuingSettings import {-# SOURCE #-} StripeAPI.Types.AccountCardPaymentsSettings import {-# SOURCE #-} StripeAPI.Types.AccountDashboardSettings import {-# SOURCE #-} StripeAPI.Types.AccountFutureRequirements import {-# SOURCE #-} StripeAPI.Types.AccountPaymentsSettings import {-# SOURCE #-} StripeAPI.Types.AccountPayoutSettings import {-# SOURCE #-} StripeAPI.Types.AccountRequirements import {-# SOURCE #-} StripeAPI.Types.AccountSepaDebitPaymentsSettings import {-# SOURCE #-} StripeAPI.Types.AccountSettings import {-# SOURCE #-} StripeAPI.Types.AccountTosAcceptance import {-# SOURCE #-} StripeAPI.Types.AccountTreasurySettings import {-# SOURCE #-} StripeAPI.Types.AccountUnificationAccountController import {-# SOURCE #-} StripeAPI.Types.Address import {-# SOURCE #-} StripeAPI.Types.BankAccount import {-# SOURCE #-} StripeAPI.Types.Card import {-# SOURCE #-} StripeAPI.Types.Customer import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer import {-# SOURCE #-} StripeAPI.Types.LegalEntityCompany import {-# SOURCE #-} StripeAPI.Types.Person import {-# SOURCE #-} StripeAPI.Types.Recipient import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | Defines the object schema located at @components.schemas.account@ in the specification. -- -- This is an object representing a Stripe account. You can retrieve it to see -- properties on the account like its current e-mail address or if the account is -- enabled yet to make live charges. -- -- Some properties, marked below, are available only to platforms that want to -- [create and manage Express or Custom accounts](https:\/\/stripe.com\/docs\/connect\/accounts). data Account = Account { -- | business_profile: Business information about the account. accountBusinessProfile :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountBusinessProfile'NonNullable)), -- | business_type: The business type. accountBusinessType :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountBusinessType'NonNullable)), -- | capabilities: accountCapabilities :: (GHC.Maybe.Maybe AccountCapabilities), -- | charges_enabled: Whether the account can create live charges. accountChargesEnabled :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | company: accountCompany :: (GHC.Maybe.Maybe LegalEntityCompany), -- | controller: accountController :: (GHC.Maybe.Maybe AccountUnificationAccountController), -- | country: The account\'s country. -- -- Constraints: -- -- * Maximum length of 5000 accountCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | created: Time at which the account was connected. Measured in seconds since the Unix epoch. accountCreated :: (GHC.Maybe.Maybe GHC.Types.Int), -- | default_currency: Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account\'s country](https:\/\/stripe.com\/docs\/payouts). -- -- Constraints: -- -- * Maximum length of 5000 accountDefaultCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | details_submitted: Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. accountDetailsSubmitted :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | email: An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. -- -- Constraints: -- -- * Maximum length of 5000 accountEmail :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | external_accounts: External accounts (bank accounts and debit cards) currently attached to this account accountExternalAccounts :: (GHC.Maybe.Maybe AccountExternalAccounts'), -- | future_requirements: accountFutureRequirements :: (GHC.Maybe.Maybe AccountFutureRequirements), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 accountId :: Data.Text.Internal.Text, -- | individual: This is an object representing a person associated with a Stripe account. -- -- A platform cannot access a Standard or Express account\'s persons after the account starts onboarding, such as after generating an account link for the account. -- See the [Standard onboarding](https:\/\/stripe.com\/docs\/connect\/standard-accounts) or [Express onboarding documentation](https:\/\/stripe.com\/docs\/connect\/express-accounts) for information about platform pre-filling and account onboarding steps. -- -- Related guide: [Handling Identity Verification with the API](https:\/\/stripe.com\/docs\/connect\/identity-verification-api\#person-information). accountIndividual :: (GHC.Maybe.Maybe Person), -- | 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. accountMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | payouts_enabled: Whether Stripe can send payouts to this account. accountPayoutsEnabled :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | requirements: accountRequirements :: (GHC.Maybe.Maybe AccountRequirements), -- | settings: Options for customizing how the account functions within Stripe. accountSettings :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountSettings'NonNullable)), -- | tos_acceptance: accountTosAcceptance :: (GHC.Maybe.Maybe AccountTosAcceptance), -- | type: The Stripe account type. Can be \`standard\`, \`express\`, or \`custom\`. accountType :: (GHC.Maybe.Maybe AccountType') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON Account where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("business_profile" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("business_type" Data.Aeson.Types.ToJSON..=)) (accountBusinessType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capabilities" Data.Aeson.Types.ToJSON..=)) (accountCapabilities obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("charges_enabled" Data.Aeson.Types.ToJSON..=)) (accountChargesEnabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("company" Data.Aeson.Types.ToJSON..=)) (accountCompany obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("controller" Data.Aeson.Types.ToJSON..=)) (accountController obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("created" Data.Aeson.Types.ToJSON..=)) (accountCreated obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_currency" Data.Aeson.Types.ToJSON..=)) (accountDefaultCurrency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("details_submitted" Data.Aeson.Types.ToJSON..=)) (accountDetailsSubmitted obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("email" Data.Aeson.Types.ToJSON..=)) (accountEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("external_accounts" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("future_requirements" Data.Aeson.Types.ToJSON..=)) (accountFutureRequirements obj) : ["id" Data.Aeson.Types.ToJSON..= accountId obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("individual" Data.Aeson.Types.ToJSON..=)) (accountIndividual obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (accountMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payouts_enabled" Data.Aeson.Types.ToJSON..=)) (accountPayoutsEnabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requirements" Data.Aeson.Types.ToJSON..=)) (accountRequirements obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("settings" Data.Aeson.Types.ToJSON..=)) (accountSettings obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tos_acceptance" Data.Aeson.Types.ToJSON..=)) (accountTosAcceptance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("type" Data.Aeson.Types.ToJSON..=)) (accountType obj) : ["object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "account"] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("business_profile" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("business_type" Data.Aeson.Types.ToJSON..=)) (accountBusinessType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("capabilities" Data.Aeson.Types.ToJSON..=)) (accountCapabilities obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("charges_enabled" Data.Aeson.Types.ToJSON..=)) (accountChargesEnabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("company" Data.Aeson.Types.ToJSON..=)) (accountCompany obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("controller" Data.Aeson.Types.ToJSON..=)) (accountController obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("created" Data.Aeson.Types.ToJSON..=)) (accountCreated obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_currency" Data.Aeson.Types.ToJSON..=)) (accountDefaultCurrency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("details_submitted" Data.Aeson.Types.ToJSON..=)) (accountDetailsSubmitted obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("email" Data.Aeson.Types.ToJSON..=)) (accountEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("external_accounts" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("future_requirements" Data.Aeson.Types.ToJSON..=)) (accountFutureRequirements obj) : ["id" Data.Aeson.Types.ToJSON..= accountId obj] : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("individual" Data.Aeson.Types.ToJSON..=)) (accountIndividual obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (accountMetadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payouts_enabled" Data.Aeson.Types.ToJSON..=)) (accountPayoutsEnabled obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("requirements" Data.Aeson.Types.ToJSON..=)) (accountRequirements obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("settings" Data.Aeson.Types.ToJSON..=)) (accountSettings obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tos_acceptance" Data.Aeson.Types.ToJSON..=)) (accountTosAcceptance obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("type" Data.Aeson.Types.ToJSON..=)) (accountType obj) : ["object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "account"] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON Account where parseJSON = Data.Aeson.Types.FromJSON.withObject "Account" (\obj -> ((((((((((((((((((((GHC.Base.pure Account GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "business_profile")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "business_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "capabilities")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "charges_enabled")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "company")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "controller")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "default_currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "details_submitted")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "external_accounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "future_requirements")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "individual")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payouts_enabled")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "requirements")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "settings")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tos_acceptance")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "type")) -- | Create a new 'Account' with all required fields. mkAccount :: -- | 'accountId' Data.Text.Internal.Text -> Account mkAccount accountId = Account { accountBusinessProfile = GHC.Maybe.Nothing, accountBusinessType = GHC.Maybe.Nothing, accountCapabilities = GHC.Maybe.Nothing, accountChargesEnabled = GHC.Maybe.Nothing, accountCompany = GHC.Maybe.Nothing, accountController = GHC.Maybe.Nothing, accountCountry = GHC.Maybe.Nothing, accountCreated = GHC.Maybe.Nothing, accountDefaultCurrency = GHC.Maybe.Nothing, accountDetailsSubmitted = GHC.Maybe.Nothing, accountEmail = GHC.Maybe.Nothing, accountExternalAccounts = GHC.Maybe.Nothing, accountFutureRequirements = GHC.Maybe.Nothing, accountId = accountId, accountIndividual = GHC.Maybe.Nothing, accountMetadata = GHC.Maybe.Nothing, accountPayoutsEnabled = GHC.Maybe.Nothing, accountRequirements = GHC.Maybe.Nothing, accountSettings = GHC.Maybe.Nothing, accountTosAcceptance = GHC.Maybe.Nothing, accountType = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.account.properties.business_profile.anyOf@ in the specification. -- -- Business information about the account. data AccountBusinessProfile'NonNullable = AccountBusinessProfile'NonNullable { -- | mcc: [The merchant category code for the account](https:\/\/stripe.com\/docs\/connect\/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableMcc :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | name: The customer-facing business name. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableName :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | product_description: Internal-only description of the product sold or service provided by the business. It\'s used by Stripe for risk and underwriting purposes. -- -- Constraints: -- -- * Maximum length of 40000 accountBusinessProfile'NonNullableProductDescription :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | support_address: A publicly available mailing address for sending support issues to. accountBusinessProfile'NonNullableSupportAddress :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountBusinessProfile'NonNullableSupportAddress'NonNullable)), -- | support_email: A publicly available email address for sending support issues to. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportEmail :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | support_phone: A publicly available phone number to call with support issues. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportPhone :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | support_url: A publicly available website for handling support issues. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportUrl :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | url: The business\'s publicly available website. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableUrl :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON AccountBusinessProfile'NonNullable where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mcc" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableMcc obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("product_description" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableProductDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_address" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_email" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_phone" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportPhone obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_url" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("url" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableUrl obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("mcc" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableMcc obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("product_description" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableProductDescription obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_address" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_email" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportEmail obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_phone" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportPhone obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("support_url" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportUrl obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("url" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableUrl obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON AccountBusinessProfile'NonNullable where parseJSON = Data.Aeson.Types.FromJSON.withObject "AccountBusinessProfile'NonNullable" (\obj -> (((((((GHC.Base.pure AccountBusinessProfile'NonNullable GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "mcc")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "product_description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "support_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "support_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "support_phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "support_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "url")) -- | Create a new 'AccountBusinessProfile'NonNullable' with all required fields. mkAccountBusinessProfile'NonNullable :: AccountBusinessProfile'NonNullable mkAccountBusinessProfile'NonNullable = AccountBusinessProfile'NonNullable { accountBusinessProfile'NonNullableMcc = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableName = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableProductDescription = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportEmail = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportPhone = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportUrl = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableUrl = GHC.Maybe.Nothing } -- | Defines the object schema located at @components.schemas.account.properties.business_profile.anyOf.properties.support_address.anyOf@ in the specification. -- -- A publicly available mailing address for sending support issues to. data AccountBusinessProfile'NonNullableSupportAddress'NonNullable = AccountBusinessProfile'NonNullableSupportAddress'NonNullable { -- | city: City, district, suburb, town, or village. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportAddress'NonNullableCity :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountBusinessProfile'NonNullableSupportAddress'NonNullableCountry :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | line1: Address line 1 (e.g., street, PO Box, or company name). -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportAddress'NonNullableLine1 :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | line2: Address line 2 (e.g., apartment, suite, unit, or building). -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportAddress'NonNullableLine2 :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportAddress'NonNullablePostalCode :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 accountBusinessProfile'NonNullableSupportAddress'NonNullableState :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON AccountBusinessProfile'NonNullableSupportAddress'NonNullable where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableCity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableLine1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableLine2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullablePostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableState obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("city" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableCity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line1" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableLine1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("line2" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableLine2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("postal_code" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullablePostalCode obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("state" Data.Aeson.Types.ToJSON..=)) (accountBusinessProfile'NonNullableSupportAddress'NonNullableState obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON AccountBusinessProfile'NonNullableSupportAddress'NonNullable where parseJSON = Data.Aeson.Types.FromJSON.withObject "AccountBusinessProfile'NonNullableSupportAddress'NonNullable" (\obj -> (((((GHC.Base.pure AccountBusinessProfile'NonNullableSupportAddress'NonNullable 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 'AccountBusinessProfile'NonNullableSupportAddress'NonNullable' with all required fields. mkAccountBusinessProfile'NonNullableSupportAddress'NonNullable :: AccountBusinessProfile'NonNullableSupportAddress'NonNullable mkAccountBusinessProfile'NonNullableSupportAddress'NonNullable = AccountBusinessProfile'NonNullableSupportAddress'NonNullable { accountBusinessProfile'NonNullableSupportAddress'NonNullableCity = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress'NonNullableCountry = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress'NonNullableLine1 = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress'NonNullableLine2 = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress'NonNullablePostalCode = GHC.Maybe.Nothing, accountBusinessProfile'NonNullableSupportAddress'NonNullableState = GHC.Maybe.Nothing } -- | Defines the enum schema located at @components.schemas.account.properties.business_type@ in the specification. -- -- The business type. data AccountBusinessType'NonNullable = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. AccountBusinessType'NonNullableOther Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. AccountBusinessType'NonNullableTyped Data.Text.Internal.Text | -- | Represents the JSON value @"company"@ AccountBusinessType'NonNullableEnumCompany | -- | Represents the JSON value @"government_entity"@ AccountBusinessType'NonNullableEnumGovernmentEntity | -- | Represents the JSON value @"individual"@ AccountBusinessType'NonNullableEnumIndividual | -- | Represents the JSON value @"non_profit"@ AccountBusinessType'NonNullableEnumNonProfit deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountBusinessType'NonNullable where toJSON (AccountBusinessType'NonNullableOther val) = val toJSON (AccountBusinessType'NonNullableTyped val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (AccountBusinessType'NonNullableEnumCompany) = "company" toJSON (AccountBusinessType'NonNullableEnumGovernmentEntity) = "government_entity" toJSON (AccountBusinessType'NonNullableEnumIndividual) = "individual" toJSON (AccountBusinessType'NonNullableEnumNonProfit) = "non_profit" instance Data.Aeson.Types.FromJSON.FromJSON AccountBusinessType'NonNullable where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "company" -> AccountBusinessType'NonNullableEnumCompany | val GHC.Classes.== "government_entity" -> AccountBusinessType'NonNullableEnumGovernmentEntity | val GHC.Classes.== "individual" -> AccountBusinessType'NonNullableEnumIndividual | val GHC.Classes.== "non_profit" -> AccountBusinessType'NonNullableEnumNonProfit | GHC.Base.otherwise -> AccountBusinessType'NonNullableOther val ) -- | Defines the object schema located at @components.schemas.account.properties.external_accounts@ in the specification. -- -- External accounts (bank accounts and debit cards) currently attached to this account data AccountExternalAccounts' = AccountExternalAccounts' { -- | data: The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. accountExternalAccounts'Data :: ([AccountExternalAccounts'Data']), -- | has_more: True if this list has another page of items after this one that can be fetched. accountExternalAccounts'HasMore :: GHC.Types.Bool, -- | url: The URL where this list can be accessed. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Url :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["data" Data.Aeson.Types.ToJSON..= accountExternalAccounts'Data obj] : ["has_more" Data.Aeson.Types.ToJSON..= accountExternalAccounts'HasMore obj] : ["url" Data.Aeson.Types.ToJSON..= accountExternalAccounts'Url obj] : ["object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list"] : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["data" Data.Aeson.Types.ToJSON..= accountExternalAccounts'Data obj] : ["has_more" Data.Aeson.Types.ToJSON..= accountExternalAccounts'HasMore obj] : ["url" Data.Aeson.Types.ToJSON..= accountExternalAccounts'Url obj] : ["object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list"] : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts' where parseJSON = Data.Aeson.Types.FromJSON.withObject "AccountExternalAccounts'" (\obj -> ((GHC.Base.pure AccountExternalAccounts' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "has_more")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "url")) -- | Create a new 'AccountExternalAccounts'' with all required fields. mkAccountExternalAccounts' :: -- | 'accountExternalAccounts'Data' [AccountExternalAccounts'Data'] -> -- | 'accountExternalAccounts'HasMore' GHC.Types.Bool -> -- | 'accountExternalAccounts'Url' Data.Text.Internal.Text -> AccountExternalAccounts' mkAccountExternalAccounts' accountExternalAccounts'Data accountExternalAccounts'HasMore accountExternalAccounts'Url = AccountExternalAccounts' { accountExternalAccounts'Data = accountExternalAccounts'Data, accountExternalAccounts'HasMore = accountExternalAccounts'HasMore, accountExternalAccounts'Url = accountExternalAccounts'Url } -- | Defines the object schema located at @components.schemas.account.properties.external_accounts.properties.data.items.anyOf@ in the specification. data AccountExternalAccounts'Data' = AccountExternalAccounts'Data' { -- | account: The ID of the account that the bank account is associated with. accountExternalAccounts'Data'Account :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountExternalAccounts'Data'Account'NonNullableVariants)), -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AccountHolderName :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountExternalAccounts'Data'AccountHolderType :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | account_type: The bank account type. This can only be \`checking\` or \`savings\` in most countries. In Japan, this can only be \`futsu\` or \`toza\`. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AccountType :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressCity :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_country: Billing address country, if provided when creating card. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressCountry :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_line1: Address line 1 (Street address\/PO Box\/Company name). -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressLine1 :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountExternalAccounts'Data'AddressLine1Check :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressLine2 :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressState :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'AddressZip :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountExternalAccounts'Data'AddressZipCheck :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | available_payout_methods: A set of available payout methods for this bank account. Only values from this set should be passed as the \`method\` when creating a payout. accountExternalAccounts'Data'AvailablePayoutMethods :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable ([AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullable]))), -- | bank_name: Name of the bank associated with the routing number (e.g., \`WELLS FARGO\`). -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'BankName :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountExternalAccounts'Data'Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country: Two-letter ISO code representing the country the bank account is located in. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/payouts) paid out to the bank account. accountExternalAccounts'Data'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The ID of the customer that the bank account is associated with. accountExternalAccounts'Data'Customer :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountExternalAccounts'Data'Customer'NonNullableVariants)), -- | 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 accountExternalAccounts'Data'CvcCheck :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | default_for_currency: Whether this bank account is the default external account for its currency. accountExternalAccounts'Data'DefaultForCurrency :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable GHC.Types.Bool)), -- | dynamic_last4: (For tokenized numbers only.) The last four digits of the device account number. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'DynamicLast4 :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | exp_month: Two-digit number representing the card\'s expiration month. accountExternalAccounts'Data'ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int), -- | exp_year: Four-digit number representing the card\'s expiration year. accountExternalAccounts'Data'ExpYear :: (GHC.Maybe.Maybe GHC.Types.Int), -- | fingerprint: Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Fingerprint :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | funding: Card funding type. Can be \`credit\`, \`debit\`, \`prepaid\`, or \`unknown\`. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | last4: The last four digits of the bank account number. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Last4 :: (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. accountExternalAccounts'Data'Metadata :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Aeson.Types.Internal.Object)), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'Name :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)), -- | object: String representing the object\'s type. Objects of the same type share the same value. accountExternalAccounts'Data'Object :: (GHC.Maybe.Maybe AccountExternalAccounts'Data'Object'), -- | 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. accountExternalAccounts'Data'Recipient :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable AccountExternalAccounts'Data'Recipient'NonNullableVariants)), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 accountExternalAccounts'Data'RoutingNumber :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable 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 accountExternalAccounts'Data'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | 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 accountExternalAccounts'Data'TokenizationMethod :: (GHC.Maybe.Maybe (StripeAPI.Common.Nullable Data.Text.Internal.Text)) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data' where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Account obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountHolderName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_type" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountHolderType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_type" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_city" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressCity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_country" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line1" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line1_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine1Check obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line2" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_state" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressState obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_zip" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressZip obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_zip_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressZipCheck obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("available_payout_methods" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AvailablePayoutMethods obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'BankName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("brand" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Brand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("currency" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Currency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Customer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cvc_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'CvcCheck obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_for_currency" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'DefaultForCurrency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dynamic_last4" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'DynamicLast4 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("exp_month" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'ExpMonth obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("exp_year" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'ExpYear obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fingerprint" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Fingerprint obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Funding obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("id" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Id obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("last4" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Last4 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Name obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("object" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Object obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("recipient" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Recipient obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("routing_number" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'RoutingNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("status" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Status obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tokenization_method" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'TokenizationMethod obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Account obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountHolderName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_holder_type" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountHolderType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("account_type" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AccountType obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_city" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressCity obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_country" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressCountry obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line1" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine1 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line1_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine1Check obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_line2" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressLine2 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_state" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressState obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_zip" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressZip obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("address_zip_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AddressZipCheck obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("available_payout_methods" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'AvailablePayoutMethods obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bank_name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'BankName obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("brand" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Brand obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("country" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Country obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("currency" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Currency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("customer" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Customer obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cvc_check" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'CvcCheck obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("default_for_currency" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'DefaultForCurrency obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dynamic_last4" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'DynamicLast4 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("exp_month" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'ExpMonth obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("exp_year" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'ExpYear obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("fingerprint" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Fingerprint obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("funding" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Funding obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("id" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Id obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("last4" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Last4 obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("metadata" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Metadata obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("name" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Name obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("object" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Object obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("recipient" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Recipient obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("routing_number" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'RoutingNumber obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("status" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'Status obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("tokenization_method" Data.Aeson.Types.ToJSON..=)) (accountExternalAccounts'Data'TokenizationMethod obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data' where parseJSON = Data.Aeson.Types.FromJSON.withObject "AccountExternalAccounts'Data'" (\obj -> (((((((((((((((((((((((((((((((((GHC.Base.pure AccountExternalAccounts'Data' 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..:! "account_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_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..:! "available_payout_methods")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "bank_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "brand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "country")) 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..:! "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..:! "funding")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "recipient")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "routing_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "tokenization_method")) -- | Create a new 'AccountExternalAccounts'Data'' with all required fields. mkAccountExternalAccounts'Data' :: AccountExternalAccounts'Data' mkAccountExternalAccounts'Data' = AccountExternalAccounts'Data' { accountExternalAccounts'Data'Account = GHC.Maybe.Nothing, accountExternalAccounts'Data'AccountHolderName = GHC.Maybe.Nothing, accountExternalAccounts'Data'AccountHolderType = GHC.Maybe.Nothing, accountExternalAccounts'Data'AccountType = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressCity = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressCountry = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressLine1 = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressLine1Check = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressLine2 = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressState = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressZip = GHC.Maybe.Nothing, accountExternalAccounts'Data'AddressZipCheck = GHC.Maybe.Nothing, accountExternalAccounts'Data'AvailablePayoutMethods = GHC.Maybe.Nothing, accountExternalAccounts'Data'BankName = GHC.Maybe.Nothing, accountExternalAccounts'Data'Brand = GHC.Maybe.Nothing, accountExternalAccounts'Data'Country = GHC.Maybe.Nothing, accountExternalAccounts'Data'Currency = GHC.Maybe.Nothing, accountExternalAccounts'Data'Customer = GHC.Maybe.Nothing, accountExternalAccounts'Data'CvcCheck = GHC.Maybe.Nothing, accountExternalAccounts'Data'DefaultForCurrency = GHC.Maybe.Nothing, accountExternalAccounts'Data'DynamicLast4 = GHC.Maybe.Nothing, accountExternalAccounts'Data'ExpMonth = GHC.Maybe.Nothing, accountExternalAccounts'Data'ExpYear = GHC.Maybe.Nothing, accountExternalAccounts'Data'Fingerprint = GHC.Maybe.Nothing, accountExternalAccounts'Data'Funding = GHC.Maybe.Nothing, accountExternalAccounts'Data'Id = GHC.Maybe.Nothing, accountExternalAccounts'Data'Last4 = GHC.Maybe.Nothing, accountExternalAccounts'Data'Metadata = GHC.Maybe.Nothing, accountExternalAccounts'Data'Name = GHC.Maybe.Nothing, accountExternalAccounts'Data'Object = GHC.Maybe.Nothing, accountExternalAccounts'Data'Recipient = GHC.Maybe.Nothing, accountExternalAccounts'Data'RoutingNumber = GHC.Maybe.Nothing, accountExternalAccounts'Data'Status = GHC.Maybe.Nothing, accountExternalAccounts'Data'TokenizationMethod = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @components.schemas.account.properties.external_accounts.properties.data.items.anyOf.properties.account.anyOf@ in the specification. -- -- The ID of the account that the bank account is associated with. data AccountExternalAccounts'Data'Account'NonNullableVariants = AccountExternalAccounts'Data'Account'NonNullableText Data.Text.Internal.Text | AccountExternalAccounts'Data'Account'NonNullableAccount Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data'Account'NonNullableVariants where toJSON (AccountExternalAccounts'Data'Account'NonNullableText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (AccountExternalAccounts'Data'Account'NonNullableAccount a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data'Account'NonNullableVariants where parseJSON val = case (AccountExternalAccounts'Data'Account'NonNullableText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((AccountExternalAccounts'Data'Account'NonNullableAccount 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 @components.schemas.account.properties.external_accounts.properties.data.items.anyOf.properties.available_payout_methods.items@ in the specification. data AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullable = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableOther Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableTyped Data.Text.Internal.Text | -- | Represents the JSON value @"instant"@ AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumInstant | -- | Represents the JSON value @"standard"@ AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullable where toJSON (AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableOther val) = val toJSON (AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableTyped val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumInstant) = "instant" toJSON (AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullable where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumInstant | val GHC.Classes.== "standard" -> AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableEnumStandard | GHC.Base.otherwise -> AccountExternalAccounts'Data'AvailablePayoutMethods'NonNullableOther val ) -- | Defines the oneOf schema located at @components.schemas.account.properties.external_accounts.properties.data.items.anyOf.properties.customer.anyOf@ in the specification. -- -- The ID of the customer that the bank account is associated with. data AccountExternalAccounts'Data'Customer'NonNullableVariants = AccountExternalAccounts'Data'Customer'NonNullableText Data.Text.Internal.Text | AccountExternalAccounts'Data'Customer'NonNullableCustomer Customer | AccountExternalAccounts'Data'Customer'NonNullableDeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data'Customer'NonNullableVariants where toJSON (AccountExternalAccounts'Data'Customer'NonNullableText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (AccountExternalAccounts'Data'Customer'NonNullableCustomer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (AccountExternalAccounts'Data'Customer'NonNullableDeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data'Customer'NonNullableVariants where parseJSON val = case (AccountExternalAccounts'Data'Customer'NonNullableText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((AccountExternalAccounts'Data'Customer'NonNullableCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((AccountExternalAccounts'Data'Customer'NonNullableDeletedCustomer 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 @components.schemas.account.properties.external_accounts.properties.data.items.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data AccountExternalAccounts'Data'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. AccountExternalAccounts'Data'Object'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. AccountExternalAccounts'Data'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"bank_account"@ AccountExternalAccounts'Data'Object'EnumBankAccount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data'Object' where toJSON (AccountExternalAccounts'Data'Object'Other val) = val toJSON (AccountExternalAccounts'Data'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (AccountExternalAccounts'Data'Object'EnumBankAccount) = "bank_account" instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "bank_account" -> AccountExternalAccounts'Data'Object'EnumBankAccount | GHC.Base.otherwise -> AccountExternalAccounts'Data'Object'Other val ) -- | Defines the oneOf schema located at @components.schemas.account.properties.external_accounts.properties.data.items.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 AccountExternalAccounts'Data'Recipient'NonNullableVariants = AccountExternalAccounts'Data'Recipient'NonNullableText Data.Text.Internal.Text | AccountExternalAccounts'Data'Recipient'NonNullableRecipient Recipient deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountExternalAccounts'Data'Recipient'NonNullableVariants where toJSON (AccountExternalAccounts'Data'Recipient'NonNullableText a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (AccountExternalAccounts'Data'Recipient'NonNullableRecipient a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON AccountExternalAccounts'Data'Recipient'NonNullableVariants where parseJSON val = case (AccountExternalAccounts'Data'Recipient'NonNullableText Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((AccountExternalAccounts'Data'Recipient'NonNullableRecipient 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 @components.schemas.account.properties.settings.anyOf@ in the specification. -- -- Options for customizing how the account functions within Stripe. data AccountSettings'NonNullable = AccountSettings'NonNullable { -- | bacs_debit_payments: accountSettings'NonNullableBacsDebitPayments :: (GHC.Maybe.Maybe AccountBacsDebitPaymentsSettings), -- | branding: accountSettings'NonNullableBranding :: (GHC.Maybe.Maybe AccountBrandingSettings), -- | card_issuing: accountSettings'NonNullableCardIssuing :: (GHC.Maybe.Maybe AccountCardIssuingSettings), -- | card_payments: accountSettings'NonNullableCardPayments :: (GHC.Maybe.Maybe AccountCardPaymentsSettings), -- | dashboard: accountSettings'NonNullableDashboard :: (GHC.Maybe.Maybe AccountDashboardSettings), -- | payments: accountSettings'NonNullablePayments :: (GHC.Maybe.Maybe AccountPaymentsSettings), -- | payouts: accountSettings'NonNullablePayouts :: (GHC.Maybe.Maybe AccountPayoutSettings), -- | sepa_debit_payments: accountSettings'NonNullableSepaDebitPayments :: (GHC.Maybe.Maybe AccountSepaDebitPaymentsSettings), -- | treasury: accountSettings'NonNullableTreasury :: (GHC.Maybe.Maybe AccountTreasurySettings) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON AccountSettings'NonNullable where toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableBacsDebitPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("branding" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableBranding obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_issuing" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableCardIssuing obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableCardPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dashboard" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableDashboard obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullablePayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payouts" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullablePayouts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableSepaDebitPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("treasury" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableTreasury obj) : GHC.Base.mempty)) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("bacs_debit_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableBacsDebitPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("branding" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableBranding obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_issuing" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableCardIssuing obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("card_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableCardPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("dashboard" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableDashboard obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullablePayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("payouts" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullablePayouts obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("sepa_debit_payments" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableSepaDebitPayments obj) : Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("treasury" Data.Aeson.Types.ToJSON..=)) (accountSettings'NonNullableTreasury obj) : GHC.Base.mempty))) instance Data.Aeson.Types.FromJSON.FromJSON AccountSettings'NonNullable where parseJSON = Data.Aeson.Types.FromJSON.withObject "AccountSettings'NonNullable" (\obj -> ((((((((GHC.Base.pure AccountSettings'NonNullable GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "bacs_debit_payments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "branding")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "card_issuing")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "card_payments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "dashboard")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "payouts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "sepa_debit_payments")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "treasury")) -- | Create a new 'AccountSettings'NonNullable' with all required fields. mkAccountSettings'NonNullable :: AccountSettings'NonNullable mkAccountSettings'NonNullable = AccountSettings'NonNullable { accountSettings'NonNullableBacsDebitPayments = GHC.Maybe.Nothing, accountSettings'NonNullableBranding = GHC.Maybe.Nothing, accountSettings'NonNullableCardIssuing = GHC.Maybe.Nothing, accountSettings'NonNullableCardPayments = GHC.Maybe.Nothing, accountSettings'NonNullableDashboard = GHC.Maybe.Nothing, accountSettings'NonNullablePayments = GHC.Maybe.Nothing, accountSettings'NonNullablePayouts = GHC.Maybe.Nothing, accountSettings'NonNullableSepaDebitPayments = GHC.Maybe.Nothing, accountSettings'NonNullableTreasury = GHC.Maybe.Nothing } -- | Defines the enum schema located at @components.schemas.account.properties.type@ in the specification. -- -- The Stripe account type. Can be \`standard\`, \`express\`, or \`custom\`. data AccountType' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. AccountType'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. AccountType'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"custom"@ AccountType'EnumCustom | -- | Represents the JSON value @"express"@ AccountType'EnumExpress | -- | Represents the JSON value @"standard"@ AccountType'EnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON AccountType' where toJSON (AccountType'Other val) = val toJSON (AccountType'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (AccountType'EnumCustom) = "custom" toJSON (AccountType'EnumExpress) = "express" toJSON (AccountType'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON AccountType' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "custom" -> AccountType'EnumCustom | val GHC.Classes.== "express" -> AccountType'EnumExpress | val GHC.Classes.== "standard" -> AccountType'EnumStandard | GHC.Base.otherwise -> AccountType'Other val )