{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Types.Account where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified RecurlyClient.Common
import RecurlyClient.TypeAlias
import {-# SOURCE #-} RecurlyClient.Types.AccountReadOnly
import {-# SOURCE #-} RecurlyClient.Types.AccountResponse
import {-# SOURCE #-} RecurlyClient.Types.Address
import {-# SOURCE #-} RecurlyClient.Types.BillingInfo
import {-# SOURCE #-} RecurlyClient.Types.ExternalAccount
import {-# SOURCE #-} RecurlyClient.Types.ShippingAddress
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data Account = Account
{ Account -> Maybe Address
accountAddress :: (GHC.Maybe.Maybe Address)
, Account -> Maybe AccountBill_to
accountBill_to :: (GHC.Maybe.Maybe AccountBill_to)
, Account -> Maybe BillingInfo
accountBilling_info :: (GHC.Maybe.Maybe BillingInfo)
, Account -> Maybe Text
accountCc_emails :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountCompany :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe JsonDateTime
accountCreated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Account -> Maybe CustomFields
accountCustom_fields :: (GHC.Maybe.Maybe CustomFields)
, Account -> Maybe JsonDateTime
accountDeleted_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Account -> Maybe Text
accountDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountEntity_use_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountExemption_certificate :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe [ExternalAccount]
accountExternal_accounts :: (GHC.Maybe.Maybe [ExternalAccount])
, Account -> Maybe Text
accountFirst_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Bool
accountHas_active_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Bool
accountHas_canceled_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Bool
accountHas_future_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Bool
accountHas_live_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Bool
accountHas_past_due_invoice :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Bool
accountHas_paused_subscription :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe Text
accountHosted_login_token :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountInvoice_template_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountLast_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountObject :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountOverride_business_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountParent_account_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe AccountPreferred_locale
accountPreferred_locale :: (GHC.Maybe.Maybe AccountPreferred_locale)
, Account -> Maybe Text
accountPreferred_time_zone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe [ShippingAddress]
accountShipping_addresses :: (GHC.Maybe.Maybe [ShippingAddress])
, Account -> Maybe AccountState
accountState :: (GHC.Maybe.Maybe AccountState)
, Account -> Maybe Bool
accountTax_exempt :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Account -> Maybe JsonDateTime
accountUpdated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Account -> Maybe Text
accountUsername :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Account -> Maybe Text
accountVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> Account -> ShowS
[Account] -> ShowS
Account -> String
(Int -> Account -> ShowS)
-> (Account -> String) -> ([Account] -> ShowS) -> Show Account
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Account -> ShowS
showsPrec :: Int -> Account -> ShowS
$cshow :: Account -> String
show :: Account -> String
$cshowList :: [Account] -> ShowS
showList :: [Account] -> ShowS
GHC.Show.Show
, Account -> Account -> Bool
(Account -> Account -> Bool)
-> (Account -> Account -> Bool) -> Eq Account
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Account -> Account -> Bool
== :: Account -> Account -> Bool
$c/= :: Account -> Account -> Bool
/= :: Account -> Account -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Account where
toJSON :: Account -> Value
toJSON Account
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (Address -> [Pair]) -> Maybe Address -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Address -> Pair) -> Address -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Address
accountAddress Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountBill_to -> [Pair]) -> Maybe AccountBill_to -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountBill_to -> Pair) -> AccountBill_to -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountBill_to -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountBill_to
accountBill_to Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (BillingInfo -> [Pair]) -> Maybe BillingInfo -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (BillingInfo -> Pair) -> BillingInfo -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe BillingInfo
accountBilling_info Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cc_emails" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCc_emails Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCode Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"company" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCompany Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountCreated_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (CustomFields -> [Pair]) -> Maybe CustomFields -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (CustomFields -> Pair) -> CustomFields -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"custom_fields" Key -> CustomFields -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe CustomFields
accountCustom_fields Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"deleted_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountDeleted_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_campaign_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountDunning_campaign_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"email" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEmail Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"entity_use_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEntity_use_code Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"exemption_certificate" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountExemption_certificate Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ExternalAccount] -> [Pair])
-> Maybe [ExternalAccount]
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> ([ExternalAccount] -> Pair) -> [ExternalAccount] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ExternalAccount]
accountExternal_accounts Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"first_name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountFirst_name Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_active_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_active_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_canceled_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_canceled_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_future_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_future_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_live_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_live_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_past_due_invoice" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_past_due_invoice Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_paused_subscription" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_paused_subscription Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"hosted_login_token" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountHosted_login_token Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountId Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice_template_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountInvoice_template_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"last_name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountLast_name Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountObject Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"override_business_entity_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountOverride_business_entity_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountParent_account_id Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountPreferred_locale -> [Pair])
-> Maybe AccountPreferred_locale
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountPreferred_locale -> Pair)
-> AccountPreferred_locale
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPreferred_locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountPreferred_locale
accountPreferred_locale Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_time_zone" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountPreferred_time_zone Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([ShippingAddress] -> [Pair])
-> Maybe [ShippingAddress]
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> ([ShippingAddress] -> Pair) -> [ShippingAddress] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddress] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ShippingAddress]
accountShipping_addresses Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (AccountState -> [Pair]) -> Maybe AccountState -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountState -> Pair) -> AccountState -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> AccountState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountState
accountState Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_exempt" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountTax_exempt Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountUpdated_at Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"username" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountUsername Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountVat_number Account
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: Account -> Encoding
toEncoding Account
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series] -> (Address -> [Series]) -> Maybe Address -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Address -> Series) -> Address -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Address
accountAddress Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountBill_to -> [Series]) -> Maybe AccountBill_to -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountBill_to -> Series) -> AccountBill_to -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountBill_to -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountBill_to
accountBill_to Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (BillingInfo -> [Series]) -> Maybe BillingInfo -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (BillingInfo -> Series) -> BillingInfo -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfo -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe BillingInfo
accountBilling_info Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cc_emails" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCc_emails Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCode Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"company" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountCompany Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountCreated_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (CustomFields -> [Series]) -> Maybe CustomFields -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (CustomFields -> Series) -> CustomFields -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"custom_fields" Key -> CustomFields -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe CustomFields
accountCustom_fields Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"deleted_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountDeleted_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_campaign_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountDunning_campaign_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"email" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEmail Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"entity_use_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountEntity_use_code Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"exemption_certificate" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountExemption_certificate Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ExternalAccount] -> [Series])
-> Maybe [ExternalAccount]
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> ([ExternalAccount] -> Series) -> [ExternalAccount] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"external_accounts" Key -> [ExternalAccount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ExternalAccount]
accountExternal_accounts Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"first_name" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountFirst_name Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_active_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_active_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_canceled_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_canceled_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_future_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_future_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_live_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_live_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_past_due_invoice" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_past_due_invoice Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"has_paused_subscription" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountHas_paused_subscription Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"hosted_login_token" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountHosted_login_token Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountId Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice_template_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountInvoice_template_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"last_name" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountLast_name Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountObject Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"override_business_entity_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountOverride_business_entity_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountParent_account_id Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountPreferred_locale -> [Series])
-> Maybe AccountPreferred_locale
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountPreferred_locale -> Series)
-> AccountPreferred_locale
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPreferred_locale -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountPreferred_locale
accountPreferred_locale Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_time_zone" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountPreferred_time_zone Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([ShippingAddress] -> [Series])
-> Maybe [ShippingAddress]
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> ([ShippingAddress] -> Series) -> [ShippingAddress] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"shipping_addresses" Key -> [ShippingAddress] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe [ShippingAddress]
accountShipping_addresses Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountState -> [Series]) -> Maybe AccountState -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountState -> Series) -> AccountState -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> AccountState -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe AccountState
accountState Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_exempt" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Bool
accountTax_exempt Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe JsonDateTime
accountUpdated_at Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"username" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountUsername Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Account -> Maybe Text
accountVat_number Account
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON Account where
parseJSON :: Value -> Parser Account
parseJSON = String -> (Object -> Parser Account) -> Value -> Parser Account
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Account" (\Object
obj -> ((((((((((((((((((((((((((((((((((((Maybe Address
-> Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser
(Maybe Address
-> Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Address
-> Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account
Account Parser
(Maybe Address
-> Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Address)
-> Parser
(Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"address")) Parser
(Maybe AccountBill_to
-> Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe AccountBill_to)
-> Parser
(Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountBill_to)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"bill_to")) Parser
(Maybe BillingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe BillingInfo)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe BillingInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"billing_info")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"cc_emails")) Parser
(Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"code")) Parser
(Maybe Text
-> Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"company")) Parser
(Maybe JsonDateTime
-> Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"created_at")) Parser
(Maybe CustomFields
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe CustomFields)
-> Parser
(Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe CustomFields)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"custom_fields")) Parser
(Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"deleted_at")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"dunning_campaign_id")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"email")) Parser
(Maybe Text
-> Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"entity_use_code")) Parser
(Maybe Text
-> Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"exemption_certificate")) Parser
(Maybe [ExternalAccount]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe [ExternalAccount])
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [ExternalAccount])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"external_accounts")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"first_name")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_active_subscription")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_canceled_subscription")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_future_subscription")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_live_subscription")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_past_due_invoice")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"has_paused_subscription")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"hosted_login_token")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"id")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"invoice_template_id")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"last_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"object")) Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"override_business_entity_id")) Parser
(Maybe Text
-> Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"parent_account_id")) Parser
(Maybe AccountPreferred_locale
-> Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe AccountPreferred_locale)
-> Parser
(Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountPreferred_locale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_locale")) Parser
(Maybe Text
-> Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe Text)
-> Parser
(Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_time_zone")) Parser
(Maybe [ShippingAddress]
-> Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe [ShippingAddress])
-> Parser
(Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [ShippingAddress])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"shipping_addresses")) Parser
(Maybe AccountState
-> Maybe Bool
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Account)
-> Parser (Maybe AccountState)
-> Parser
(Maybe Bool
-> Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"state")) Parser
(Maybe Bool
-> Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe Bool)
-> Parser
(Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"tax_exempt")) Parser (Maybe JsonDateTime -> Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe JsonDateTime)
-> Parser (Maybe Text -> Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"updated_at")) Parser (Maybe Text -> Maybe Text -> Account)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Account)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"username")) Parser (Maybe Text -> Account)
-> Parser (Maybe Text) -> Parser Account
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"vat_number"))
mkAccount :: Account
mkAccount :: Account
mkAccount =
Account
{ accountAddress :: Maybe Address
accountAddress = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing
, accountBill_to :: Maybe AccountBill_to
accountBill_to = Maybe AccountBill_to
forall a. Maybe a
GHC.Maybe.Nothing
, accountBilling_info :: Maybe BillingInfo
accountBilling_info = Maybe BillingInfo
forall a. Maybe a
GHC.Maybe.Nothing
, accountCc_emails :: Maybe Text
accountCc_emails = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCode :: Maybe Text
accountCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCompany :: Maybe Text
accountCompany = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountCreated_at :: Maybe JsonDateTime
accountCreated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, accountCustom_fields :: Maybe CustomFields
accountCustom_fields = Maybe CustomFields
forall a. Maybe a
GHC.Maybe.Nothing
, accountDeleted_at :: Maybe JsonDateTime
accountDeleted_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, accountDunning_campaign_id :: Maybe Text
accountDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountEmail :: Maybe Text
accountEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountEntity_use_code :: Maybe Text
accountEntity_use_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountExemption_certificate :: Maybe Text
accountExemption_certificate = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountExternal_accounts :: Maybe [ExternalAccount]
accountExternal_accounts = Maybe [ExternalAccount]
forall a. Maybe a
GHC.Maybe.Nothing
, accountFirst_name :: Maybe Text
accountFirst_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_active_subscription :: Maybe Bool
accountHas_active_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_canceled_subscription :: Maybe Bool
accountHas_canceled_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_future_subscription :: Maybe Bool
accountHas_future_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_live_subscription :: Maybe Bool
accountHas_live_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_past_due_invoice :: Maybe Bool
accountHas_past_due_invoice = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHas_paused_subscription :: Maybe Bool
accountHas_paused_subscription = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountHosted_login_token :: Maybe Text
accountHosted_login_token = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountId :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountInvoice_template_id :: Maybe Text
accountInvoice_template_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountLast_name :: Maybe Text
accountLast_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountObject :: Maybe Text
accountObject = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountOverride_business_entity_id :: Maybe Text
accountOverride_business_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountParent_account_id :: Maybe Text
accountParent_account_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPreferred_locale :: Maybe AccountPreferred_locale
accountPreferred_locale = Maybe AccountPreferred_locale
forall a. Maybe a
GHC.Maybe.Nothing
, accountPreferred_time_zone :: Maybe Text
accountPreferred_time_zone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountShipping_addresses :: Maybe [ShippingAddress]
accountShipping_addresses = Maybe [ShippingAddress]
forall a. Maybe a
GHC.Maybe.Nothing
, accountState :: Maybe AccountState
accountState = Maybe AccountState
forall a. Maybe a
GHC.Maybe.Nothing
, accountTax_exempt :: Maybe Bool
accountTax_exempt = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountUpdated_at :: Maybe JsonDateTime
accountUpdated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, accountUsername :: Maybe Text
accountUsername = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountVat_number :: Maybe Text
accountVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data AccountBill_to
=
AccountBill_toOther Data.Aeson.Types.Internal.Value
|
AccountBill_toTyped Data.Text.Internal.Text
|
AccountBill_toEnumParent
|
AccountBill_toEnumSelf
deriving (Int -> AccountBill_to -> ShowS
[AccountBill_to] -> ShowS
AccountBill_to -> String
(Int -> AccountBill_to -> ShowS)
-> (AccountBill_to -> String)
-> ([AccountBill_to] -> ShowS)
-> Show AccountBill_to
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountBill_to -> ShowS
showsPrec :: Int -> AccountBill_to -> ShowS
$cshow :: AccountBill_to -> String
show :: AccountBill_to -> String
$cshowList :: [AccountBill_to] -> ShowS
showList :: [AccountBill_to] -> ShowS
GHC.Show.Show, AccountBill_to -> AccountBill_to -> Bool
(AccountBill_to -> AccountBill_to -> Bool)
-> (AccountBill_to -> AccountBill_to -> Bool) -> Eq AccountBill_to
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountBill_to -> AccountBill_to -> Bool
== :: AccountBill_to -> AccountBill_to -> Bool
$c/= :: AccountBill_to -> AccountBill_to -> Bool
/= :: AccountBill_to -> AccountBill_to -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountBill_to where
toJSON :: AccountBill_to -> Value
toJSON (AccountBill_toOther Value
val) = Value
val
toJSON (AccountBill_toTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountBill_to
AccountBill_toEnumParent) = Value
"parent"
toJSON (AccountBill_to
AccountBill_toEnumSelf) = Value
"self"
instance Data.Aeson.Types.FromJSON.FromJSON AccountBill_to where
parseJSON :: Value -> Parser AccountBill_to
parseJSON Value
val =
AccountBill_to -> Parser AccountBill_to
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"parent" -> AccountBill_to
AccountBill_toEnumParent
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"self" -> AccountBill_to
AccountBill_toEnumSelf
| Bool
GHC.Base.otherwise -> Value -> AccountBill_to
AccountBill_toOther Value
val
)
data AccountPreferred_locale
=
AccountPreferred_localeOther Data.Aeson.Types.Internal.Value
|
AccountPreferred_localeTyped Data.Text.Internal.Text
|
AccountPreferred_localeEnumDa_DK
|
AccountPreferred_localeEnumDe_CH
|
AccountPreferred_localeEnumDe_DE
|
AccountPreferred_localeEnumEn_AU
|
AccountPreferred_localeEnumEn_CA
|
AccountPreferred_localeEnumEn_GB
|
AccountPreferred_localeEnumEn_IE
|
AccountPreferred_localeEnumEn_NZ
|
AccountPreferred_localeEnumEn_US
|
AccountPreferred_localeEnumEs_ES
|
AccountPreferred_localeEnumEs_MX
|
AccountPreferred_localeEnumEs_US
|
AccountPreferred_localeEnumFi_FI
|
AccountPreferred_localeEnumFr_BE
|
AccountPreferred_localeEnumFr_CA
|
AccountPreferred_localeEnumFr_CH
|
AccountPreferred_localeEnumFr_FR
|
AccountPreferred_localeEnumHi_IN
|
AccountPreferred_localeEnumIt_IT
|
AccountPreferred_localeEnumJa_JP
|
AccountPreferred_localeEnumKo_KR
|
AccountPreferred_localeEnumNl_BE
|
AccountPreferred_localeEnumNl_NL
|
AccountPreferred_localeEnumPl_PL
|
AccountPreferred_localeEnumPt_BR
|
AccountPreferred_localeEnumPt_PT
|
AccountPreferred_localeEnumRo_RO
|
AccountPreferred_localeEnumRu_RU
|
AccountPreferred_localeEnumSk_SK
|
AccountPreferred_localeEnumSv_SE
|
AccountPreferred_localeEnumTr_TR
|
AccountPreferred_localeEnumZh_CN
deriving (Int -> AccountPreferred_locale -> ShowS
[AccountPreferred_locale] -> ShowS
AccountPreferred_locale -> String
(Int -> AccountPreferred_locale -> ShowS)
-> (AccountPreferred_locale -> String)
-> ([AccountPreferred_locale] -> ShowS)
-> Show AccountPreferred_locale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPreferred_locale -> ShowS
showsPrec :: Int -> AccountPreferred_locale -> ShowS
$cshow :: AccountPreferred_locale -> String
show :: AccountPreferred_locale -> String
$cshowList :: [AccountPreferred_locale] -> ShowS
showList :: [AccountPreferred_locale] -> ShowS
GHC.Show.Show, AccountPreferred_locale -> AccountPreferred_locale -> Bool
(AccountPreferred_locale -> AccountPreferred_locale -> Bool)
-> (AccountPreferred_locale -> AccountPreferred_locale -> Bool)
-> Eq AccountPreferred_locale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
== :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
$c/= :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
/= :: AccountPreferred_locale -> AccountPreferred_locale -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountPreferred_locale where
toJSON :: AccountPreferred_locale -> Value
toJSON (AccountPreferred_localeOther Value
val) = Value
val
toJSON (AccountPreferred_localeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDa_DK) = Value
"da-DK"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDe_CH) = Value
"de-CH"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumDe_DE) = Value
"de-DE"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_AU) = Value
"en-AU"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_CA) = Value
"en-CA"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_GB) = Value
"en-GB"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_IE) = Value
"en-IE"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_NZ) = Value
"en-NZ"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEn_US) = Value
"en-US"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_ES) = Value
"es-ES"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_MX) = Value
"es-MX"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumEs_US) = Value
"es-US"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFi_FI) = Value
"fi-FI"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_BE) = Value
"fr-BE"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_CA) = Value
"fr-CA"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_CH) = Value
"fr-CH"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumFr_FR) = Value
"fr-FR"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumHi_IN) = Value
"hi-IN"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumIt_IT) = Value
"it-IT"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumJa_JP) = Value
"ja-JP"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumKo_KR) = Value
"ko-KR"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumNl_BE) = Value
"nl-BE"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumNl_NL) = Value
"nl-NL"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPl_PL) = Value
"pl-PL"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPt_BR) = Value
"pt-BR"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumPt_PT) = Value
"pt-PT"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumRo_RO) = Value
"ro-RO"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumRu_RU) = Value
"ru-RU"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumSk_SK) = Value
"sk-SK"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumSv_SE) = Value
"sv-SE"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumTr_TR) = Value
"tr-TR"
toJSON (AccountPreferred_locale
AccountPreferred_localeEnumZh_CN) = Value
"zh-CN"
instance Data.Aeson.Types.FromJSON.FromJSON AccountPreferred_locale where
parseJSON :: Value -> Parser AccountPreferred_locale
parseJSON Value
val =
AccountPreferred_locale -> Parser AccountPreferred_locale
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"da-DK" -> AccountPreferred_locale
AccountPreferred_localeEnumDa_DK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-CH" -> AccountPreferred_locale
AccountPreferred_localeEnumDe_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-DE" -> AccountPreferred_locale
AccountPreferred_localeEnumDe_DE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-AU" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_AU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-CA" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-GB" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_GB
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-IE" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_IE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-NZ" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_NZ
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-US" -> AccountPreferred_locale
AccountPreferred_localeEnumEn_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-ES" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_ES
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-MX" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_MX
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-US" -> AccountPreferred_locale
AccountPreferred_localeEnumEs_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fi-FI" -> AccountPreferred_locale
AccountPreferred_localeEnumFi_FI
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-BE" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CA" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CH" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-FR" -> AccountPreferred_locale
AccountPreferred_localeEnumFr_FR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hi-IN" -> AccountPreferred_locale
AccountPreferred_localeEnumHi_IN
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"it-IT" -> AccountPreferred_locale
AccountPreferred_localeEnumIt_IT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ja-JP" -> AccountPreferred_locale
AccountPreferred_localeEnumJa_JP
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ko-KR" -> AccountPreferred_locale
AccountPreferred_localeEnumKo_KR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-BE" -> AccountPreferred_locale
AccountPreferred_localeEnumNl_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-NL" -> AccountPreferred_locale
AccountPreferred_localeEnumNl_NL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pl-PL" -> AccountPreferred_locale
AccountPreferred_localeEnumPl_PL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-BR" -> AccountPreferred_locale
AccountPreferred_localeEnumPt_BR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-PT" -> AccountPreferred_locale
AccountPreferred_localeEnumPt_PT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ro-RO" -> AccountPreferred_locale
AccountPreferred_localeEnumRo_RO
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru-RU" -> AccountPreferred_locale
AccountPreferred_localeEnumRu_RU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sk-SK" -> AccountPreferred_locale
AccountPreferred_localeEnumSk_SK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sv-SE" -> AccountPreferred_locale
AccountPreferred_localeEnumSv_SE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tr-TR" -> AccountPreferred_locale
AccountPreferred_localeEnumTr_TR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"zh-CN" -> AccountPreferred_locale
AccountPreferred_localeEnumZh_CN
| Bool
GHC.Base.otherwise -> Value -> AccountPreferred_locale
AccountPreferred_localeOther Value
val
)
data AccountState
=
AccountStateOther Data.Aeson.Types.Internal.Value
|
AccountStateTyped Data.Text.Internal.Text
|
AccountStateEnumActive
|
AccountStateEnumInactive
deriving (Int -> AccountState -> ShowS
[AccountState] -> ShowS
AccountState -> String
(Int -> AccountState -> ShowS)
-> (AccountState -> String)
-> ([AccountState] -> ShowS)
-> Show AccountState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountState -> ShowS
showsPrec :: Int -> AccountState -> ShowS
$cshow :: AccountState -> String
show :: AccountState -> String
$cshowList :: [AccountState] -> ShowS
showList :: [AccountState] -> ShowS
GHC.Show.Show, AccountState -> AccountState -> Bool
(AccountState -> AccountState -> Bool)
-> (AccountState -> AccountState -> Bool) -> Eq AccountState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountState -> AccountState -> Bool
== :: AccountState -> AccountState -> Bool
$c/= :: AccountState -> AccountState -> Bool
/= :: AccountState -> AccountState -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountState where
toJSON :: AccountState -> Value
toJSON (AccountStateOther Value
val) = Value
val
toJSON (AccountStateTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountState
AccountStateEnumActive) = Value
"active"
toJSON (AccountState
AccountStateEnumInactive) = Value
"inactive"
instance Data.Aeson.Types.FromJSON.FromJSON AccountState where
parseJSON :: Value -> Parser AccountState
parseJSON Value
val =
AccountState -> Parser AccountState
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"active" -> AccountState
AccountStateEnumActive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"inactive" -> AccountState
AccountStateEnumInactive
| Bool
GHC.Base.otherwise -> Value -> AccountState
AccountStateOther Value
val
)