{-# 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 RecurlyClient.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
import qualified Data.ByteString 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 as 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 RecurlyClient.Common
import RecurlyClient.TypeAlias
import {-# SOURCE #-} RecurlyClient.Types.AccountReadOnly
import {-# SOURCE #-} RecurlyClient.Types.AccountResponse
import {-# SOURCE #-} RecurlyClient.Types.Address
import {-# SOURCE #-} RecurlyClient.Types.BillingInfo
import {-# SOURCE #-} RecurlyClient.Types.ExternalAccount
import {-# SOURCE #-} RecurlyClient.Types.ShippingAddress
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.Account.allOf@ in the specification.
data Account = Account
    { Account -> Maybe Address
accountAddress :: (GHC.Maybe.Maybe Address)
    -- ^ address
    , Account -> Maybe AccountBill_to
accountBill_to :: (GHC.Maybe.Maybe AccountBill_to)
    -- ^ bill_to: An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
    --
    -- Constraints:
    --
    -- * Maximum length of 6
    , Account -> Maybe BillingInfo
accountBilling_info :: (GHC.Maybe.Maybe BillingInfo)
    -- ^ billing_info
    , Account -> Maybe Text
accountCc_emails :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ cc_emails: Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the \`email\` field also receives.
    --
    -- Constraints:
    --
    -- * Maximum length of 255
    , Account -> Maybe Text
accountCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ code: The unique identifier of the account. This cannot be changed once the account is created.
    --
    -- Constraints:
    --
    -- * Maximum length of 50
    , Account -> Maybe Text
accountCompany :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ company
    --
    -- Constraints:
    --
    -- * Maximum length of 50
    , Account -> Maybe JsonDateTime
accountCreated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ created_at: When the account was created.
    , Account -> Maybe CustomFields
accountCustom_fields :: (GHC.Maybe.Maybe CustomFields)
    -- ^ custom_fields: The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
    , Account -> Maybe JsonDateTime
accountDeleted_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ deleted_at: If present, when the account was last marked inactive.
    , Account -> Maybe Text
accountDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ dunning_campaign_id: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
    , Account -> Maybe Text
accountEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ email: The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
    --
    -- Constraints:
    --
    -- * Maximum length of 255
    , Account -> Maybe Text
accountEntity_use_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ entity_use_code: The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
    , Account -> Maybe Text
accountExemption_certificate :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ exemption_certificate: The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
    --
    -- Constraints:
    --
    -- * Maximum length of 30
    , Account -> Maybe [ExternalAccount]
accountExternal_accounts :: (GHC.Maybe.Maybe [ExternalAccount])
    -- ^ external_accounts: The external accounts belonging to this account
    , Account -> Maybe Text
accountFirst_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ first_name
    --
    -- Constraints:
    --
    -- * Maximum length of 255
    , Account -> Maybe Bool
accountHas_active_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_active_subscription: Indicates if the account has an active subscription.
    , Account -> Maybe Bool
accountHas_canceled_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_canceled_subscription: Indicates if the account has a canceled subscription.
    , Account -> Maybe Bool
accountHas_future_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_future_subscription: Indicates if the account has a future subscription.
    , Account -> Maybe Bool
accountHas_live_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_live_subscription: Indicates if the account has a subscription that is either active, canceled, future, or paused.
    , Account -> Maybe Bool
accountHas_past_due_invoice :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_past_due_invoice: Indicates if the account has a past due invoice.
    , Account -> Maybe Bool
accountHas_paused_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ has_paused_subscription: Indicates if the account has a paused subscription.
    , Account -> Maybe Text
accountHosted_login_token :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ hosted_login_token: The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: \`https:\/\/{subdomain}.recurly.com\/account\/{hosted_login_token}\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 32
    , Account -> Maybe Text
accountId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ id
    --
    -- Constraints:
    --
    -- * Maximum length of 13
    , Account -> Maybe Text
accountInvoice_template_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ invoice_template_id: Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
    , Account -> Maybe Text
accountLast_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ last_name
    --
    -- Constraints:
    --
    -- * Maximum length of 255
    , Account -> Maybe Text
accountObject :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ object
    , Account -> Maybe Text
accountOverride_business_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ override_business_entity_id: Unique ID to identify the business entity assigned to the account. Available when the \`Multiple Business Entities\` feature is enabled.
    , Account -> Maybe Text
accountParent_account_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ parent_account_id: The UUID of the parent account associated with this account.
    --
    -- Constraints:
    --
    -- * Maximum length of 13
    , Account -> Maybe AccountPreferred_locale
accountPreferred_locale :: (GHC.Maybe.Maybe AccountPreferred_locale)
    -- ^ preferred_locale: Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
    , Account -> Maybe Text
accountPreferred_time_zone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ preferred_time_zone: The [IANA time zone name](https:\/\/docs.recurly.com\/docs\/email-time-zones-and-time-stamps\#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer.
    , Account -> Maybe [ShippingAddress]
accountShipping_addresses :: (GHC.Maybe.Maybe [ShippingAddress])
    -- ^ shipping_addresses: The shipping addresses on the account.
    , Account -> Maybe AccountState
accountState :: (GHC.Maybe.Maybe AccountState)
    -- ^ state: Accounts can be either active or inactive.
    , Account -> Maybe Bool
accountTax_exempt :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ tax_exempt: The tax status of the account. \`true\` exempts tax on the account, \`false\` applies tax on the account.
    , Account -> Maybe JsonDateTime
accountUpdated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ updated_at: When the account was last changed.
    , Account -> Maybe Text
accountUsername :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ username: A secondary value for the account.
    --
    -- Constraints:
    --
    -- * Maximum length of 255
    , Account -> Maybe Text
accountVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ vat_number: The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
    --
    -- Constraints:
    --
    -- * Maximum length of 20
    }
    deriving
        ( Int -> Account -> ShowS
[Account] -> ShowS
Account -> String
(Int -> Account -> ShowS)
-> (Account -> String) -> ([Account] -> ShowS) -> Show Account
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Account -> ShowS
showsPrec :: Int -> Account -> ShowS
$cshow :: Account -> String
show :: Account -> String
$cshowList :: [Account] -> ShowS
showList :: [Account] -> ShowS
GHC.Show.Show
        , Account -> Account -> Bool
(Account -> Account -> Bool)
-> (Account -> Account -> Bool) -> Eq Account
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Account -> Account -> Bool
== :: Account -> Account -> Bool
$c/= :: Account -> Account -> Bool
/= :: Account -> Account -> Bool
GHC.Classes.Eq
        )

instance Data.Aeson.Types.ToJSON.ToJSON Account where
    toJSON :: Account -> Value
toJSON Account
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (Address -> [Pair]) -> Maybe Address -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Address -> Pair) -> Address -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Address
accountAddress Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountBill_to -> [Pair]) -> Maybe AccountBill_to -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountBill_to -> Pair) -> AccountBill_to -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountBill_to -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountBill_to
accountBill_to Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (BillingInfo -> [Pair]) -> Maybe BillingInfo -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (BillingInfo -> Pair) -> BillingInfo -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe BillingInfo
accountBilling_info Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cc_emails" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCc_emails Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCode Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"company" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCompany Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountCreated_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (CustomFields -> [Pair]) -> Maybe CustomFields -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (CustomFields -> Pair) -> CustomFields -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"custom_fields" Key -> CustomFields -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe CustomFields
accountCustom_fields Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"deleted_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountDeleted_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_campaign_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountDunning_campaign_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"email" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEmail Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"entity_use_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEntity_use_code Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"exemption_certificate" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountExemption_certificate Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ExternalAccount] -> [Pair])
-> Maybe [ExternalAccount]
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> ([ExternalAccount] -> Pair) -> [ExternalAccount] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ExternalAccount]
accountExternal_accounts Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"first_name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountFirst_name Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_active_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_active_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_canceled_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_canceled_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_future_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_future_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_live_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_live_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_past_due_invoice" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_past_due_invoice Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_paused_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_paused_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"hosted_login_token" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountHosted_login_token Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountId Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice_template_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountInvoice_template_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"last_name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountLast_name Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountObject Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"override_business_entity_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountOverride_business_entity_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountParent_account_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountPreferred_locale -> [Pair])
-> Maybe AccountPreferred_locale
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountPreferred_locale -> Pair)
-> AccountPreferred_locale
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPreferred_locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountPreferred_locale
accountPreferred_locale Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_time_zone" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountPreferred_time_zone Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ShippingAddress] -> [Pair])
-> Maybe [ShippingAddress]
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> ([ShippingAddress] -> Pair) -> [ShippingAddress] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddress] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ShippingAddress]
accountShipping_addresses Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (AccountState -> [Pair]) -> Maybe AccountState -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountState -> Pair) -> AccountState -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> AccountState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountState
accountState Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_exempt" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountTax_exempt Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountUpdated_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"username" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountUsername Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountVat_number Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
    toEncoding :: Account -> Encoding
toEncoding Account
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series] -> (Address -> [Series]) -> Maybe Address -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Address -> Series) -> Address -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Address
accountAddress Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountBill_to -> [Series]) -> Maybe AccountBill_to -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountBill_to -> Series) -> AccountBill_to -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountBill_to -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountBill_to
accountBill_to Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (BillingInfo -> [Series]) -> Maybe BillingInfo -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (BillingInfo -> Series) -> BillingInfo -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfo -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe BillingInfo
accountBilling_info Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cc_emails" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCc_emails Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCode Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"company" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCompany Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountCreated_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (CustomFields -> [Series]) -> Maybe CustomFields -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (CustomFields -> Series) -> CustomFields -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"custom_fields" Key -> CustomFields -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe CustomFields
accountCustom_fields Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"deleted_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountDeleted_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_campaign_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountDunning_campaign_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"email" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEmail Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"entity_use_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEntity_use_code Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"exemption_certificate" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountExemption_certificate Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ExternalAccount] -> [Series])
-> Maybe [ExternalAccount]
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> ([ExternalAccount] -> Series) -> [ExternalAccount] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ExternalAccount]
accountExternal_accounts Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"first_name" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountFirst_name Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_active_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_active_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_canceled_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_canceled_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_future_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_future_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_live_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_live_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_past_due_invoice" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_past_due_invoice Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_paused_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_paused_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"hosted_login_token" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountHosted_login_token Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountId Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice_template_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountInvoice_template_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"last_name" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountLast_name Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountObject Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"override_business_entity_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountOverride_business_entity_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountParent_account_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountPreferred_locale -> [Series])
-> Maybe AccountPreferred_locale
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountPreferred_locale -> Series)
-> AccountPreferred_locale
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPreferred_locale -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountPreferred_locale
accountPreferred_locale Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_time_zone" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountPreferred_time_zone Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ShippingAddress] -> [Series])
-> Maybe [ShippingAddress]
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> ([ShippingAddress] -> Series) -> [ShippingAddress] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddress] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ShippingAddress]
accountShipping_addresses Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountState -> [Series]) -> Maybe AccountState -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountState -> Series) -> AccountState -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> AccountState -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountState
accountState Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_exempt" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountTax_exempt Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountUpdated_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"username" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountUsername Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountVat_number Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON Account where
    parseJSON :: Value -> Parser Account
parseJSON = String -> (Object -> Parser Account) -> Value -> Parser Account
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Account" (\Object
obj -> ((((((((((((((((((((((((((((((((((((Maybe Address
 -> Maybe AccountBill_to
 -> Maybe BillingInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe JsonDateTime
 -> Maybe CustomFields
 -> Maybe JsonDateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ExternalAccount]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe AccountPreferred_locale
 -> Maybe Text
 -> Maybe [ShippingAddress]
 -> Maybe AccountState
 -> Maybe Bool
 -> Maybe JsonDateTime
 -> Maybe Text
 -> Maybe Text
 -> Account)
-> Parser
     (Maybe Address
      -> Maybe AccountBill_to
      -> Maybe BillingInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Address
-> Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account
Account Parser
  (Maybe Address
   -> Maybe AccountBill_to
   -> Maybe BillingInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Address)
-> Parser
     (Maybe AccountBill_to
      -> Maybe BillingInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"address")) Parser
  (Maybe AccountBill_to
   -> Maybe BillingInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe AccountBill_to)
-> Parser
     (Maybe BillingInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountBill_to)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"bill_to")) Parser
  (Maybe BillingInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe BillingInfo)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe BillingInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"billing_info")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"cc_emails")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"code")) Parser
  (Maybe Text
   -> Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe JsonDateTime
      -> Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"company")) Parser
  (Maybe JsonDateTime
   -> Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe CustomFields
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"created_at")) Parser
  (Maybe CustomFields
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe CustomFields)
-> Parser
     (Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe CustomFields)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"custom_fields")) Parser
  (Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"deleted_at")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"dunning_campaign_id")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"email")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"entity_use_code")) Parser
  (Maybe Text
   -> Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ExternalAccount]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"exemption_certificate")) Parser
  (Maybe [ExternalAccount]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe [ExternalAccount])
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [ExternalAccount])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"external_accounts")) Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"first_name")) Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_active_subscription")) Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_canceled_subscription")) Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_future_subscription")) Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_live_subscription")) Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_past_due_invoice")) Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_paused_subscription")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"hosted_login_token")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"id")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"invoice_template_id")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"last_name")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"object")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"override_business_entity_id")) Parser
  (Maybe Text
   -> Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe AccountPreferred_locale
      -> Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"parent_account_id")) Parser
  (Maybe AccountPreferred_locale
   -> Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe AccountPreferred_locale)
-> Parser
     (Maybe Text
      -> Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountPreferred_locale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_locale")) Parser
  (Maybe Text
   -> Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ShippingAddress]
      -> Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_time_zone")) Parser
  (Maybe [ShippingAddress]
   -> Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe [ShippingAddress])
-> Parser
     (Maybe AccountState
      -> Maybe Bool
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [ShippingAddress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"shipping_addresses")) Parser
  (Maybe AccountState
   -> Maybe Bool
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Account)
-> Parser (Maybe AccountState)
-> Parser
     (Maybe Bool
      -> Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"state")) Parser
  (Maybe Bool
   -> Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe Bool)
-> Parser
     (Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"tax_exempt")) Parser (Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe JsonDateTime)
-> Parser (Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"updated_at")) Parser (Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"username")) Parser (Maybe Text -> Account)
-> Parser (Maybe Text) -> Parser Account
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"vat_number"))

-- | Create a new 'Account' with all required fields.
mkAccount :: Account
mkAccount :: Account
mkAccount =
    Account
        { accountAddress :: Maybe Address
accountAddress = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing
        , accountBill_to :: Maybe AccountBill_to
accountBill_to = Maybe AccountBill_to
forall a. Maybe a
GHC.Maybe.Nothing
        , accountBilling_info :: Maybe BillingInfo
accountBilling_info = Maybe BillingInfo
forall a. Maybe a
GHC.Maybe.Nothing
        , accountCc_emails :: Maybe Text
accountCc_emails = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountCode :: Maybe Text
accountCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountCompany :: Maybe Text
accountCompany = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountCreated_at :: Maybe JsonDateTime
accountCreated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , accountCustom_fields :: Maybe CustomFields
accountCustom_fields = Maybe CustomFields
forall a. Maybe a
GHC.Maybe.Nothing
        , accountDeleted_at :: Maybe JsonDateTime
accountDeleted_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , accountDunning_campaign_id :: Maybe Text
accountDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountEmail :: Maybe Text
accountEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountEntity_use_code :: Maybe Text
accountEntity_use_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountExemption_certificate :: Maybe Text
accountExemption_certificate = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountExternal_accounts :: Maybe [ExternalAccount]
accountExternal_accounts = Maybe [ExternalAccount]
forall a. Maybe a
GHC.Maybe.Nothing
        , accountFirst_name :: Maybe Text
accountFirst_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_active_subscription :: Maybe Bool
accountHas_active_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_canceled_subscription :: Maybe Bool
accountHas_canceled_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_future_subscription :: Maybe Bool
accountHas_future_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_live_subscription :: Maybe Bool
accountHas_live_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_past_due_invoice :: Maybe Bool
accountHas_past_due_invoice = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHas_paused_subscription :: Maybe Bool
accountHas_paused_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountHosted_login_token :: Maybe Text
accountHosted_login_token = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountId :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountInvoice_template_id :: Maybe Text
accountInvoice_template_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountLast_name :: Maybe Text
accountLast_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountObject :: Maybe Text
accountObject = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountOverride_business_entity_id :: Maybe Text
accountOverride_business_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountParent_account_id :: Maybe Text
accountParent_account_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountPreferred_locale :: Maybe AccountPreferred_locale
accountPreferred_locale = Maybe AccountPreferred_locale
forall a. Maybe a
GHC.Maybe.Nothing
        , accountPreferred_time_zone :: Maybe Text
accountPreferred_time_zone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountShipping_addresses :: Maybe [ShippingAddress]
accountShipping_addresses = Maybe [ShippingAddress]
forall a. Maybe a
GHC.Maybe.Nothing
        , accountState :: Maybe AccountState
accountState = Maybe AccountState
forall a. Maybe a
GHC.Maybe.Nothing
        , accountTax_exempt :: Maybe Bool
accountTax_exempt = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , accountUpdated_at :: Maybe JsonDateTime
accountUpdated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , accountUsername :: Maybe Text
accountUsername = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , accountVat_number :: Maybe Text
accountVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        }

{- | Defines the enum schema located at @components.schemas.Account.allOf.properties.bill_to@ in the specification.

An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
-}
data AccountBill_to
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      AccountBill_toOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      AccountBill_toTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"parent"@
      AccountBill_toEnumParent
    | -- | Represents the JSON value @"self"@
      AccountBill_toEnumSelf
    deriving (Int -> AccountBill_to -> ShowS
[AccountBill_to] -> ShowS
AccountBill_to -> String
(Int -> AccountBill_to -> ShowS)
-> (AccountBill_to -> String)
-> ([AccountBill_to] -> ShowS)
-> Show AccountBill_to
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountBill_to -> ShowS
showsPrec :: Int -> AccountBill_to -> ShowS
$cshow :: AccountBill_to -> String
show :: AccountBill_to -> String
$cshowList :: [AccountBill_to] -> ShowS
showList :: [AccountBill_to] -> ShowS
GHC.Show.Show, AccountBill_to -> AccountBill_to -> Bool
(AccountBill_to -> AccountBill_to -> Bool)
-> (AccountBill_to -> AccountBill_to -> Bool) -> Eq AccountBill_to
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountBill_to -> AccountBill_to -> Bool
== :: AccountBill_to -> AccountBill_to -> Bool
$c/= :: AccountBill_to -> AccountBill_to -> Bool
/= :: AccountBill_to -> AccountBill_to -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON AccountBill_to where
    toJSON :: AccountBill_to -> Value
toJSON (AccountBill_toOther Value
val) = Value
val
    toJSON (AccountBill_toTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (AccountBill_to
AccountBill_toEnumParent) = Value
"parent"
    toJSON (AccountBill_to
AccountBill_toEnumSelf) = Value
"self"
instance Data.Aeson.Types.FromJSON.FromJSON AccountBill_to where
    parseJSON :: Value -> Parser AccountBill_to
parseJSON Value
val =
        AccountBill_to -> Parser AccountBill_to
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
            ( if
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"parent" -> AccountBill_to
AccountBill_toEnumParent
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"self" -> AccountBill_to
AccountBill_toEnumSelf
                | Bool
GHC.Base.otherwise -> Value -> AccountBill_to
AccountBill_toOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Account.allOf.properties.preferred_locale@ in the specification.

Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
-}
data AccountPreferred_locale
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      AccountPreferred_localeOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      AccountPreferred_localeTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"da-DK"@
      AccountPreferred_localeEnumDa_DK
    | -- | Represents the JSON value @"de-CH"@
      AccountPreferred_localeEnumDe_CH
    | -- | Represents the JSON value @"de-DE"@
      AccountPreferred_localeEnumDe_DE
    | -- | Represents the JSON value @"en-AU"@
      AccountPreferred_localeEnumEn_AU
    | -- | Represents the JSON value @"en-CA"@
      AccountPreferred_localeEnumEn_CA
    | -- | Represents the JSON value @"en-GB"@
      AccountPreferred_localeEnumEn_GB
    | -- | Represents the JSON value @"en-IE"@
      AccountPreferred_localeEnumEn_IE
    | -- | Represents the JSON value @"en-NZ"@
      AccountPreferred_localeEnumEn_NZ
    | -- | Represents the JSON value @"en-US"@
      AccountPreferred_localeEnumEn_US
    | -- | Represents the JSON value @"es-ES"@
      AccountPreferred_localeEnumEs_ES
    | -- | Represents the JSON value @"es-MX"@
      AccountPreferred_localeEnumEs_MX
    | -- | Represents the JSON value @"es-US"@
      AccountPreferred_localeEnumEs_US
    | -- | Represents the JSON value @"fi-FI"@
      AccountPreferred_localeEnumFi_FI
    | -- | Represents the JSON value @"fr-BE"@
      AccountPreferred_localeEnumFr_BE
    | -- | Represents the JSON value @"fr-CA"@
      AccountPreferred_localeEnumFr_CA
    | -- | Represents the JSON value @"fr-CH"@
      AccountPreferred_localeEnumFr_CH
    | -- | Represents the JSON value @"fr-FR"@
      AccountPreferred_localeEnumFr_FR
    | -- | Represents the JSON value @"hi-IN"@
      AccountPreferred_localeEnumHi_IN
    | -- | Represents the JSON value @"it-IT"@
      AccountPreferred_localeEnumIt_IT
    | -- | Represents the JSON value @"ja-JP"@
      AccountPreferred_localeEnumJa_JP
    | -- | Represents the JSON value @"ko-KR"@
      AccountPreferred_localeEnumKo_KR
    | -- | Represents the JSON value @"nl-BE"@
      AccountPreferred_localeEnumNl_BE
    | -- | Represents the JSON value @"nl-NL"@
      AccountPreferred_localeEnumNl_NL
    | -- | Represents the JSON value @"pl-PL"@
      AccountPreferred_localeEnumPl_PL
    | -- | Represents the JSON value @"pt-BR"@
      AccountPreferred_localeEnumPt_BR
    | -- | Represents the JSON value @"pt-PT"@
      AccountPreferred_localeEnumPt_PT
    | -- | Represents the JSON value @"ro-RO"@
      AccountPreferred_localeEnumRo_RO
    | -- | Represents the JSON value @"ru-RU"@
      AccountPreferred_localeEnumRu_RU
    | -- | Represents the JSON value @"sk-SK"@
      AccountPreferred_localeEnumSk_SK
    | -- | Represents the JSON value @"sv-SE"@
      AccountPreferred_localeEnumSv_SE
    | -- | Represents the JSON value @"tr-TR"@
      AccountPreferred_localeEnumTr_TR
    | -- | Represents the JSON value @"zh-CN"@
      AccountPreferred_localeEnumZh_CN
    deriving (Int -> AccountPreferred_locale -> ShowS
[AccountPreferred_locale] -> ShowS
AccountPreferred_locale -> String
(Int -> AccountPreferred_locale -> ShowS)
-> (AccountPreferred_locale -> String)
-> ([AccountPreferred_locale] -> ShowS)
-> Show AccountPreferred_locale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPreferred_locale -> ShowS
showsPrec :: Int -> AccountPreferred_locale -> ShowS
$cshow :: AccountPreferred_locale -> String
show :: AccountPreferred_locale -> String
$cshowList :: [AccountPreferred_locale] -> ShowS
showList :: [AccountPreferred_locale] -> ShowS
GHC.Show.Show, AccountPreferred_locale -> AccountPreferred_locale -> Bool
(AccountPreferred_locale -> AccountPreferred_locale -> Bool)
-> (AccountPreferred_locale -> AccountPreferred_locale -> Bool)
-> Eq AccountPreferred_locale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
== :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
$c/= :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
/= :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON AccountPreferred_locale where
    toJSON :: AccountPreferred_locale -> Value
toJSON (AccountPreferred_localeOther Value
val) = Value
val
    toJSON (AccountPreferred_localeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDa_DK) = Value
"da-DK"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDe_CH) = Value
"de-CH"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDe_DE) = Value
"de-DE"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_AU) = Value
"en-AU"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_CA) = Value
"en-CA"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_GB) = Value
"en-GB"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_IE) = Value
"en-IE"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_NZ) = Value
"en-NZ"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_US) = Value
"en-US"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_ES) = Value
"es-ES"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_MX) = Value
"es-MX"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_US) = Value
"es-US"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFi_FI) = Value
"fi-FI"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_BE) = Value
"fr-BE"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_CA) = Value
"fr-CA"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_CH) = Value
"fr-CH"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_FR) = Value
"fr-FR"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumHi_IN) = Value
"hi-IN"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumIt_IT) = Value
"it-IT"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumJa_JP) = Value
"ja-JP"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumKo_KR) = Value
"ko-KR"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumNl_BE) = Value
"nl-BE"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumNl_NL) = Value
"nl-NL"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPl_PL) = Value
"pl-PL"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPt_BR) = Value
"pt-BR"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPt_PT) = Value
"pt-PT"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumRo_RO) = Value
"ro-RO"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumRu_RU) = Value
"ru-RU"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumSk_SK) = Value
"sk-SK"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumSv_SE) = Value
"sv-SE"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumTr_TR) = Value
"tr-TR"
    toJSON (AccountPreferred_locale
AccountPreferred_localeEnumZh_CN) = Value
"zh-CN"
instance Data.Aeson.Types.FromJSON.FromJSON AccountPreferred_locale where
    parseJSON :: Value -> Parser AccountPreferred_locale
parseJSON Value
val =
        AccountPreferred_locale -> Parser AccountPreferred_locale
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
            ( if
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"da-DK" -> AccountPreferred_locale
AccountPreferred_localeEnumDa_DK
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-CH" -> AccountPreferred_locale
AccountPreferred_localeEnumDe_CH
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-DE" -> AccountPreferred_locale
AccountPreferred_localeEnumDe_DE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-AU" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_AU
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-CA" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_CA
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-GB" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_GB
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-IE" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_IE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-NZ" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_NZ
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-US" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_US
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-ES" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_ES
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-MX" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_MX
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-US" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_US
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fi-FI" -> AccountPreferred_locale
AccountPreferred_localeEnumFi_FI
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-BE" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_BE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CA" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_CA
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CH" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_CH
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-FR" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_FR
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hi-IN" -> AccountPreferred_locale
AccountPreferred_localeEnumHi_IN
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"it-IT" -> AccountPreferred_locale
AccountPreferred_localeEnumIt_IT
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ja-JP" -> AccountPreferred_locale
AccountPreferred_localeEnumJa_JP
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ko-KR" -> AccountPreferred_locale
AccountPreferred_localeEnumKo_KR
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-BE" -> AccountPreferred_locale
AccountPreferred_localeEnumNl_BE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-NL" -> AccountPreferred_locale
AccountPreferred_localeEnumNl_NL
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pl-PL" -> AccountPreferred_locale
AccountPreferred_localeEnumPl_PL
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-BR" -> AccountPreferred_locale
AccountPreferred_localeEnumPt_BR
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-PT" -> AccountPreferred_locale
AccountPreferred_localeEnumPt_PT
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ro-RO" -> AccountPreferred_locale
AccountPreferred_localeEnumRo_RO
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru-RU" -> AccountPreferred_locale
AccountPreferred_localeEnumRu_RU
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sk-SK" -> AccountPreferred_locale
AccountPreferred_localeEnumSk_SK
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sv-SE" -> AccountPreferred_locale
AccountPreferred_localeEnumSv_SE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tr-TR" -> AccountPreferred_locale
AccountPreferred_localeEnumTr_TR
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"zh-CN" -> AccountPreferred_locale
AccountPreferred_localeEnumZh_CN
                | Bool
GHC.Base.otherwise -> Value -> AccountPreferred_locale
AccountPreferred_localeOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Account.allOf.properties.state@ in the specification.

Accounts can be either active or inactive.
-}
data AccountState
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      AccountStateOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      AccountStateTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"active"@
      AccountStateEnumActive
    | -- | Represents the JSON value @"inactive"@
      AccountStateEnumInactive
    deriving (Int -> AccountState -> ShowS
[AccountState] -> ShowS
AccountState -> String
(Int -> AccountState -> ShowS)
-> (AccountState -> String)
-> ([AccountState] -> ShowS)
-> Show AccountState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountState -> ShowS
showsPrec :: Int -> AccountState -> ShowS
$cshow :: AccountState -> String
show :: AccountState -> String
$cshowList :: [AccountState] -> ShowS
showList :: [AccountState] -> ShowS
GHC.Show.Show, AccountState -> AccountState -> Bool
(AccountState -> AccountState -> Bool)
-> (AccountState -> AccountState -> Bool) -> Eq AccountState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountState -> AccountState -> Bool
== :: AccountState -> AccountState -> Bool
$c/= :: AccountState -> AccountState -> Bool
/= :: AccountState -> AccountState -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON AccountState where
    toJSON :: AccountState -> Value
toJSON (AccountStateOther Value
val) = Value
val
    toJSON (AccountStateTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (AccountState
AccountStateEnumActive) = Value
"active"
    toJSON (AccountState
AccountStateEnumInactive) = Value
"inactive"
instance Data.Aeson.Types.FromJSON.FromJSON AccountState where
    parseJSON :: Value -> Parser AccountState
parseJSON Value
val =
        AccountState -> Parser AccountState
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
            ( if
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"active" -> AccountState
AccountStateEnumActive
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"inactive" -> AccountState
AccountStateEnumInactive
                | Bool
GHC.Base.otherwise -> Value -> AccountState
AccountStateOther Value
val
            )