{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Types.AccountCreate 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.AccountAcquisitionUpdate
import {-# SOURCE #-} RecurlyClient.Types.AccountUpdate
import {-# SOURCE #-} RecurlyClient.Types.Address
import {-# SOURCE #-} RecurlyClient.Types.BillingInfoCreate
import {-# SOURCE #-} RecurlyClient.Types.ExternalAccountCreate
import {-# SOURCE #-} RecurlyClient.Types.ShippingAddressCreate
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data AccountCreate = AccountCreate
{ AccountCreate -> Maybe AccountAcquisitionUpdate
accountCreateAcquisition :: (GHC.Maybe.Maybe AccountAcquisitionUpdate)
, AccountCreate -> Maybe Address
accountCreateAddress :: (GHC.Maybe.Maybe Address)
, AccountCreate -> Maybe AccountCreateBill_to
accountCreateBill_to :: (GHC.Maybe.Maybe AccountCreateBill_to)
, AccountCreate -> Maybe BillingInfoCreate
accountCreateBilling_info :: (GHC.Maybe.Maybe BillingInfoCreate)
, AccountCreate -> Maybe Text
accountCreateCc_emails :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Text
accountCreateCode :: Data.Text.Internal.Text
, AccountCreate -> Maybe Text
accountCreateCompany :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe CustomFields
accountCreateCustom_fields :: (GHC.Maybe.Maybe CustomFields)
, AccountCreate -> Maybe Text
accountCreateDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateEntity_use_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateExemption_certificate :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe [ExternalAccountCreate]
accountCreateExternal_accounts :: (GHC.Maybe.Maybe [ExternalAccountCreate])
, AccountCreate -> Maybe Text
accountCreateFirst_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateInvoice_template_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateLast_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateOverride_business_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateParent_account_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateParent_account_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe AccountCreatePreferred_locale
accountCreatePreferred_locale :: (GHC.Maybe.Maybe AccountCreatePreferred_locale)
, AccountCreate -> Maybe Text
accountCreatePreferred_time_zone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe [ShippingAddressCreate]
accountCreateShipping_addresses :: (GHC.Maybe.Maybe [ShippingAddressCreate])
, AccountCreate -> Maybe Bool
accountCreateTax_exempt :: (GHC.Maybe.Maybe GHC.Types.Bool)
, AccountCreate -> Maybe AccountCreateTransaction_type
accountCreateTransaction_type :: (GHC.Maybe.Maybe AccountCreateTransaction_type)
, AccountCreate -> Maybe Text
accountCreateUsername :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountCreate -> Maybe Text
accountCreateVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> AccountCreate -> ShowS
[AccountCreate] -> ShowS
AccountCreate -> String
(Int -> AccountCreate -> ShowS)
-> (AccountCreate -> String)
-> ([AccountCreate] -> ShowS)
-> Show AccountCreate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountCreate -> ShowS
showsPrec :: Int -> AccountCreate -> ShowS
$cshow :: AccountCreate -> String
show :: AccountCreate -> String
$cshowList :: [AccountCreate] -> ShowS
showList :: [AccountCreate] -> ShowS
GHC.Show.Show
, AccountCreate -> AccountCreate -> Bool
(AccountCreate -> AccountCreate -> Bool)
-> (AccountCreate -> AccountCreate -> Bool) -> Eq AccountCreate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountCreate -> AccountCreate -> Bool
== :: AccountCreate -> AccountCreate -> Bool
$c/= :: AccountCreate -> AccountCreate -> Bool
/= :: AccountCreate -> AccountCreate -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON AccountCreate where
toJSON :: AccountCreate -> Value
toJSON AccountCreate
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair]
-> (AccountAcquisitionUpdate -> [Pair])
-> Maybe AccountAcquisitionUpdate
-> [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])
-> (AccountAcquisitionUpdate -> Pair)
-> AccountAcquisitionUpdate
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"acquisition" Key -> AccountAcquisitionUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountAcquisitionUpdate
accountCreateAcquisition AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [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..=)) (AccountCreate -> Maybe Address
accountCreateAddress AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountCreateBill_to -> [Pair])
-> Maybe AccountCreateBill_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])
-> (AccountCreateBill_to -> Pair) -> AccountCreateBill_to -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountCreateBill_to -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreateBill_to
accountCreateBill_to AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (BillingInfoCreate -> [Pair])
-> Maybe BillingInfoCreate
-> [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])
-> (BillingInfoCreate -> Pair) -> BillingInfoCreate -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfoCreate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe BillingInfoCreate
accountCreateBilling_info AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateCc_emails AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [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..= AccountCreate -> Text
accountCreateCode AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateCompany AccountCreate
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..=)) (AccountCreate -> Maybe CustomFields
accountCreateCustom_fields AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateDunning_campaign_id AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateEmail AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateEntity_use_code AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateExemption_certificate AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ExternalAccountCreate] -> [Pair])
-> Maybe [ExternalAccountCreate]
-> [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])
-> ([ExternalAccountCreate] -> Pair)
-> [ExternalAccountCreate]
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccountCreate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe [ExternalAccountCreate]
accountCreateExternal_accounts AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateFirst_name AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateInvoice_template_id AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateLast_name AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateOverride_business_entity_id AccountCreate
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_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..=)) (AccountCreate -> Maybe Text
accountCreateParent_account_code AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateParent_account_id AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountCreatePreferred_locale -> [Pair])
-> Maybe AccountCreatePreferred_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])
-> (AccountCreatePreferred_locale -> Pair)
-> AccountCreatePreferred_locale
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountCreatePreferred_locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreatePreferred_locale
accountCreatePreferred_locale AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreatePreferred_time_zone AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ShippingAddressCreate] -> [Pair])
-> Maybe [ShippingAddressCreate]
-> [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])
-> ([ShippingAddressCreate] -> Pair)
-> [ShippingAddressCreate]
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddressCreate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe [ShippingAddressCreate]
accountCreateShipping_addresses AccountCreate
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..=)) (AccountCreate -> Maybe Bool
accountCreateTax_exempt AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountCreateTransaction_type -> [Pair])
-> Maybe AccountCreateTransaction_type
-> [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])
-> (AccountCreateTransaction_type -> Pair)
-> AccountCreateTransaction_type
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountCreateTransaction_type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreateTransaction_type
accountCreateTransaction_type AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateUsername AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateVat_number AccountCreate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: AccountCreate -> Encoding
toEncoding AccountCreate
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]
-> (AccountAcquisitionUpdate -> [Series])
-> Maybe AccountAcquisitionUpdate
-> [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])
-> (AccountAcquisitionUpdate -> Series)
-> AccountAcquisitionUpdate
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"acquisition" Key -> AccountAcquisitionUpdate -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountAcquisitionUpdate
accountCreateAcquisition AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [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..=)) (AccountCreate -> Maybe Address
accountCreateAddress AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountCreateBill_to -> [Series])
-> Maybe AccountCreateBill_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])
-> (AccountCreateBill_to -> Series)
-> AccountCreateBill_to
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountCreateBill_to -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreateBill_to
accountCreateBill_to AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (BillingInfoCreate -> [Series])
-> Maybe BillingInfoCreate
-> [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])
-> (BillingInfoCreate -> Series) -> BillingInfoCreate -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfoCreate -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe BillingInfoCreate
accountCreateBilling_info AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateCc_emails AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [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..= AccountCreate -> Text
accountCreateCode AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateCompany AccountCreate
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..=)) (AccountCreate -> Maybe CustomFields
accountCreateCustom_fields AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateDunning_campaign_id AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateEmail AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateEntity_use_code AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateExemption_certificate AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ExternalAccountCreate] -> [Series])
-> Maybe [ExternalAccountCreate]
-> [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])
-> ([ExternalAccountCreate] -> Series)
-> [ExternalAccountCreate]
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccountCreate] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe [ExternalAccountCreate]
accountCreateExternal_accounts AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateFirst_name AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateInvoice_template_id AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateLast_name AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateOverride_business_entity_id AccountCreate
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_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..=)) (AccountCreate -> Maybe Text
accountCreateParent_account_code AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateParent_account_id AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountCreatePreferred_locale -> [Series])
-> Maybe AccountCreatePreferred_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])
-> (AccountCreatePreferred_locale -> Series)
-> AccountCreatePreferred_locale
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountCreatePreferred_locale -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreatePreferred_locale
accountCreatePreferred_locale AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreatePreferred_time_zone AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ShippingAddressCreate] -> [Series])
-> Maybe [ShippingAddressCreate]
-> [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])
-> ([ShippingAddressCreate] -> Series)
-> [ShippingAddressCreate]
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddressCreate] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe [ShippingAddressCreate]
accountCreateShipping_addresses AccountCreate
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..=)) (AccountCreate -> Maybe Bool
accountCreateTax_exempt AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountCreateTransaction_type -> [Series])
-> Maybe AccountCreateTransaction_type
-> [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])
-> (AccountCreateTransaction_type -> Series)
-> AccountCreateTransaction_type
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountCreateTransaction_type -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountCreate -> Maybe AccountCreateTransaction_type
accountCreateTransaction_type AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateUsername AccountCreate
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..=)) (AccountCreate -> Maybe Text
accountCreateVat_number AccountCreate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON AccountCreate where
parseJSON :: Value -> Parser AccountCreate
parseJSON = String
-> (Object -> Parser AccountCreate)
-> Value
-> Parser AccountCreate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"AccountCreate" (\Object
obj -> ((((((((((((((((((((((((((Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser
(Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate
AccountCreate Parser
(Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe AccountAcquisitionUpdate)
-> Parser
(Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountAcquisitionUpdate)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"acquisition")) Parser
(Maybe Address
-> Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Address)
-> Parser
(Maybe AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe AccountCreateBill_to)
-> Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreateBill_to)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"bill_to")) Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe BillingInfoCreate)
-> Parser
(Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 BillingInfoCreate)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"billing_info")) Parser
(Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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
(Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 Text
forall a. FromJSON a => Object -> Key -> Parser a
Data.Aeson.Types.FromJSON..: Key
"code")) Parser
(Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe CustomFields)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ExternalAccountCreate]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe [ExternalAccountCreate])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ExternalAccountCreate])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"external_accounts")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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_code")) Parser
(Maybe Text
-> Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreatePreferred_locale
-> Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe AccountCreatePreferred_locale)
-> Parser
(Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 AccountCreatePreferred_locale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_locale")) Parser
(Maybe Text
-> Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ShippingAddressCreate]
-> Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe [ShippingAddressCreate])
-> Parser
(Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
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 [ShippingAddressCreate])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"shipping_addresses")) Parser
(Maybe Bool
-> Maybe AccountCreateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountCreate)
-> Parser (Maybe Bool)
-> Parser
(Maybe AccountCreateTransaction_type
-> Maybe Text -> Maybe Text -> AccountCreate)
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 AccountCreateTransaction_type
-> Maybe Text -> Maybe Text -> AccountCreate)
-> Parser (Maybe AccountCreateTransaction_type)
-> Parser (Maybe Text -> Maybe Text -> AccountCreate)
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 AccountCreateTransaction_type)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"transaction_type")) Parser (Maybe Text -> Maybe Text -> AccountCreate)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AccountCreate)
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 -> AccountCreate)
-> Parser (Maybe Text) -> Parser AccountCreate
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"))
mkAccountCreate ::
Data.Text.Internal.Text ->
AccountCreate
mkAccountCreate :: Text -> AccountCreate
mkAccountCreate Text
accountCreateCode =
AccountCreate
{ accountCreateAcquisition :: Maybe AccountAcquisitionUpdate
accountCreateAcquisition = Maybe AccountAcquisitionUpdate
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateAddress :: Maybe Address
accountCreateAddress = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateBill_to :: Maybe AccountCreateBill_to
accountCreateBill_to = Maybe AccountCreateBill_to
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateBilling_info :: Maybe BillingInfoCreate
accountCreateBilling_info = Maybe BillingInfoCreate
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateCc_emails :: Maybe Text
accountCreateCc_emails = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateCode :: Text
accountCreateCode = Text
accountCreateCode
, accountCreateCompany :: Maybe Text
accountCreateCompany = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateCustom_fields :: Maybe CustomFields
accountCreateCustom_fields = Maybe CustomFields
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateDunning_campaign_id :: Maybe Text
accountCreateDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateEmail :: Maybe Text
accountCreateEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateEntity_use_code :: Maybe Text
accountCreateEntity_use_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateExemption_certificate :: Maybe Text
accountCreateExemption_certificate = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateExternal_accounts :: Maybe [ExternalAccountCreate]
accountCreateExternal_accounts = Maybe [ExternalAccountCreate]
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateFirst_name :: Maybe Text
accountCreateFirst_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateInvoice_template_id :: Maybe Text
accountCreateInvoice_template_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateLast_name :: Maybe Text
accountCreateLast_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateOverride_business_entity_id :: Maybe Text
accountCreateOverride_business_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateParent_account_code :: Maybe Text
accountCreateParent_account_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateParent_account_id :: Maybe Text
accountCreateParent_account_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreatePreferred_locale :: Maybe AccountCreatePreferred_locale
accountCreatePreferred_locale = Maybe AccountCreatePreferred_locale
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreatePreferred_time_zone :: Maybe Text
accountCreatePreferred_time_zone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateShipping_addresses :: Maybe [ShippingAddressCreate]
accountCreateShipping_addresses = Maybe [ShippingAddressCreate]
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateTax_exempt :: Maybe Bool
accountCreateTax_exempt = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateTransaction_type :: Maybe AccountCreateTransaction_type
accountCreateTransaction_type = Maybe AccountCreateTransaction_type
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateUsername :: Maybe Text
accountCreateUsername = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreateVat_number :: Maybe Text
accountCreateVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data AccountCreateBill_to
=
AccountCreateBill_toOther Data.Aeson.Types.Internal.Value
|
AccountCreateBill_toTyped Data.Text.Internal.Text
|
AccountCreateBill_toEnumParent
|
AccountCreateBill_toEnumSelf
deriving (Int -> AccountCreateBill_to -> ShowS
[AccountCreateBill_to] -> ShowS
AccountCreateBill_to -> String
(Int -> AccountCreateBill_to -> ShowS)
-> (AccountCreateBill_to -> String)
-> ([AccountCreateBill_to] -> ShowS)
-> Show AccountCreateBill_to
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountCreateBill_to -> ShowS
showsPrec :: Int -> AccountCreateBill_to -> ShowS
$cshow :: AccountCreateBill_to -> String
show :: AccountCreateBill_to -> String
$cshowList :: [AccountCreateBill_to] -> ShowS
showList :: [AccountCreateBill_to] -> ShowS
GHC.Show.Show, AccountCreateBill_to -> AccountCreateBill_to -> Bool
(AccountCreateBill_to -> AccountCreateBill_to -> Bool)
-> (AccountCreateBill_to -> AccountCreateBill_to -> Bool)
-> Eq AccountCreateBill_to
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountCreateBill_to -> AccountCreateBill_to -> Bool
== :: AccountCreateBill_to -> AccountCreateBill_to -> Bool
$c/= :: AccountCreateBill_to -> AccountCreateBill_to -> Bool
/= :: AccountCreateBill_to -> AccountCreateBill_to -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountCreateBill_to where
toJSON :: AccountCreateBill_to -> Value
toJSON (AccountCreateBill_toOther Value
val) = Value
val
toJSON (AccountCreateBill_toTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountCreateBill_to
AccountCreateBill_toEnumParent) = Value
"parent"
toJSON (AccountCreateBill_to
AccountCreateBill_toEnumSelf) = Value
"self"
instance Data.Aeson.Types.FromJSON.FromJSON AccountCreateBill_to where
parseJSON :: Value -> Parser AccountCreateBill_to
parseJSON Value
val =
AccountCreateBill_to -> Parser AccountCreateBill_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" -> AccountCreateBill_to
AccountCreateBill_toEnumParent
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"self" -> AccountCreateBill_to
AccountCreateBill_toEnumSelf
| Bool
GHC.Base.otherwise -> Value -> AccountCreateBill_to
AccountCreateBill_toOther Value
val
)
data AccountCreatePreferred_locale
=
AccountCreatePreferred_localeOther Data.Aeson.Types.Internal.Value
|
AccountCreatePreferred_localeTyped Data.Text.Internal.Text
|
AccountCreatePreferred_localeEnumDa_DK
|
AccountCreatePreferred_localeEnumDe_CH
|
AccountCreatePreferred_localeEnumDe_DE
|
AccountCreatePreferred_localeEnumEn_AU
|
AccountCreatePreferred_localeEnumEn_CA
|
AccountCreatePreferred_localeEnumEn_GB
|
AccountCreatePreferred_localeEnumEn_IE
|
AccountCreatePreferred_localeEnumEn_NZ
|
AccountCreatePreferred_localeEnumEn_US
|
AccountCreatePreferred_localeEnumEs_ES
|
AccountCreatePreferred_localeEnumEs_MX
|
AccountCreatePreferred_localeEnumEs_US
|
AccountCreatePreferred_localeEnumFi_FI
|
AccountCreatePreferred_localeEnumFr_BE
|
AccountCreatePreferred_localeEnumFr_CA
|
AccountCreatePreferred_localeEnumFr_CH
|
AccountCreatePreferred_localeEnumFr_FR
|
AccountCreatePreferred_localeEnumHi_IN
|
AccountCreatePreferred_localeEnumIt_IT
|
AccountCreatePreferred_localeEnumJa_JP
|
AccountCreatePreferred_localeEnumKo_KR
|
AccountCreatePreferred_localeEnumNl_BE
|
AccountCreatePreferred_localeEnumNl_NL
|
AccountCreatePreferred_localeEnumPl_PL
|
AccountCreatePreferred_localeEnumPt_BR
|
AccountCreatePreferred_localeEnumPt_PT
|
AccountCreatePreferred_localeEnumRo_RO
|
AccountCreatePreferred_localeEnumRu_RU
|
AccountCreatePreferred_localeEnumSk_SK
|
AccountCreatePreferred_localeEnumSv_SE
|
AccountCreatePreferred_localeEnumTr_TR
|
AccountCreatePreferred_localeEnumZh_CN
deriving (Int -> AccountCreatePreferred_locale -> ShowS
[AccountCreatePreferred_locale] -> ShowS
AccountCreatePreferred_locale -> String
(Int -> AccountCreatePreferred_locale -> ShowS)
-> (AccountCreatePreferred_locale -> String)
-> ([AccountCreatePreferred_locale] -> ShowS)
-> Show AccountCreatePreferred_locale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountCreatePreferred_locale -> ShowS
showsPrec :: Int -> AccountCreatePreferred_locale -> ShowS
$cshow :: AccountCreatePreferred_locale -> String
show :: AccountCreatePreferred_locale -> String
$cshowList :: [AccountCreatePreferred_locale] -> ShowS
showList :: [AccountCreatePreferred_locale] -> ShowS
GHC.Show.Show, AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool
(AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool)
-> (AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool)
-> Eq AccountCreatePreferred_locale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool
== :: AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool
$c/= :: AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool
/= :: AccountCreatePreferred_locale
-> AccountCreatePreferred_locale -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountCreatePreferred_locale where
toJSON :: AccountCreatePreferred_locale -> Value
toJSON (AccountCreatePreferred_localeOther Value
val) = Value
val
toJSON (AccountCreatePreferred_localeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDa_DK) = Value
"da-DK"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDe_CH) = Value
"de-CH"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDe_DE) = Value
"de-DE"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_AU) = Value
"en-AU"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_CA) = Value
"en-CA"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_GB) = Value
"en-GB"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_IE) = Value
"en-IE"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_NZ) = Value
"en-NZ"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_US) = Value
"en-US"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_ES) = Value
"es-ES"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_MX) = Value
"es-MX"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_US) = Value
"es-US"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFi_FI) = Value
"fi-FI"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_BE) = Value
"fr-BE"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_CA) = Value
"fr-CA"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_CH) = Value
"fr-CH"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_FR) = Value
"fr-FR"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumHi_IN) = Value
"hi-IN"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumIt_IT) = Value
"it-IT"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumJa_JP) = Value
"ja-JP"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumKo_KR) = Value
"ko-KR"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumNl_BE) = Value
"nl-BE"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumNl_NL) = Value
"nl-NL"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPl_PL) = Value
"pl-PL"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPt_BR) = Value
"pt-BR"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPt_PT) = Value
"pt-PT"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumRo_RO) = Value
"ro-RO"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumRu_RU) = Value
"ru-RU"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumSk_SK) = Value
"sk-SK"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumSv_SE) = Value
"sv-SE"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumTr_TR) = Value
"tr-TR"
toJSON (AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumZh_CN) = Value
"zh-CN"
instance Data.Aeson.Types.FromJSON.FromJSON AccountCreatePreferred_locale where
parseJSON :: Value -> Parser AccountCreatePreferred_locale
parseJSON Value
val =
AccountCreatePreferred_locale
-> Parser AccountCreatePreferred_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" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDa_DK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-CH" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDe_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-DE" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumDe_DE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-AU" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_AU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-CA" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-GB" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_GB
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-IE" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_IE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-NZ" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_NZ
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-US" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEn_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-ES" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_ES
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-MX" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_MX
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-US" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumEs_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fi-FI" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFi_FI
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-BE" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CA" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CH" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-FR" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumFr_FR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hi-IN" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumHi_IN
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"it-IT" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumIt_IT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ja-JP" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumJa_JP
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ko-KR" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumKo_KR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-BE" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumNl_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-NL" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumNl_NL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pl-PL" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPl_PL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-BR" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPt_BR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-PT" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumPt_PT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ro-RO" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumRo_RO
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru-RU" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumRu_RU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sk-SK" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumSk_SK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sv-SE" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumSv_SE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tr-TR" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumTr_TR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"zh-CN" -> AccountCreatePreferred_locale
AccountCreatePreferred_localeEnumZh_CN
| Bool
GHC.Base.otherwise -> Value -> AccountCreatePreferred_locale
AccountCreatePreferred_localeOther Value
val
)
data AccountCreateTransaction_type
=
AccountCreateTransaction_typeOther Data.Aeson.Types.Internal.Value
|
AccountCreateTransaction_typeTyped Data.Text.Internal.Text
|
AccountCreateTransaction_typeEnumMoto
deriving (Int -> AccountCreateTransaction_type -> ShowS
[AccountCreateTransaction_type] -> ShowS
AccountCreateTransaction_type -> String
(Int -> AccountCreateTransaction_type -> ShowS)
-> (AccountCreateTransaction_type -> String)
-> ([AccountCreateTransaction_type] -> ShowS)
-> Show AccountCreateTransaction_type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountCreateTransaction_type -> ShowS
showsPrec :: Int -> AccountCreateTransaction_type -> ShowS
$cshow :: AccountCreateTransaction_type -> String
show :: AccountCreateTransaction_type -> String
$cshowList :: [AccountCreateTransaction_type] -> ShowS
showList :: [AccountCreateTransaction_type] -> ShowS
GHC.Show.Show, AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool
(AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool)
-> (AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool)
-> Eq AccountCreateTransaction_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool
== :: AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool
$c/= :: AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool
/= :: AccountCreateTransaction_type
-> AccountCreateTransaction_type -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountCreateTransaction_type where
toJSON :: AccountCreateTransaction_type -> Value
toJSON (AccountCreateTransaction_typeOther Value
val) = Value
val
toJSON (AccountCreateTransaction_typeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountCreateTransaction_type
AccountCreateTransaction_typeEnumMoto) = Value
"moto"
instance Data.Aeson.Types.FromJSON.FromJSON AccountCreateTransaction_type where
parseJSON :: Value -> Parser AccountCreateTransaction_type
parseJSON Value
val =
AccountCreateTransaction_type
-> Parser AccountCreateTransaction_type
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
"moto" -> AccountCreateTransaction_type
AccountCreateTransaction_typeEnumMoto
| Bool
GHC.Base.otherwise -> Value -> AccountCreateTransaction_type
AccountCreateTransaction_typeOther Value
val
)