{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Types.Invoice 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.AccountMini
import {-# SOURCE #-} RecurlyClient.Types.CreditPayment
import {-# SOURCE #-} RecurlyClient.Types.InvoiceAddress
import {-# SOURCE #-} RecurlyClient.Types.LineItem
import {-# SOURCE #-} RecurlyClient.Types.ShippingAddress
import {-# SOURCE #-} RecurlyClient.Types.TaxInfo
import {-# SOURCE #-} RecurlyClient.Types.Transaction
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data Invoice = Invoice
{ Invoice -> Maybe AccountMini
invoiceAccount :: (GHC.Maybe.Maybe AccountMini)
, Invoice -> Maybe InvoiceAddress
invoiceAddress :: (GHC.Maybe.Maybe InvoiceAddress)
, Invoice -> Maybe Float
invoiceBalance :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe Text
invoiceBilling_info_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoiceBusiness_entity_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe JsonDateTime
invoiceClosed_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Invoice -> Maybe InvoiceCollection_method
invoiceCollection_method :: (GHC.Maybe.Maybe InvoiceCollection_method)
, Invoice -> Maybe JsonDateTime
invoiceCreated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Invoice -> Maybe [CreditPayment]
invoiceCredit_payments :: (GHC.Maybe.Maybe [CreditPayment])
, Invoice -> Maybe Text
invoiceCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoiceCustomer_notes :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Float
invoiceDiscount :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe JsonDateTime
invoiceDue_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Invoice -> Maybe Text
invoiceDunning_campaign_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Int
invoiceDunning_events_sent :: (GHC.Maybe.Maybe GHC.Types.Int)
, Invoice -> Maybe Bool
invoiceFinal_dunning_event :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Invoice -> Maybe Bool
invoiceHas_more_line_items :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Invoice -> Maybe Text
invoiceId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe [LineItem]
invoiceLine_items :: (GHC.Maybe.Maybe [LineItem])
, Invoice -> Maybe Int
invoiceNet_terms :: (GHC.Maybe.Maybe GHC.Types.Int)
, Invoice -> Maybe InvoiceNet_terms_type
invoiceNet_terms_type :: (GHC.Maybe.Maybe InvoiceNet_terms_type)
, Invoice -> Maybe Text
invoiceNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoiceObject :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe InvoiceOrigin
invoiceOrigin :: (GHC.Maybe.Maybe InvoiceOrigin)
, Invoice -> Maybe Float
invoicePaid :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe Text
invoicePo_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoicePrevious_invoice_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Float
invoiceRefundable_amount :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe ShippingAddress
invoiceShipping_address :: (GHC.Maybe.Maybe ShippingAddress)
, Invoice -> Maybe InvoiceState
invoiceState :: (GHC.Maybe.Maybe InvoiceState)
, Invoice -> Maybe [Text]
invoiceSubscription_ids :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
, Invoice -> Maybe Float
invoiceSubtotal :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe Float
invoiceTax :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe TaxInfo
invoiceTax_info :: (GHC.Maybe.Maybe TaxInfo)
, Invoice -> Maybe Text
invoiceTerms_and_conditions :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Float
invoiceTotal :: (GHC.Maybe.Maybe GHC.Types.Float)
, Invoice -> Maybe [Transaction]
invoiceTransactions :: (GHC.Maybe.Maybe [Transaction])
, Invoice -> Maybe InvoiceType
invoiceType :: (GHC.Maybe.Maybe InvoiceType)
, Invoice -> Maybe JsonDateTime
invoiceUpdated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, Invoice -> Maybe Bool
invoiceUsed_tax_service :: (GHC.Maybe.Maybe GHC.Types.Bool)
, Invoice -> Maybe Text
invoiceUuid :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoiceVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
, Invoice -> Maybe Text
invoiceVat_reverse_charge_notes :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> Invoice -> ShowS
[Invoice] -> ShowS
Invoice -> String
(Int -> Invoice -> ShowS)
-> (Invoice -> String) -> ([Invoice] -> ShowS) -> Show Invoice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Invoice -> ShowS
showsPrec :: Int -> Invoice -> ShowS
$cshow :: Invoice -> String
show :: Invoice -> String
$cshowList :: [Invoice] -> ShowS
showList :: [Invoice] -> ShowS
GHC.Show.Show
, Invoice -> Invoice -> Bool
(Invoice -> Invoice -> Bool)
-> (Invoice -> Invoice -> Bool) -> Eq Invoice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Invoice -> Invoice -> Bool
== :: Invoice -> Invoice -> Bool
$c/= :: Invoice -> Invoice -> Bool
/= :: Invoice -> Invoice -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Invoice where
toJSON :: Invoice -> Value
toJSON Invoice
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (AccountMini -> [Pair]) -> Maybe AccountMini -> [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]) -> (AccountMini -> Pair) -> AccountMini -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"account" Key -> AccountMini -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe AccountMini
invoiceAccount Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (InvoiceAddress -> [Pair]) -> Maybe InvoiceAddress -> [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])
-> (InvoiceAddress -> Pair) -> InvoiceAddress -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> InvoiceAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceAddress
invoiceAddress Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"balance" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceBalance Invoice
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
"billing_info_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..=)) (Invoice -> Maybe Text
invoiceBilling_info_id Invoice
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
"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..=)) (Invoice -> Maybe Text
invoiceBusiness_entity_id Invoice
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
"closed_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..=)) (Invoice -> Maybe JsonDateTime
invoiceClosed_at Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (InvoiceCollection_method -> [Pair])
-> Maybe InvoiceCollection_method
-> [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])
-> (InvoiceCollection_method -> Pair)
-> InvoiceCollection_method
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collection_method" Key -> InvoiceCollection_method -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceCollection_method
invoiceCollection_method Invoice
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..=)) (Invoice -> Maybe JsonDateTime
invoiceCreated_at Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([CreditPayment] -> [Pair]) -> Maybe [CreditPayment] -> [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])
-> ([CreditPayment] -> Pair) -> [CreditPayment] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"credit_payments" Key -> [CreditPayment] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [CreditPayment]
invoiceCredit_payments Invoice
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
"currency" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceCurrency Invoice
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
"customer_notes" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceCustomer_notes Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"discount" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceDiscount Invoice
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
"due_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..=)) (Invoice -> Maybe JsonDateTime
invoiceDue_at Invoice
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..=)) (Invoice -> Maybe Text
invoiceDunning_campaign_id Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Int -> [Pair]) -> Maybe Int -> [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]) -> (Int -> Pair) -> Int -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_events_sent" Key -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Int
invoiceDunning_events_sent Invoice
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
"final_dunning_event" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceFinal_dunning_event Invoice
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_more_line_items" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceHas_more_line_items Invoice
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..=)) (Invoice -> Maybe Text
invoiceId Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> ([LineItem] -> [Pair]) -> Maybe [LineItem] -> [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]) -> ([LineItem] -> Pair) -> [LineItem] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"line_items" Key -> [LineItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [LineItem]
invoiceLine_items Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Int -> [Pair]) -> Maybe Int -> [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]) -> (Int -> Pair) -> Int -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"net_terms" Key -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Int
invoiceNet_terms Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (InvoiceNet_terms_type -> [Pair])
-> Maybe InvoiceNet_terms_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])
-> (InvoiceNet_terms_type -> Pair)
-> InvoiceNet_terms_type
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"net_terms_type" Key -> InvoiceNet_terms_type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceNet_terms_type
invoiceNet_terms_type Invoice
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
"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..=)) (Invoice -> Maybe Text
invoiceNumber Invoice
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..=)) (Invoice -> Maybe Text
invoiceObject Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (InvoiceOrigin -> [Pair]) -> Maybe InvoiceOrigin -> [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])
-> (InvoiceOrigin -> Pair) -> InvoiceOrigin -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"origin" Key -> InvoiceOrigin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceOrigin
invoiceOrigin Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"paid" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoicePaid Invoice
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
"po_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..=)) (Invoice -> Maybe Text
invoicePo_number Invoice
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
"previous_invoice_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..=)) (Invoice -> Maybe Text
invoicePrevious_invoice_id Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"refundable_amount" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceRefundable_amount Invoice
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_address" Key -> ShippingAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe ShippingAddress
invoiceShipping_address Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (InvoiceState -> [Pair]) -> Maybe InvoiceState -> [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])
-> (InvoiceState -> Pair) -> InvoiceState -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> InvoiceState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceState
invoiceState Invoice
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
"subscription_ids" Key -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [Text]
invoiceSubscription_ids Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"subtotal" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceSubtotal Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceTax Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (TaxInfo -> [Pair]) -> Maybe TaxInfo -> [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]) -> (TaxInfo -> Pair) -> TaxInfo -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_info" Key -> TaxInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe TaxInfo
invoiceTax_info Invoice
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
"terms_and_conditions" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceTerms_and_conditions Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [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]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"total" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceTotal Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> ([Transaction] -> [Pair]) -> Maybe [Transaction] -> [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])
-> ([Transaction] -> Pair) -> [Transaction] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transactions" Key -> [Transaction] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [Transaction]
invoiceTransactions Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (InvoiceType -> [Pair]) -> Maybe InvoiceType -> [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]) -> (InvoiceType -> Pair) -> InvoiceType -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> InvoiceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceType
invoiceType Invoice
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..=)) (Invoice -> Maybe JsonDateTime
invoiceUpdated_at Invoice
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
"used_tax_service" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceUsed_tax_service Invoice
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
"uuid" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceUuid Invoice
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..=)) (Invoice -> Maybe Text
invoiceVat_number Invoice
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_reverse_charge_notes" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceVat_reverse_charge_notes Invoice
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: Invoice -> Encoding
toEncoding Invoice
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]
-> (AccountMini -> [Series]) -> Maybe AccountMini -> [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])
-> (AccountMini -> Series) -> AccountMini -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"account" Key -> AccountMini -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe AccountMini
invoiceAccount Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceAddress -> [Series]) -> Maybe InvoiceAddress -> [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])
-> (InvoiceAddress -> Series) -> InvoiceAddress -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"address" Key -> InvoiceAddress -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceAddress
invoiceAddress Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"balance" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceBalance Invoice
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
"billing_info_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..=)) (Invoice -> Maybe Text
invoiceBilling_info_id Invoice
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
"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..=)) (Invoice -> Maybe Text
invoiceBusiness_entity_id Invoice
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
"closed_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..=)) (Invoice -> Maybe JsonDateTime
invoiceClosed_at Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceCollection_method -> [Series])
-> Maybe InvoiceCollection_method
-> [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])
-> (InvoiceCollection_method -> Series)
-> InvoiceCollection_method
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collection_method" Key -> InvoiceCollection_method -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceCollection_method
invoiceCollection_method Invoice
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..=)) (Invoice -> Maybe JsonDateTime
invoiceCreated_at Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([CreditPayment] -> [Series])
-> Maybe [CreditPayment]
-> [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])
-> ([CreditPayment] -> Series) -> [CreditPayment] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"credit_payments" Key -> [CreditPayment] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [CreditPayment]
invoiceCredit_payments Invoice
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
"currency" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceCurrency Invoice
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
"customer_notes" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceCustomer_notes Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"discount" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceDiscount Invoice
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
"due_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..=)) (Invoice -> Maybe JsonDateTime
invoiceDue_at Invoice
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..=)) (Invoice -> Maybe Text
invoiceDunning_campaign_id Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Int -> [Series]) -> Maybe Int -> [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]) -> (Int -> Series) -> Int -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"dunning_events_sent" Key -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Int
invoiceDunning_events_sent Invoice
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
"final_dunning_event" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceFinal_dunning_event Invoice
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_more_line_items" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceHas_more_line_items Invoice
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..=)) (Invoice -> Maybe Text
invoiceId Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([LineItem] -> [Series]) -> Maybe [LineItem] -> [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])
-> ([LineItem] -> Series) -> [LineItem] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"line_items" Key -> [LineItem] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [LineItem]
invoiceLine_items Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Int -> [Series]) -> Maybe Int -> [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]) -> (Int -> Series) -> Int -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"net_terms" Key -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Int
invoiceNet_terms Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceNet_terms_type -> [Series])
-> Maybe InvoiceNet_terms_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])
-> (InvoiceNet_terms_type -> Series)
-> InvoiceNet_terms_type
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"net_terms_type" Key -> InvoiceNet_terms_type -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceNet_terms_type
invoiceNet_terms_type Invoice
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
"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..=)) (Invoice -> Maybe Text
invoiceNumber Invoice
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..=)) (Invoice -> Maybe Text
invoiceObject Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceOrigin -> [Series]) -> Maybe InvoiceOrigin -> [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])
-> (InvoiceOrigin -> Series) -> InvoiceOrigin -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"origin" Key -> InvoiceOrigin -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceOrigin
invoiceOrigin Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"paid" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoicePaid Invoice
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
"po_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..=)) (Invoice -> Maybe Text
invoicePo_number Invoice
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
"previous_invoice_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..=)) (Invoice -> Maybe Text
invoicePrevious_invoice_id Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"refundable_amount" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceRefundable_amount Invoice
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_address" Key -> ShippingAddress -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe ShippingAddress
invoiceShipping_address Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceState -> [Series]) -> Maybe InvoiceState -> [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])
-> (InvoiceState -> Series) -> InvoiceState -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"state" Key -> InvoiceState -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceState
invoiceState Invoice
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
"subscription_ids" Key -> [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [Text]
invoiceSubscription_ids Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"subtotal" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceSubtotal Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceTax Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (TaxInfo -> [Series]) -> Maybe TaxInfo -> [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]) -> (TaxInfo -> Series) -> TaxInfo -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"tax_info" Key -> TaxInfo -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe TaxInfo
invoiceTax_info Invoice
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
"terms_and_conditions" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceTerms_and_conditions Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [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]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"total" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Float
invoiceTotal Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> ([Transaction] -> [Series]) -> Maybe [Transaction] -> [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])
-> ([Transaction] -> Series) -> [Transaction] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"transactions" Key -> [Transaction] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe [Transaction]
invoiceTransactions Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceType -> [Series]) -> Maybe InvoiceType -> [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])
-> (InvoiceType -> Series) -> InvoiceType -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> InvoiceType -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe InvoiceType
invoiceType Invoice
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..=)) (Invoice -> Maybe JsonDateTime
invoiceUpdated_at Invoice
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
"used_tax_service" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Bool
invoiceUsed_tax_service Invoice
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
"uuid" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceUuid Invoice
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..=)) (Invoice -> Maybe Text
invoiceVat_number Invoice
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_reverse_charge_notes" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Invoice -> Maybe Text
invoiceVat_reverse_charge_notes Invoice
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON Invoice where
parseJSON :: Value -> Parser Invoice
parseJSON = String -> (Object -> Parser Invoice) -> Value -> Parser Invoice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Invoice" (\Object
obj -> (((((((((((((((((((((((((((((((((((((((((((Maybe AccountMini
-> Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser
(Maybe AccountMini
-> Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe AccountMini
-> Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice
Invoice Parser
(Maybe AccountMini
-> Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe AccountMini)
-> Parser
(Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 AccountMini)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"account")) Parser
(Maybe InvoiceAddress
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceAddress)
-> Parser
(Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceAddress)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"address")) Parser
(Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"balance")) Parser
(Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"billing_info_id")) Parser
(Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"business_entity_id")) Parser
(Maybe JsonDateTime
-> Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"closed_at")) Parser
(Maybe InvoiceCollection_method
-> Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceCollection_method)
-> Parser
(Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceCollection_method)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"collection_method")) Parser
(Maybe JsonDateTime
-> Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 [CreditPayment]
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe [CreditPayment])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 [CreditPayment])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"credit_payments")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"currency")) Parser
(Maybe Text
-> Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"customer_notes")) Parser
(Maybe Float
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"discount")) Parser
(Maybe JsonDateTime
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"due_at")) Parser
(Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Int)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"dunning_events_sent")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"final_dunning_event")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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_more_line_items")) Parser
(Maybe Text
-> Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 [LineItem]
-> Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe [LineItem])
-> Parser
(Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 [LineItem])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"line_items")) Parser
(Maybe Int
-> Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Int)
-> Parser
(Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"net_terms")) Parser
(Maybe InvoiceNet_terms_type
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceNet_terms_type)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceNet_terms_type)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"net_terms_type")) Parser
(Maybe Text
-> Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"number")) Parser
(Maybe Text
-> Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceOrigin
-> Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceOrigin)
-> Parser
(Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceOrigin)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"origin")) Parser
(Maybe Float
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"paid")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"po_number")) Parser
(Maybe Text
-> Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"previous_invoice_id")) Parser
(Maybe Float
-> Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"refundable_amount")) Parser
(Maybe ShippingAddress
-> Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe ShippingAddress)
-> Parser
(Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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_address")) Parser
(Maybe InvoiceState
-> Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceState)
-> Parser
(Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 InvoiceState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"state")) Parser
(Maybe [Text]
-> Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe [Text])
-> Parser
(Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"subscription_ids")) Parser
(Maybe Float
-> Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"subtotal")) Parser
(Maybe Float
-> Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"tax")) Parser
(Maybe TaxInfo
-> Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe TaxInfo)
-> Parser
(Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 TaxInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"tax_info")) Parser
(Maybe Text
-> Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Text)
-> Parser
(Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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
"terms_and_conditions")) Parser
(Maybe Float
-> Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe Float)
-> Parser
(Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"total")) Parser
(Maybe [Transaction]
-> Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe [Transaction])
-> Parser
(Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
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 [Transaction])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"transactions")) Parser
(Maybe InvoiceType
-> Maybe JsonDateTime
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Invoice)
-> Parser (Maybe InvoiceType)
-> Parser
(Maybe JsonDateTime
-> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
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 InvoiceType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"type")) Parser
(Maybe JsonDateTime
-> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
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 Bool -> Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
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
"used_tax_service")) Parser (Maybe Text -> Maybe Text -> Maybe Text -> Invoice)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Invoice)
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
"uuid")) Parser (Maybe Text -> Maybe Text -> Invoice)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Invoice)
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")) Parser (Maybe Text -> Invoice)
-> Parser (Maybe Text) -> Parser Invoice
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_reverse_charge_notes"))
mkInvoice :: Invoice
mkInvoice :: Invoice
mkInvoice =
Invoice
{ invoiceAccount :: Maybe AccountMini
invoiceAccount = Maybe AccountMini
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceAddress :: Maybe InvoiceAddress
invoiceAddress = Maybe InvoiceAddress
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceBalance :: Maybe Float
invoiceBalance = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceBilling_info_id :: Maybe Text
invoiceBilling_info_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceBusiness_entity_id :: Maybe Text
invoiceBusiness_entity_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceClosed_at :: Maybe JsonDateTime
invoiceClosed_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceCollection_method :: Maybe InvoiceCollection_method
invoiceCollection_method = Maybe InvoiceCollection_method
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceCreated_at :: Maybe JsonDateTime
invoiceCreated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceCredit_payments :: Maybe [CreditPayment]
invoiceCredit_payments = Maybe [CreditPayment]
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceCurrency :: Maybe Text
invoiceCurrency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceCustomer_notes :: Maybe Text
invoiceCustomer_notes = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceDiscount :: Maybe Float
invoiceDiscount = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceDue_at :: Maybe JsonDateTime
invoiceDue_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceDunning_campaign_id :: Maybe Text
invoiceDunning_campaign_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceDunning_events_sent :: Maybe Int
invoiceDunning_events_sent = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceFinal_dunning_event :: Maybe Bool
invoiceFinal_dunning_event = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceHas_more_line_items :: Maybe Bool
invoiceHas_more_line_items = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceId :: Maybe Text
invoiceId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceLine_items :: Maybe [LineItem]
invoiceLine_items = Maybe [LineItem]
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceNet_terms :: Maybe Int
invoiceNet_terms = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceNet_terms_type :: Maybe InvoiceNet_terms_type
invoiceNet_terms_type = Maybe InvoiceNet_terms_type
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceNumber :: Maybe Text
invoiceNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceObject :: Maybe Text
invoiceObject = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceOrigin :: Maybe InvoiceOrigin
invoiceOrigin = Maybe InvoiceOrigin
forall a. Maybe a
GHC.Maybe.Nothing
, invoicePaid :: Maybe Float
invoicePaid = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoicePo_number :: Maybe Text
invoicePo_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoicePrevious_invoice_id :: Maybe Text
invoicePrevious_invoice_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceRefundable_amount :: Maybe Float
invoiceRefundable_amount = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceShipping_address :: Maybe ShippingAddress
invoiceShipping_address = Maybe ShippingAddress
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceState :: Maybe InvoiceState
invoiceState = Maybe InvoiceState
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceSubscription_ids :: Maybe [Text]
invoiceSubscription_ids = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceSubtotal :: Maybe Float
invoiceSubtotal = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceTax :: Maybe Float
invoiceTax = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceTax_info :: Maybe TaxInfo
invoiceTax_info = Maybe TaxInfo
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceTerms_and_conditions :: Maybe Text
invoiceTerms_and_conditions = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceTotal :: Maybe Float
invoiceTotal = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceTransactions :: Maybe [Transaction]
invoiceTransactions = Maybe [Transaction]
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceType :: Maybe InvoiceType
invoiceType = Maybe InvoiceType
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceUpdated_at :: Maybe JsonDateTime
invoiceUpdated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceUsed_tax_service :: Maybe Bool
invoiceUsed_tax_service = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceUuid :: Maybe Text
invoiceUuid = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceVat_number :: Maybe Text
invoiceVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
, invoiceVat_reverse_charge_notes :: Maybe Text
invoiceVat_reverse_charge_notes = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data InvoiceCollection_method
=
InvoiceCollection_methodOther Data.Aeson.Types.Internal.Value
|
InvoiceCollection_methodTyped Data.Text.Internal.Text
|
InvoiceCollection_methodEnumAutomatic
|
InvoiceCollection_methodEnumManual
deriving (Int -> InvoiceCollection_method -> ShowS
[InvoiceCollection_method] -> ShowS
InvoiceCollection_method -> String
(Int -> InvoiceCollection_method -> ShowS)
-> (InvoiceCollection_method -> String)
-> ([InvoiceCollection_method] -> ShowS)
-> Show InvoiceCollection_method
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceCollection_method -> ShowS
showsPrec :: Int -> InvoiceCollection_method -> ShowS
$cshow :: InvoiceCollection_method -> String
show :: InvoiceCollection_method -> String
$cshowList :: [InvoiceCollection_method] -> ShowS
showList :: [InvoiceCollection_method] -> ShowS
GHC.Show.Show, InvoiceCollection_method -> InvoiceCollection_method -> Bool
(InvoiceCollection_method -> InvoiceCollection_method -> Bool)
-> (InvoiceCollection_method -> InvoiceCollection_method -> Bool)
-> Eq InvoiceCollection_method
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceCollection_method -> InvoiceCollection_method -> Bool
== :: InvoiceCollection_method -> InvoiceCollection_method -> Bool
$c/= :: InvoiceCollection_method -> InvoiceCollection_method -> Bool
/= :: InvoiceCollection_method -> InvoiceCollection_method -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCollection_method where
toJSON :: InvoiceCollection_method -> Value
toJSON (InvoiceCollection_methodOther Value
val) = Value
val
toJSON (InvoiceCollection_methodTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (InvoiceCollection_method
InvoiceCollection_methodEnumAutomatic) = Value
"automatic"
toJSON (InvoiceCollection_method
InvoiceCollection_methodEnumManual) = Value
"manual"
instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCollection_method where
parseJSON :: Value -> Parser InvoiceCollection_method
parseJSON Value
val =
InvoiceCollection_method -> Parser InvoiceCollection_method
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
"automatic" -> InvoiceCollection_method
InvoiceCollection_methodEnumAutomatic
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"manual" -> InvoiceCollection_method
InvoiceCollection_methodEnumManual
| Bool
GHC.Base.otherwise -> Value -> InvoiceCollection_method
InvoiceCollection_methodOther Value
val
)
data InvoiceNet_terms_type
=
InvoiceNet_terms_typeOther Data.Aeson.Types.Internal.Value
|
InvoiceNet_terms_typeTyped Data.Text.Internal.Text
|
InvoiceNet_terms_typeEnumNet
|
InvoiceNet_terms_typeEnumEom
deriving (Int -> InvoiceNet_terms_type -> ShowS
[InvoiceNet_terms_type] -> ShowS
InvoiceNet_terms_type -> String
(Int -> InvoiceNet_terms_type -> ShowS)
-> (InvoiceNet_terms_type -> String)
-> ([InvoiceNet_terms_type] -> ShowS)
-> Show InvoiceNet_terms_type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceNet_terms_type -> ShowS
showsPrec :: Int -> InvoiceNet_terms_type -> ShowS
$cshow :: InvoiceNet_terms_type -> String
show :: InvoiceNet_terms_type -> String
$cshowList :: [InvoiceNet_terms_type] -> ShowS
showList :: [InvoiceNet_terms_type] -> ShowS
GHC.Show.Show, InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool
(InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool)
-> (InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool)
-> Eq InvoiceNet_terms_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool
== :: InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool
$c/= :: InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool
/= :: InvoiceNet_terms_type -> InvoiceNet_terms_type -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON InvoiceNet_terms_type where
toJSON :: InvoiceNet_terms_type -> Value
toJSON (InvoiceNet_terms_typeOther Value
val) = Value
val
toJSON (InvoiceNet_terms_typeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (InvoiceNet_terms_type
InvoiceNet_terms_typeEnumNet) = Value
"net"
toJSON (InvoiceNet_terms_type
InvoiceNet_terms_typeEnumEom) = Value
"eom"
instance Data.Aeson.Types.FromJSON.FromJSON InvoiceNet_terms_type where
parseJSON :: Value -> Parser InvoiceNet_terms_type
parseJSON Value
val =
InvoiceNet_terms_type -> Parser InvoiceNet_terms_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
"net" -> InvoiceNet_terms_type
InvoiceNet_terms_typeEnumNet
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"eom" -> InvoiceNet_terms_type
InvoiceNet_terms_typeEnumEom
| Bool
GHC.Base.otherwise -> Value -> InvoiceNet_terms_type
InvoiceNet_terms_typeOther Value
val
)
data InvoiceOrigin
=
InvoiceOriginOther Data.Aeson.Types.Internal.Value
|
InvoiceOriginTyped Data.Text.Internal.Text
|
InvoiceOriginEnumCarryforward_credit
|
InvoiceOriginEnumCarryforward_gift_credit
|
InvoiceOriginEnumCredit
|
InvoiceOriginEnumExternal_refund
|
InvoiceOriginEnumGift_card
|
InvoiceOriginEnumImmediate_change
|
InvoiceOriginEnumImport
|
InvoiceOriginEnumLine_item_refund
|
InvoiceOriginEnumOpen_amount_refund
|
InvoiceOriginEnumPrepayment
|
InvoiceOriginEnumPurchase
|
InvoiceOriginEnumRefund
|
InvoiceOriginEnumRenewal
|
InvoiceOriginEnumTermination
|
InvoiceOriginEnumUsage_correction
|
InvoiceOriginEnumWrite_off
deriving (Int -> InvoiceOrigin -> ShowS
[InvoiceOrigin] -> ShowS
InvoiceOrigin -> String
(Int -> InvoiceOrigin -> ShowS)
-> (InvoiceOrigin -> String)
-> ([InvoiceOrigin] -> ShowS)
-> Show InvoiceOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceOrigin -> ShowS
showsPrec :: Int -> InvoiceOrigin -> ShowS
$cshow :: InvoiceOrigin -> String
show :: InvoiceOrigin -> String
$cshowList :: [InvoiceOrigin] -> ShowS
showList :: [InvoiceOrigin] -> ShowS
GHC.Show.Show, InvoiceOrigin -> InvoiceOrigin -> Bool
(InvoiceOrigin -> InvoiceOrigin -> Bool)
-> (InvoiceOrigin -> InvoiceOrigin -> Bool) -> Eq InvoiceOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceOrigin -> InvoiceOrigin -> Bool
== :: InvoiceOrigin -> InvoiceOrigin -> Bool
$c/= :: InvoiceOrigin -> InvoiceOrigin -> Bool
/= :: InvoiceOrigin -> InvoiceOrigin -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON InvoiceOrigin where
toJSON :: InvoiceOrigin -> Value
toJSON (InvoiceOriginOther Value
val) = Value
val
toJSON (InvoiceOriginTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (InvoiceOrigin
InvoiceOriginEnumCarryforward_credit) = Value
"carryforward_credit"
toJSON (InvoiceOrigin
InvoiceOriginEnumCarryforward_gift_credit) = Value
"carryforward_gift_credit"
toJSON (InvoiceOrigin
InvoiceOriginEnumCredit) = Value
"credit"
toJSON (InvoiceOrigin
InvoiceOriginEnumExternal_refund) = Value
"external_refund"
toJSON (InvoiceOrigin
InvoiceOriginEnumGift_card) = Value
"gift_card"
toJSON (InvoiceOrigin
InvoiceOriginEnumImmediate_change) = Value
"immediate_change"
toJSON (InvoiceOrigin
InvoiceOriginEnumImport) = Value
"import"
toJSON (InvoiceOrigin
InvoiceOriginEnumLine_item_refund) = Value
"line_item_refund"
toJSON (InvoiceOrigin
InvoiceOriginEnumOpen_amount_refund) = Value
"open_amount_refund"
toJSON (InvoiceOrigin
InvoiceOriginEnumPrepayment) = Value
"prepayment"
toJSON (InvoiceOrigin
InvoiceOriginEnumPurchase) = Value
"purchase"
toJSON (InvoiceOrigin
InvoiceOriginEnumRefund) = Value
"refund"
toJSON (InvoiceOrigin
InvoiceOriginEnumRenewal) = Value
"renewal"
toJSON (InvoiceOrigin
InvoiceOriginEnumTermination) = Value
"termination"
toJSON (InvoiceOrigin
InvoiceOriginEnumUsage_correction) = Value
"usage_correction"
toJSON (InvoiceOrigin
InvoiceOriginEnumWrite_off) = Value
"write_off"
instance Data.Aeson.Types.FromJSON.FromJSON InvoiceOrigin where
parseJSON :: Value -> Parser InvoiceOrigin
parseJSON Value
val =
InvoiceOrigin -> Parser InvoiceOrigin
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
"carryforward_credit" -> InvoiceOrigin
InvoiceOriginEnumCarryforward_credit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"carryforward_gift_credit" -> InvoiceOrigin
InvoiceOriginEnumCarryforward_gift_credit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"credit" -> InvoiceOrigin
InvoiceOriginEnumCredit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"external_refund" -> InvoiceOrigin
InvoiceOriginEnumExternal_refund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"gift_card" -> InvoiceOrigin
InvoiceOriginEnumGift_card
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"immediate_change" -> InvoiceOrigin
InvoiceOriginEnumImmediate_change
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"import" -> InvoiceOrigin
InvoiceOriginEnumImport
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"line_item_refund" -> InvoiceOrigin
InvoiceOriginEnumLine_item_refund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"open_amount_refund" -> InvoiceOrigin
InvoiceOriginEnumOpen_amount_refund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"prepayment" -> InvoiceOrigin
InvoiceOriginEnumPrepayment
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"purchase" -> InvoiceOrigin
InvoiceOriginEnumPurchase
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund" -> InvoiceOrigin
InvoiceOriginEnumRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"renewal" -> InvoiceOrigin
InvoiceOriginEnumRenewal
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"termination" -> InvoiceOrigin
InvoiceOriginEnumTermination
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"usage_correction" -> InvoiceOrigin
InvoiceOriginEnumUsage_correction
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"write_off" -> InvoiceOrigin
InvoiceOriginEnumWrite_off
| Bool
GHC.Base.otherwise -> Value -> InvoiceOrigin
InvoiceOriginOther Value
val
)
data InvoiceState
=
InvoiceStateOther Data.Aeson.Types.Internal.Value
|
InvoiceStateTyped Data.Text.Internal.Text
|
InvoiceStateEnumOpen
|
InvoiceStateEnumPending
|
InvoiceStateEnumProcessing
|
InvoiceStateEnumPast_due
|
InvoiceStateEnumPaid
|
InvoiceStateEnumClosed
|
InvoiceStateEnumFailed
|
InvoiceStateEnumVoided
deriving (Int -> InvoiceState -> ShowS
[InvoiceState] -> ShowS
InvoiceState -> String
(Int -> InvoiceState -> ShowS)
-> (InvoiceState -> String)
-> ([InvoiceState] -> ShowS)
-> Show InvoiceState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceState -> ShowS
showsPrec :: Int -> InvoiceState -> ShowS
$cshow :: InvoiceState -> String
show :: InvoiceState -> String
$cshowList :: [InvoiceState] -> ShowS
showList :: [InvoiceState] -> ShowS
GHC.Show.Show, InvoiceState -> InvoiceState -> Bool
(InvoiceState -> InvoiceState -> Bool)
-> (InvoiceState -> InvoiceState -> Bool) -> Eq InvoiceState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceState -> InvoiceState -> Bool
== :: InvoiceState -> InvoiceState -> Bool
$c/= :: InvoiceState -> InvoiceState -> Bool
/= :: InvoiceState -> InvoiceState -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON InvoiceState where
toJSON :: InvoiceState -> Value
toJSON (InvoiceStateOther Value
val) = Value
val
toJSON (InvoiceStateTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (InvoiceState
InvoiceStateEnumOpen) = Value
"open"
toJSON (InvoiceState
InvoiceStateEnumPending) = Value
"pending"
toJSON (InvoiceState
InvoiceStateEnumProcessing) = Value
"processing"
toJSON (InvoiceState
InvoiceStateEnumPast_due) = Value
"past_due"
toJSON (InvoiceState
InvoiceStateEnumPaid) = Value
"paid"
toJSON (InvoiceState
InvoiceStateEnumClosed) = Value
"closed"
toJSON (InvoiceState
InvoiceStateEnumFailed) = Value
"failed"
toJSON (InvoiceState
InvoiceStateEnumVoided) = Value
"voided"
instance Data.Aeson.Types.FromJSON.FromJSON InvoiceState where
parseJSON :: Value -> Parser InvoiceState
parseJSON Value
val =
InvoiceState -> Parser InvoiceState
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
"open" -> InvoiceState
InvoiceStateEnumOpen
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pending" -> InvoiceState
InvoiceStateEnumPending
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"processing" -> InvoiceState
InvoiceStateEnumProcessing
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"past_due" -> InvoiceState
InvoiceStateEnumPast_due
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"paid" -> InvoiceState
InvoiceStateEnumPaid
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"closed" -> InvoiceState
InvoiceStateEnumClosed
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"failed" -> InvoiceState
InvoiceStateEnumFailed
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"voided" -> InvoiceState
InvoiceStateEnumVoided
| Bool
GHC.Base.otherwise -> Value -> InvoiceState
InvoiceStateOther Value
val
)
data InvoiceType
=
InvoiceTypeOther Data.Aeson.Types.Internal.Value
|
InvoiceTypeTyped Data.Text.Internal.Text
|
InvoiceTypeEnumCharge
|
InvoiceTypeEnumCredit
|
InvoiceTypeEnumLegacy
deriving (Int -> InvoiceType -> ShowS
[InvoiceType] -> ShowS
InvoiceType -> String
(Int -> InvoiceType -> ShowS)
-> (InvoiceType -> String)
-> ([InvoiceType] -> ShowS)
-> Show InvoiceType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InvoiceType -> ShowS
showsPrec :: Int -> InvoiceType -> ShowS
$cshow :: InvoiceType -> String
show :: InvoiceType -> String
$cshowList :: [InvoiceType] -> ShowS
showList :: [InvoiceType] -> ShowS
GHC.Show.Show, InvoiceType -> InvoiceType -> Bool
(InvoiceType -> InvoiceType -> Bool)
-> (InvoiceType -> InvoiceType -> Bool) -> Eq InvoiceType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InvoiceType -> InvoiceType -> Bool
== :: InvoiceType -> InvoiceType -> Bool
$c/= :: InvoiceType -> InvoiceType -> Bool
/= :: InvoiceType -> InvoiceType -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON InvoiceType where
toJSON :: InvoiceType -> Value
toJSON (InvoiceTypeOther Value
val) = Value
val
toJSON (InvoiceTypeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (InvoiceType
InvoiceTypeEnumCharge) = Value
"charge"
toJSON (InvoiceType
InvoiceTypeEnumCredit) = Value
"credit"
toJSON (InvoiceType
InvoiceTypeEnumLegacy) = Value
"legacy"
instance Data.Aeson.Types.FromJSON.FromJSON InvoiceType where
parseJSON :: Value -> Parser InvoiceType
parseJSON Value
val =
InvoiceType -> Parser InvoiceType
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
"charge" -> InvoiceType
InvoiceTypeEnumCharge
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"credit" -> InvoiceType
InvoiceTypeEnumCredit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"legacy" -> InvoiceType
InvoiceTypeEnumLegacy
| Bool
GHC.Base.otherwise -> Value -> InvoiceType
InvoiceTypeOther Value
val
)