{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Types.AccountPurchase where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified RecurlyClient.Common
import RecurlyClient.TypeAlias
import {-# SOURCE #-} RecurlyClient.Types.AccountAcquisitionUpdate
import {-# SOURCE #-} RecurlyClient.Types.AccountUpdate
import {-# SOURCE #-} RecurlyClient.Types.Address
import {-# SOURCE #-} RecurlyClient.Types.BillingInfoCreate
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data AccountPurchase = AccountPurchase
{ AccountPurchase -> Maybe AccountAcquisitionUpdate
accountPurchaseAcquisition :: (GHC.Maybe.Maybe AccountAcquisitionUpdate)
, AccountPurchase -> Maybe Address
accountPurchaseAddress :: (GHC.Maybe.Maybe Address)
, AccountPurchase -> Maybe AccountPurchaseBill_to
accountPurchaseBill_to :: (GHC.Maybe.Maybe AccountPurchaseBill_to)
, AccountPurchase -> Maybe BillingInfoCreate
accountPurchaseBilling_info :: (GHC.Maybe.Maybe BillingInfoCreate)
, AccountPurchase -> Maybe Text
accountPurchaseCc_emails :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Text
accountPurchaseCode :: Data.Text.Internal.Text
, AccountPurchase -> Maybe Text
accountPurchaseCompany :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe CustomFields
accountPurchaseCustom_fields :: (GHC.Maybe.Maybe CustomFields)
, AccountPurchase -> Maybe Text
accountPurchaseDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseEntity_use_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseExemption_certificate :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseFirst_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseInvoice_template_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseLast_name :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseOverride_business_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseParent_account_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseParent_account_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe AccountPurchasePreferred_locale
accountPurchasePreferred_locale :: (GHC.Maybe.Maybe AccountPurchasePreferred_locale)
, AccountPurchase -> Maybe Text
accountPurchasePreferred_time_zone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Bool
accountPurchaseTax_exempt :: (GHC.Maybe.Maybe GHC.Types.Bool)
, AccountPurchase -> Maybe AccountPurchaseTransaction_type
accountPurchaseTransaction_type :: (GHC.Maybe.Maybe AccountPurchaseTransaction_type)
, AccountPurchase -> Maybe Text
accountPurchaseUsername :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, AccountPurchase -> Maybe Text
accountPurchaseVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> AccountPurchase -> ShowS
[AccountPurchase] -> ShowS
AccountPurchase -> String
(Int -> AccountPurchase -> ShowS)
-> (AccountPurchase -> String)
-> ([AccountPurchase] -> ShowS)
-> Show AccountPurchase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPurchase -> ShowS
showsPrec :: Int -> AccountPurchase -> ShowS
$cshow :: AccountPurchase -> String
show :: AccountPurchase -> String
$cshowList :: [AccountPurchase] -> ShowS
showList :: [AccountPurchase] -> ShowS
GHC.Show.Show
, AccountPurchase -> AccountPurchase -> Bool
(AccountPurchase -> AccountPurchase -> Bool)
-> (AccountPurchase -> AccountPurchase -> Bool)
-> Eq AccountPurchase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPurchase -> AccountPurchase -> Bool
== :: AccountPurchase -> AccountPurchase -> Bool
$c/= :: AccountPurchase -> AccountPurchase -> Bool
/= :: AccountPurchase -> AccountPurchase -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON AccountPurchase where
toJSON :: AccountPurchase -> Value
toJSON AccountPurchase
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair]
-> (AccountAcquisitionUpdate -> [Pair])
-> Maybe AccountAcquisitionUpdate
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountAcquisitionUpdate -> Pair)
-> AccountAcquisitionUpdate
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"acquisition" Key -> AccountAcquisitionUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountAcquisitionUpdate
accountPurchaseAcquisition AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Address -> [Pair]) -> Maybe Address -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Address -> Pair) -> Address -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe Address
accountPurchaseAddress AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountPurchaseBill_to -> [Pair])
-> Maybe AccountPurchaseBill_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])
-> (AccountPurchaseBill_to -> Pair)
-> AccountPurchaseBill_to
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountPurchaseBill_to -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchaseBill_to
accountPurchaseBill_to AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (BillingInfoCreate -> [Pair])
-> Maybe BillingInfoCreate
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (BillingInfoCreate -> Pair) -> BillingInfoCreate -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfoCreate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe BillingInfoCreate
accountPurchaseBilling_info AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseCc_emails AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Key
"code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..= AccountPurchase -> Text
accountPurchaseCode AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseCompany AccountPurchase
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..=)) (AccountPurchase -> Maybe CustomFields
accountPurchaseCustom_fields AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseDunning_campaign_id AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseEmail AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseEntity_use_code AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseExemption_certificate AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseFirst_name AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseId AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseInvoice_template_id AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseLast_name AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseOverride_business_entity_id AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe Text
accountPurchaseParent_account_code AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseParent_account_id AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountPurchasePreferred_locale -> [Pair])
-> Maybe AccountPurchasePreferred_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])
-> (AccountPurchasePreferred_locale -> Pair)
-> AccountPurchasePreferred_locale
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPurchasePreferred_locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchasePreferred_locale
accountPurchasePreferred_locale AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchasePreferred_time_zone AccountPurchase
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..=)) (AccountPurchase -> Maybe Bool
accountPurchaseTax_exempt AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AccountPurchaseTransaction_type -> [Pair])
-> Maybe AccountPurchaseTransaction_type
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AccountPurchaseTransaction_type -> Pair)
-> AccountPurchaseTransaction_type
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountPurchaseTransaction_type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchaseTransaction_type
accountPurchaseTransaction_type AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseUsername AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseVat_number AccountPurchase
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: AccountPurchase -> Encoding
toEncoding AccountPurchase
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series]
-> (AccountAcquisitionUpdate -> [Series])
-> Maybe AccountAcquisitionUpdate
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountAcquisitionUpdate -> Series)
-> AccountAcquisitionUpdate
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"acquisition" Key -> AccountAcquisitionUpdate -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountAcquisitionUpdate
accountPurchaseAcquisition AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Address -> [Series]) -> Maybe Address -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Address -> Series) -> Address -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> Address -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe Address
accountPurchaseAddress AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountPurchaseBill_to -> [Series])
-> Maybe AccountPurchaseBill_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])
-> (AccountPurchaseBill_to -> Series)
-> AccountPurchaseBill_to
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"bill_to" Key -> AccountPurchaseBill_to -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchaseBill_to
accountPurchaseBill_to AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (BillingInfoCreate -> [Series])
-> Maybe BillingInfoCreate
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (BillingInfoCreate -> Series) -> BillingInfoCreate -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_info" Key -> BillingInfoCreate -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe BillingInfoCreate
accountPurchaseBilling_info AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseCc_emails AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Key
"code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..= AccountPurchase -> Text
accountPurchaseCode AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseCompany AccountPurchase
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..=)) (AccountPurchase -> Maybe CustomFields
accountPurchaseCustom_fields AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseDunning_campaign_id AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseEmail AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseEntity_use_code AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseExemption_certificate AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseFirst_name AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseId AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseInvoice_template_id AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseLast_name AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseOverride_business_entity_id AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"parent_account_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe Text
accountPurchaseParent_account_code AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseParent_account_id AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountPurchasePreferred_locale -> [Series])
-> Maybe AccountPurchasePreferred_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])
-> (AccountPurchasePreferred_locale -> Series)
-> AccountPurchasePreferred_locale
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"preferred_locale" Key -> AccountPurchasePreferred_locale -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchasePreferred_locale
accountPurchasePreferred_locale AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchasePreferred_time_zone AccountPurchase
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..=)) (AccountPurchase -> Maybe Bool
accountPurchaseTax_exempt AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AccountPurchaseTransaction_type -> [Series])
-> Maybe AccountPurchaseTransaction_type
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountPurchaseTransaction_type -> Series)
-> AccountPurchaseTransaction_type
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transaction_type" Key -> AccountPurchaseTransaction_type -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (AccountPurchase -> Maybe AccountPurchaseTransaction_type
accountPurchaseTransaction_type AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseUsername AccountPurchase
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..=)) (AccountPurchase -> Maybe Text
accountPurchaseVat_number AccountPurchase
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON AccountPurchase where
parseJSON :: Value -> Parser AccountPurchase
parseJSON = String
-> (Object -> Parser AccountPurchase)
-> Value
-> Parser AccountPurchase
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"AccountPurchase" (\Object
obj -> (((((((((((((((((((((((((Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser
(Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase
AccountPurchase Parser
(Maybe AccountAcquisitionUpdate
-> Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe AccountAcquisitionUpdate)
-> Parser
(Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountAcquisitionUpdate)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"acquisition")) Parser
(Maybe Address
-> Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Address)
-> Parser
(Maybe AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchaseBill_to
-> Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe AccountPurchaseBill_to)
-> Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchaseBill_to)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"bill_to")) Parser
(Maybe BillingInfoCreate
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe BillingInfoCreate)
-> Parser
(Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe BillingInfoCreate)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"billing_info")) Parser
(Maybe Text
-> Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"cc_emails")) Parser
(Text
-> Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
Data.Aeson.Types.FromJSON..: Key
"code")) Parser
(Maybe Text
-> Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"company")) Parser
(Maybe CustomFields
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe CustomFields)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe CustomFields)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"custom_fields")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"dunning_campaign_id")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"email")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"entity_use_code")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"exemption_certificate")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"first_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"override_business_entity_id")) Parser
(Maybe Text
-> Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"parent_account_code")) Parser
(Maybe Text
-> Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchasePreferred_locale
-> Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe AccountPurchasePreferred_locale)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
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 AccountPurchasePreferred_locale)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_locale")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"preferred_time_zone")) Parser
(Maybe Bool
-> Maybe AccountPurchaseTransaction_type
-> Maybe Text
-> Maybe Text
-> AccountPurchase)
-> Parser (Maybe Bool)
-> Parser
(Maybe AccountPurchaseTransaction_type
-> Maybe Text -> Maybe Text -> AccountPurchase)
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 AccountPurchaseTransaction_type
-> Maybe Text -> Maybe Text -> AccountPurchase)
-> Parser (Maybe AccountPurchaseTransaction_type)
-> Parser (Maybe Text -> Maybe Text -> AccountPurchase)
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 AccountPurchaseTransaction_type)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"transaction_type")) Parser (Maybe Text -> Maybe Text -> AccountPurchase)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AccountPurchase)
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 -> AccountPurchase)
-> Parser (Maybe Text) -> Parser AccountPurchase
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"))
mkAccountPurchase ::
Data.Text.Internal.Text ->
AccountPurchase
mkAccountPurchase :: Text -> AccountPurchase
mkAccountPurchase Text
accountPurchaseCode =
AccountPurchase
{ accountPurchaseAcquisition :: Maybe AccountAcquisitionUpdate
accountPurchaseAcquisition = Maybe AccountAcquisitionUpdate
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseAddress :: Maybe Address
accountPurchaseAddress = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseBill_to :: Maybe AccountPurchaseBill_to
accountPurchaseBill_to = Maybe AccountPurchaseBill_to
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseBilling_info :: Maybe BillingInfoCreate
accountPurchaseBilling_info = Maybe BillingInfoCreate
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseCc_emails :: Maybe Text
accountPurchaseCc_emails = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseCode :: Text
accountPurchaseCode = Text
accountPurchaseCode
, accountPurchaseCompany :: Maybe Text
accountPurchaseCompany = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseCustom_fields :: Maybe CustomFields
accountPurchaseCustom_fields = Maybe CustomFields
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseDunning_campaign_id :: Maybe Text
accountPurchaseDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseEmail :: Maybe Text
accountPurchaseEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseEntity_use_code :: Maybe Text
accountPurchaseEntity_use_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseExemption_certificate :: Maybe Text
accountPurchaseExemption_certificate = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseFirst_name :: Maybe Text
accountPurchaseFirst_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseId :: Maybe Text
accountPurchaseId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseInvoice_template_id :: Maybe Text
accountPurchaseInvoice_template_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseLast_name :: Maybe Text
accountPurchaseLast_name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseOverride_business_entity_id :: Maybe Text
accountPurchaseOverride_business_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseParent_account_code :: Maybe Text
accountPurchaseParent_account_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseParent_account_id :: Maybe Text
accountPurchaseParent_account_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchasePreferred_locale :: Maybe AccountPurchasePreferred_locale
accountPurchasePreferred_locale = Maybe AccountPurchasePreferred_locale
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchasePreferred_time_zone :: Maybe Text
accountPurchasePreferred_time_zone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseTax_exempt :: Maybe Bool
accountPurchaseTax_exempt = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseTransaction_type :: Maybe AccountPurchaseTransaction_type
accountPurchaseTransaction_type = Maybe AccountPurchaseTransaction_type
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseUsername :: Maybe Text
accountPurchaseUsername = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, accountPurchaseVat_number :: Maybe Text
accountPurchaseVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data AccountPurchaseBill_to
=
AccountPurchaseBill_toOther Data.Aeson.Types.Internal.Value
|
AccountPurchaseBill_toTyped Data.Text.Internal.Text
|
AccountPurchaseBill_toEnumParent
|
AccountPurchaseBill_toEnumSelf
deriving (Int -> AccountPurchaseBill_to -> ShowS
[AccountPurchaseBill_to] -> ShowS
AccountPurchaseBill_to -> String
(Int -> AccountPurchaseBill_to -> ShowS)
-> (AccountPurchaseBill_to -> String)
-> ([AccountPurchaseBill_to] -> ShowS)
-> Show AccountPurchaseBill_to
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPurchaseBill_to -> ShowS
showsPrec :: Int -> AccountPurchaseBill_to -> ShowS
$cshow :: AccountPurchaseBill_to -> String
show :: AccountPurchaseBill_to -> String
$cshowList :: [AccountPurchaseBill_to] -> ShowS
showList :: [AccountPurchaseBill_to] -> ShowS
GHC.Show.Show, AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool
(AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool)
-> (AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool)
-> Eq AccountPurchaseBill_to
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool
== :: AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool
$c/= :: AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool
/= :: AccountPurchaseBill_to -> AccountPurchaseBill_to -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountPurchaseBill_to where
toJSON :: AccountPurchaseBill_to -> Value
toJSON (AccountPurchaseBill_toOther Value
val) = Value
val
toJSON (AccountPurchaseBill_toTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountPurchaseBill_to
AccountPurchaseBill_toEnumParent) = Value
"parent"
toJSON (AccountPurchaseBill_to
AccountPurchaseBill_toEnumSelf) = Value
"self"
instance Data.Aeson.Types.FromJSON.FromJSON AccountPurchaseBill_to where
parseJSON :: Value -> Parser AccountPurchaseBill_to
parseJSON Value
val =
AccountPurchaseBill_to -> Parser AccountPurchaseBill_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" -> AccountPurchaseBill_to
AccountPurchaseBill_toEnumParent
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"self" -> AccountPurchaseBill_to
AccountPurchaseBill_toEnumSelf
| Bool
GHC.Base.otherwise -> Value -> AccountPurchaseBill_to
AccountPurchaseBill_toOther Value
val
)
data AccountPurchasePreferred_locale
=
AccountPurchasePreferred_localeOther Data.Aeson.Types.Internal.Value
|
AccountPurchasePreferred_localeTyped Data.Text.Internal.Text
|
AccountPurchasePreferred_localeEnumDa_DK
|
AccountPurchasePreferred_localeEnumDe_CH
|
AccountPurchasePreferred_localeEnumDe_DE
|
AccountPurchasePreferred_localeEnumEn_AU
|
AccountPurchasePreferred_localeEnumEn_CA
|
AccountPurchasePreferred_localeEnumEn_GB
|
AccountPurchasePreferred_localeEnumEn_IE
|
AccountPurchasePreferred_localeEnumEn_NZ
|
AccountPurchasePreferred_localeEnumEn_US
|
AccountPurchasePreferred_localeEnumEs_ES
|
AccountPurchasePreferred_localeEnumEs_MX
|
AccountPurchasePreferred_localeEnumEs_US
|
AccountPurchasePreferred_localeEnumFi_FI
|
AccountPurchasePreferred_localeEnumFr_BE
|
AccountPurchasePreferred_localeEnumFr_CA
|
AccountPurchasePreferred_localeEnumFr_CH
|
AccountPurchasePreferred_localeEnumFr_FR
|
AccountPurchasePreferred_localeEnumHi_IN
|
AccountPurchasePreferred_localeEnumIt_IT
|
AccountPurchasePreferred_localeEnumJa_JP
|
AccountPurchasePreferred_localeEnumKo_KR
|
AccountPurchasePreferred_localeEnumNl_BE
|
AccountPurchasePreferred_localeEnumNl_NL
|
AccountPurchasePreferred_localeEnumPl_PL
|
AccountPurchasePreferred_localeEnumPt_BR
|
AccountPurchasePreferred_localeEnumPt_PT
|
AccountPurchasePreferred_localeEnumRo_RO
|
AccountPurchasePreferred_localeEnumRu_RU
|
AccountPurchasePreferred_localeEnumSk_SK
|
AccountPurchasePreferred_localeEnumSv_SE
|
AccountPurchasePreferred_localeEnumTr_TR
|
AccountPurchasePreferred_localeEnumZh_CN
deriving (Int -> AccountPurchasePreferred_locale -> ShowS
[AccountPurchasePreferred_locale] -> ShowS
AccountPurchasePreferred_locale -> String
(Int -> AccountPurchasePreferred_locale -> ShowS)
-> (AccountPurchasePreferred_locale -> String)
-> ([AccountPurchasePreferred_locale] -> ShowS)
-> Show AccountPurchasePreferred_locale
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPurchasePreferred_locale -> ShowS
showsPrec :: Int -> AccountPurchasePreferred_locale -> ShowS
$cshow :: AccountPurchasePreferred_locale -> String
show :: AccountPurchasePreferred_locale -> String
$cshowList :: [AccountPurchasePreferred_locale] -> ShowS
showList :: [AccountPurchasePreferred_locale] -> ShowS
GHC.Show.Show, AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool
(AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool)
-> (AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool)
-> Eq AccountPurchasePreferred_locale
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool
== :: AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool
$c/= :: AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool
/= :: AccountPurchasePreferred_locale
-> AccountPurchasePreferred_locale -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountPurchasePreferred_locale where
toJSON :: AccountPurchasePreferred_locale -> Value
toJSON (AccountPurchasePreferred_localeOther Value
val) = Value
val
toJSON (AccountPurchasePreferred_localeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDa_DK) = Value
"da-DK"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDe_CH) = Value
"de-CH"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDe_DE) = Value
"de-DE"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_AU) = Value
"en-AU"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_CA) = Value
"en-CA"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_GB) = Value
"en-GB"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_IE) = Value
"en-IE"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_NZ) = Value
"en-NZ"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_US) = Value
"en-US"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_ES) = Value
"es-ES"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_MX) = Value
"es-MX"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_US) = Value
"es-US"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFi_FI) = Value
"fi-FI"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_BE) = Value
"fr-BE"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_CA) = Value
"fr-CA"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_CH) = Value
"fr-CH"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_FR) = Value
"fr-FR"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumHi_IN) = Value
"hi-IN"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumIt_IT) = Value
"it-IT"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumJa_JP) = Value
"ja-JP"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumKo_KR) = Value
"ko-KR"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumNl_BE) = Value
"nl-BE"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumNl_NL) = Value
"nl-NL"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPl_PL) = Value
"pl-PL"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPt_BR) = Value
"pt-BR"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPt_PT) = Value
"pt-PT"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumRo_RO) = Value
"ro-RO"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumRu_RU) = Value
"ru-RU"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumSk_SK) = Value
"sk-SK"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumSv_SE) = Value
"sv-SE"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumTr_TR) = Value
"tr-TR"
toJSON (AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumZh_CN) = Value
"zh-CN"
instance Data.Aeson.Types.FromJSON.FromJSON AccountPurchasePreferred_locale where
parseJSON :: Value -> Parser AccountPurchasePreferred_locale
parseJSON Value
val =
AccountPurchasePreferred_locale
-> Parser AccountPurchasePreferred_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" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDa_DK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-CH" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDe_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"de-DE" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumDe_DE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-AU" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_AU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-CA" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-GB" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_GB
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-IE" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_IE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-NZ" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_NZ
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"en-US" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEn_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-ES" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_ES
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-MX" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_MX
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es-US" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumEs_US
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fi-FI" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFi_FI
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-BE" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CA" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_CA
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-CH" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_CH
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"fr-FR" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumFr_FR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hi-IN" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumHi_IN
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"it-IT" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumIt_IT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ja-JP" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumJa_JP
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ko-KR" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumKo_KR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-BE" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumNl_BE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nl-NL" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumNl_NL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pl-PL" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPl_PL
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-BR" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPt_BR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pt-PT" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumPt_PT
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ro-RO" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumRo_RO
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru-RU" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumRu_RU
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sk-SK" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumSk_SK
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sv-SE" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumSv_SE
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tr-TR" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumTr_TR
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"zh-CN" -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeEnumZh_CN
| Bool
GHC.Base.otherwise -> Value -> AccountPurchasePreferred_locale
AccountPurchasePreferred_localeOther Value
val
)
data AccountPurchaseTransaction_type
=
AccountPurchaseTransaction_typeOther Data.Aeson.Types.Internal.Value
|
AccountPurchaseTransaction_typeTyped Data.Text.Internal.Text
|
AccountPurchaseTransaction_typeEnumMoto
deriving (Int -> AccountPurchaseTransaction_type -> ShowS
[AccountPurchaseTransaction_type] -> ShowS
AccountPurchaseTransaction_type -> String
(Int -> AccountPurchaseTransaction_type -> ShowS)
-> (AccountPurchaseTransaction_type -> String)
-> ([AccountPurchaseTransaction_type] -> ShowS)
-> Show AccountPurchaseTransaction_type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPurchaseTransaction_type -> ShowS
showsPrec :: Int -> AccountPurchaseTransaction_type -> ShowS
$cshow :: AccountPurchaseTransaction_type -> String
show :: AccountPurchaseTransaction_type -> String
$cshowList :: [AccountPurchaseTransaction_type] -> ShowS
showList :: [AccountPurchaseTransaction_type] -> ShowS
GHC.Show.Show, AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool
(AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool)
-> (AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool)
-> Eq AccountPurchaseTransaction_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool
== :: AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool
$c/= :: AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool
/= :: AccountPurchaseTransaction_type
-> AccountPurchaseTransaction_type -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON AccountPurchaseTransaction_type where
toJSON :: AccountPurchaseTransaction_type -> Value
toJSON (AccountPurchaseTransaction_typeOther Value
val) = Value
val
toJSON (AccountPurchaseTransaction_typeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (AccountPurchaseTransaction_type
AccountPurchaseTransaction_typeEnumMoto) = Value
"moto"
instance Data.Aeson.Types.FromJSON.FromJSON AccountPurchaseTransaction_type where
parseJSON :: Value -> Parser AccountPurchaseTransaction_type
parseJSON Value
val =
AccountPurchaseTransaction_type
-> Parser AccountPurchaseTransaction_type
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"moto" -> AccountPurchaseTransaction_type
AccountPurchaseTransaction_typeEnumMoto
| Bool
GHC.Base.otherwise -> Value -> AccountPurchaseTransaction_type
AccountPurchaseTransaction_typeOther Value
val
)