{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Types.AccountUpdate 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.Address
import {-# SOURCE #-} RecurlyClient.Types.BillingInfoCreate
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data AccountUpdate = AccountUpdate
{ AccountUpdate -> Maybe Address
accountUpdateAddress :: (GHC.Maybe.Maybe Address)
, AccountUpdate -> Maybe AccountUpdateBill_to
accountUpdateBill_to :: (GHC.Maybe.Maybe AccountUpdateBill_to)
, AccountUpdate -> Maybe BillingInfoCreate
accountUpdateBilling_info :: (GHC.Maybe.Maybe BillingInfoCreate)
, AccountUpdate -> Maybe Text
accountUpdateCc_emails :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateCompany :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe CustomFields
accountUpdateCustom_fields :: (GHC.Maybe.Maybe CustomFields)
, AccountUpdate -> Maybe Text
accountUpdateDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateEntity_use_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateExemption_certificate :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateFirst_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateInvoice_template_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateLast_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateOverride_business_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateParent_account_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateParent_account_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe AccountUpdatePreferred_locale
accountUpdatePreferred_locale :: (GHC.Maybe.Maybe AccountUpdatePreferred_locale)
, AccountUpdate -> Maybe Text
accountUpdatePreferred_time_zone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Bool
accountUpdateTax_exempt :: (GHC.Maybe.Maybe GHC.Types.Bool)
, AccountUpdate -> Maybe AccountUpdateTransaction_type
accountUpdateTransaction_type :: (GHC.Maybe.Maybe AccountUpdateTransaction_type)
, AccountUpdate -> Maybe Text
accountUpdateUsername :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountUpdate -> Maybe Text
accountUpdateVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> AccountUpdate -> ShowS
[AccountUpdate] -> ShowS
AccountUpdate -> String
(Int -> AccountUpdate -> ShowS)
-> (AccountUpdate -> String)
-> ([AccountUpdate] -> ShowS)
-> Show AccountUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountUpdate -> ShowS
showsPrec :: Int -> AccountUpdate -> ShowS
$cshow :: AccountUpdate -> String
show :: AccountUpdate -> String
$cshowList :: [AccountUpdate] -> ShowS
showList :: [AccountUpdate] -> ShowS
GHC.Show.Show
, AccountUpdate -> AccountUpdate -> Bool
(AccountUpdate -> AccountUpdate -> Bool)
-> (AccountUpdate -> AccountUpdate -> Bool) -> Eq AccountUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountUpdate -> AccountUpdate -> Bool
== :: AccountUpdate -> AccountUpdate -> Bool
$c/= :: AccountUpdate -> AccountUpdate -> Bool
/= :: AccountUpdate -> AccountUpdate -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON AccountUpdate where
toJSON :: AccountUpdate -> Value
toJSON AccountUpdate
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..=)) (AccountUpdate -> Maybe Address
accountUpdateAddress AccountUpdate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountUpdateBill_to -> [Pair])
-> Maybe AccountUpdateBill_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])
-> (AccountUpdateBill_to -> Pair) -> AccountUpdateBill_to -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountUpdateBill_to -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdateBill_to
accountUpdateBill_to AccountUpdate
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..=)) (AccountUpdate -> Maybe BillingInfoCreate
accountUpdateBilling_info AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateCc_emails AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateCompany AccountUpdate
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..=)) (AccountUpdate -> Maybe CustomFields
accountUpdateCustom_fields AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateDunning_campaign_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateEmail AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateEntity_use_code AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateExemption_certificate AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateFirst_name AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateInvoice_template_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateLast_name AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateOverride_business_entity_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateParent_account_code AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateParent_account_id AccountUpdate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountUpdatePreferred_locale -> [Pair])
-> Maybe AccountUpdatePreferred_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])
-> (AccountUpdatePreferred_locale -> Pair)
-> AccountUpdatePreferred_locale
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountUpdatePreferred_locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdatePreferred_locale
accountUpdatePreferred_locale AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdatePreferred_time_zone AccountUpdate
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..=)) (AccountUpdate -> Maybe Bool
accountUpdateTax_exempt AccountUpdate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountUpdateTransaction_type -> [Pair])
-> Maybe AccountUpdateTransaction_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])
-> (AccountUpdateTransaction_type -> Pair)
-> AccountUpdateTransaction_type
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountUpdateTransaction_type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdateTransaction_type
accountUpdateTransaction_type AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateUsername AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateVat_number AccountUpdate
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: AccountUpdate -> Encoding
toEncoding AccountUpdate
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..=)) (AccountUpdate -> Maybe Address
accountUpdateAddress AccountUpdate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountUpdateBill_to -> [Series])
-> Maybe AccountUpdateBill_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])
-> (AccountUpdateBill_to -> Series)
-> AccountUpdateBill_to
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountUpdateBill_to -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdateBill_to
accountUpdateBill_to AccountUpdate
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..=)) (AccountUpdate -> Maybe BillingInfoCreate
accountUpdateBilling_info AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateCc_emails AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateCompany AccountUpdate
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..=)) (AccountUpdate -> Maybe CustomFields
accountUpdateCustom_fields AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateDunning_campaign_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateEmail AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateEntity_use_code AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateExemption_certificate AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateFirst_name AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateInvoice_template_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateLast_name AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateOverride_business_entity_id AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateParent_account_code AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateParent_account_id AccountUpdate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountUpdatePreferred_locale -> [Series])
-> Maybe AccountUpdatePreferred_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])
-> (AccountUpdatePreferred_locale -> Series)
-> AccountUpdatePreferred_locale
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountUpdatePreferred_locale -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdatePreferred_locale
accountUpdatePreferred_locale AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdatePreferred_time_zone AccountUpdate
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..=)) (AccountUpdate -> Maybe Bool
accountUpdateTax_exempt AccountUpdate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountUpdateTransaction_type -> [Series])
-> Maybe AccountUpdateTransaction_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])
-> (AccountUpdateTransaction_type -> Series)
-> AccountUpdateTransaction_type
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountUpdateTransaction_type -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountUpdate -> Maybe AccountUpdateTransaction_type
accountUpdateTransaction_type AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateUsername AccountUpdate
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..=)) (AccountUpdate -> Maybe Text
accountUpdateVat_number AccountUpdate
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON AccountUpdate where
parseJSON :: Value -> Parser AccountUpdate
parseJSON = String
-> (Object -> Parser AccountUpdate)
-> Value
-> Parser AccountUpdate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"AccountUpdate" (\Object
obj -> ((((((((((((((((((((((Maybe Address
-> Maybe AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser
(Maybe Address
-> Maybe AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Address
-> Maybe AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate
AccountUpdate Parser
(Maybe Address
-> Maybe AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Address)
-> Parser
(Maybe AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdateBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe AccountUpdateBill_to)
-> Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdateBill_to)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"bill_to")) Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe BillingInfoCreate)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe CustomFields)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe AccountUpdatePreferred_locale)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 AccountUpdatePreferred_locale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_locale")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
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 Bool
-> Maybe AccountUpdateTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountUpdate)
-> Parser (Maybe Bool)
-> Parser
(Maybe AccountUpdateTransaction_type
-> Maybe Text -> Maybe Text -> AccountUpdate)
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 AccountUpdateTransaction_type
-> Maybe Text -> Maybe Text -> AccountUpdate)
-> Parser (Maybe AccountUpdateTransaction_type)
-> Parser (Maybe Text -> Maybe Text -> AccountUpdate)
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 AccountUpdateTransaction_type)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"transaction_type")) Parser (Maybe Text -> Maybe Text -> AccountUpdate)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AccountUpdate)
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 -> AccountUpdate)
-> Parser (Maybe Text) -> Parser AccountUpdate
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"))
mkAccountUpdate :: AccountUpdate
mkAccountUpdate :: AccountUpdate
mkAccountUpdate =
AccountUpdate
{ accountUpdateAddress :: Maybe Address
accountUpdateAddress = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateBill_to :: Maybe AccountUpdateBill_to
accountUpdateBill_to = Maybe AccountUpdateBill_to
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateBilling_info :: Maybe BillingInfoCreate
accountUpdateBilling_info = Maybe BillingInfoCreate
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateCc_emails :: Maybe Text
accountUpdateCc_emails = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateCompany :: Maybe Text
accountUpdateCompany = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateCustom_fields :: Maybe CustomFields
accountUpdateCustom_fields = Maybe CustomFields
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateDunning_campaign_id :: Maybe Text
accountUpdateDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateEmail :: Maybe Text
accountUpdateEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateEntity_use_code :: Maybe Text
accountUpdateEntity_use_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateExemption_certificate :: Maybe Text
accountUpdateExemption_certificate = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateFirst_name :: Maybe Text
accountUpdateFirst_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateInvoice_template_id :: Maybe Text
accountUpdateInvoice_template_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateLast_name :: Maybe Text
accountUpdateLast_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateOverride_business_entity_id :: Maybe Text
accountUpdateOverride_business_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateParent_account_code :: Maybe Text
accountUpdateParent_account_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateParent_account_id :: Maybe Text
accountUpdateParent_account_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdatePreferred_locale :: Maybe AccountUpdatePreferred_locale
accountUpdatePreferred_locale = Maybe AccountUpdatePreferred_locale
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdatePreferred_time_zone :: Maybe Text
accountUpdatePreferred_time_zone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateTax_exempt :: Maybe Bool
accountUpdateTax_exempt = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateTransaction_type :: Maybe AccountUpdateTransaction_type
accountUpdateTransaction_type = Maybe AccountUpdateTransaction_type
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateUsername :: Maybe Text
accountUpdateUsername = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdateVat_number :: Maybe Text
accountUpdateVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data AccountUpdateBill_to
=
AccountUpdateBill_toOther Data.Aeson.Types.Internal.Value
|
AccountUpdateBill_toTyped Data.Text.Internal.Text
|
AccountUpdateBill_toEnumParent
|
AccountUpdateBill_toEnumSelf
deriving (Int -> AccountUpdateBill_to -> ShowS
[AccountUpdateBill_to] -> ShowS
AccountUpdateBill_to -> String
(Int -> AccountUpdateBill_to -> ShowS)
-> (AccountUpdateBill_to -> String)
-> ([AccountUpdateBill_to] -> ShowS)
-> Show AccountUpdateBill_to
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountUpdateBill_to -> ShowS
showsPrec :: Int -> AccountUpdateBill_to -> ShowS
$cshow :: AccountUpdateBill_to -> String
show :: AccountUpdateBill_to -> String
$cshowList :: [AccountUpdateBill_to] -> ShowS
showList :: [AccountUpdateBill_to] -> ShowS
GHC.Show.Show, AccountUpdateBill_to -> AccountUpdateBill_to -> Bool
(AccountUpdateBill_to -> AccountUpdateBill_to -> Bool)
-> (AccountUpdateBill_to -> AccountUpdateBill_to -> Bool)
-> Eq AccountUpdateBill_to
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountUpdateBill_to -> AccountUpdateBill_to -> Bool
== :: AccountUpdateBill_to -> AccountUpdateBill_to -> Bool
$c/= :: AccountUpdateBill_to -> AccountUpdateBill_to -> Bool
/= :: AccountUpdateBill_to -> AccountUpdateBill_to -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountUpdateBill_to where
toJSON :: AccountUpdateBill_to -> Value
toJSON (AccountUpdateBill_toOther Value
val) = Value
val
toJSON (AccountUpdateBill_toTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountUpdateBill_to
AccountUpdateBill_toEnumParent) = Value
"parent"
toJSON (AccountUpdateBill_to
AccountUpdateBill_toEnumSelf) = Value
"self"
instance Data.Aeson.Types.FromJSON.FromJSON AccountUpdateBill_to where
parseJSON :: Value -> Parser AccountUpdateBill_to
parseJSON Value
val =
AccountUpdateBill_to -> Parser AccountUpdateBill_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" -> AccountUpdateBill_to
AccountUpdateBill_toEnumParent
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"self" -> AccountUpdateBill_to
AccountUpdateBill_toEnumSelf
| Bool
GHC.Base.otherwise -> Value -> AccountUpdateBill_to
AccountUpdateBill_toOther Value
val
)
data AccountUpdatePreferred_locale
=
AccountUpdatePreferred_localeOther Data.Aeson.Types.Internal.Value
|
AccountUpdatePreferred_localeTyped Data.Text.Internal.Text
|
AccountUpdatePreferred_localeEnumDa_DK
|
AccountUpdatePreferred_localeEnumDe_CH
|
AccountUpdatePreferred_localeEnumDe_DE
|
AccountUpdatePreferred_localeEnumEn_AU
|
AccountUpdatePreferred_localeEnumEn_CA
|
AccountUpdatePreferred_localeEnumEn_GB
|
AccountUpdatePreferred_localeEnumEn_IE
|
AccountUpdatePreferred_localeEnumEn_NZ
|
AccountUpdatePreferred_localeEnumEn_US
|
AccountUpdatePreferred_localeEnumEs_ES
|
AccountUpdatePreferred_localeEnumEs_MX
|
AccountUpdatePreferred_localeEnumEs_US
|
AccountUpdatePreferred_localeEnumFi_FI
|
AccountUpdatePreferred_localeEnumFr_BE
|
AccountUpdatePreferred_localeEnumFr_CA
|
AccountUpdatePreferred_localeEnumFr_CH
|
AccountUpdatePreferred_localeEnumFr_FR
|
AccountUpdatePreferred_localeEnumHi_IN
|
AccountUpdatePreferred_localeEnumIt_IT
|
AccountUpdatePreferred_localeEnumJa_JP
|
AccountUpdatePreferred_localeEnumKo_KR
|
AccountUpdatePreferred_localeEnumNl_BE
|
AccountUpdatePreferred_localeEnumNl_NL
|
AccountUpdatePreferred_localeEnumPl_PL
|
AccountUpdatePreferred_localeEnumPt_BR
|
AccountUpdatePreferred_localeEnumPt_PT
|
AccountUpdatePreferred_localeEnumRo_RO
|
AccountUpdatePreferred_localeEnumRu_RU
|
AccountUpdatePreferred_localeEnumSk_SK
|
AccountUpdatePreferred_localeEnumSv_SE
|
AccountUpdatePreferred_localeEnumTr_TR
|
AccountUpdatePreferred_localeEnumZh_CN
deriving (Int -> AccountUpdatePreferred_locale -> ShowS
[AccountUpdatePreferred_locale] -> ShowS
AccountUpdatePreferred_locale -> String
(Int -> AccountUpdatePreferred_locale -> ShowS)
-> (AccountUpdatePreferred_locale -> String)
-> ([AccountUpdatePreferred_locale] -> ShowS)
-> Show AccountUpdatePreferred_locale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountUpdatePreferred_locale -> ShowS
showsPrec :: Int -> AccountUpdatePreferred_locale -> ShowS
$cshow :: AccountUpdatePreferred_locale -> String
show :: AccountUpdatePreferred_locale -> String
$cshowList :: [AccountUpdatePreferred_locale] -> ShowS
showList :: [AccountUpdatePreferred_locale] -> ShowS
GHC.Show.Show, AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool
(AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool)
-> (AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool)
-> Eq AccountUpdatePreferred_locale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool
== :: AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool
$c/= :: AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool
/= :: AccountUpdatePreferred_locale
-> AccountUpdatePreferred_locale -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountUpdatePreferred_locale where
toJSON :: AccountUpdatePreferred_locale -> Value
toJSON (AccountUpdatePreferred_localeOther Value
val) = Value
val
toJSON (AccountUpdatePreferred_localeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDa_DK) = Value
"da-DK"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDe_CH) = Value
"de-CH"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDe_DE) = Value
"de-DE"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_AU) = Value
"en-AU"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_CA) = Value
"en-CA"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_GB) = Value
"en-GB"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_IE) = Value
"en-IE"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_NZ) = Value
"en-NZ"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_US) = Value
"en-US"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_ES) = Value
"es-ES"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_MX) = Value
"es-MX"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_US) = Value
"es-US"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFi_FI) = Value
"fi-FI"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_BE) = Value
"fr-BE"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_CA) = Value
"fr-CA"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_CH) = Value
"fr-CH"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_FR) = Value
"fr-FR"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumHi_IN) = Value
"hi-IN"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumIt_IT) = Value
"it-IT"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumJa_JP) = Value
"ja-JP"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumKo_KR) = Value
"ko-KR"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumNl_BE) = Value
"nl-BE"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumNl_NL) = Value
"nl-NL"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPl_PL) = Value
"pl-PL"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPt_BR) = Value
"pt-BR"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPt_PT) = Value
"pt-PT"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumRo_RO) = Value
"ro-RO"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumRu_RU) = Value
"ru-RU"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumSk_SK) = Value
"sk-SK"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumSv_SE) = Value
"sv-SE"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumTr_TR) = Value
"tr-TR"
toJSON (AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumZh_CN) = Value
"zh-CN"
instance Data.Aeson.Types.FromJSON.FromJSON AccountUpdatePreferred_locale where
parseJSON :: Value -> Parser AccountUpdatePreferred_locale
parseJSON Value
val =
AccountUpdatePreferred_locale
-> Parser AccountUpdatePreferred_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" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDa_DK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-CH" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDe_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-DE" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumDe_DE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-AU" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_AU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-CA" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-GB" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_GB
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-IE" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_IE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-NZ" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_NZ
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-US" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEn_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-ES" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_ES
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-MX" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_MX
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-US" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumEs_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fi-FI" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFi_FI
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-BE" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CA" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CH" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-FR" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumFr_FR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hi-IN" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumHi_IN
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"it-IT" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumIt_IT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ja-JP" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumJa_JP
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ko-KR" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumKo_KR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-BE" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumNl_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-NL" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumNl_NL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pl-PL" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPl_PL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-BR" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPt_BR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-PT" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumPt_PT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ro-RO" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumRo_RO
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru-RU" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumRu_RU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sk-SK" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumSk_SK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sv-SE" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumSv_SE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tr-TR" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumTr_TR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"zh-CN" -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeEnumZh_CN
| Bool
GHC.Base.otherwise -> Value -> AccountUpdatePreferred_locale
AccountUpdatePreferred_localeOther Value
val
)
data AccountUpdateTransaction_type
=
AccountUpdateTransaction_typeOther Data.Aeson.Types.Internal.Value
|
AccountUpdateTransaction_typeTyped Data.Text.Internal.Text
|
AccountUpdateTransaction_typeEnumMoto
deriving (Int -> AccountUpdateTransaction_type -> ShowS
[AccountUpdateTransaction_type] -> ShowS
AccountUpdateTransaction_type -> String
(Int -> AccountUpdateTransaction_type -> ShowS)
-> (AccountUpdateTransaction_type -> String)
-> ([AccountUpdateTransaction_type] -> ShowS)
-> Show AccountUpdateTransaction_type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountUpdateTransaction_type -> ShowS
showsPrec :: Int -> AccountUpdateTransaction_type -> ShowS
$cshow :: AccountUpdateTransaction_type -> String
show :: AccountUpdateTransaction_type -> String
$cshowList :: [AccountUpdateTransaction_type] -> ShowS
showList :: [AccountUpdateTransaction_type] -> ShowS
GHC.Show.Show, AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool
(AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool)
-> (AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool)
-> Eq AccountUpdateTransaction_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool
== :: AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool
$c/= :: AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool
/= :: AccountUpdateTransaction_type
-> AccountUpdateTransaction_type -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountUpdateTransaction_type where
toJSON :: AccountUpdateTransaction_type -> Value
toJSON (AccountUpdateTransaction_typeOther Value
val) = Value
val
toJSON (AccountUpdateTransaction_typeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountUpdateTransaction_type
AccountUpdateTransaction_typeEnumMoto) = Value
"moto"
instance Data.Aeson.Types.FromJSON.FromJSON AccountUpdateTransaction_type where
parseJSON :: Value -> Parser AccountUpdateTransaction_type
parseJSON Value
val =
AccountUpdateTransaction_type
-> Parser AccountUpdateTransaction_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" -> AccountUpdateTransaction_type
AccountUpdateTransaction_typeEnumMoto
| Bool
GHC.Base.otherwise -> Value -> AccountUpdateTransaction_type
AccountUpdateTransaction_typeOther Value
val
)