{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the types generated from the schema Invoice
module StripeAPI.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.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified 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 StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.Account
import {-# SOURCE #-} StripeAPI.Types.Address
import {-# SOURCE #-} StripeAPI.Types.AlipayAccount
import {-# SOURCE #-} StripeAPI.Types.ApiErrors
import {-# SOURCE #-} StripeAPI.Types.AutomaticTax
import {-# SOURCE #-} StripeAPI.Types.BankAccount
import {-# SOURCE #-} StripeAPI.Types.BitcoinReceiver
import {-# SOURCE #-} StripeAPI.Types.Card
import {-# SOURCE #-} StripeAPI.Types.Charge
import {-# SOURCE #-} StripeAPI.Types.Coupon
import {-# SOURCE #-} StripeAPI.Types.Customer
import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer
import {-# SOURCE #-} StripeAPI.Types.DeletedDiscount
import {-# SOURCE #-} StripeAPI.Types.DeletedTaxId
import {-# SOURCE #-} StripeAPI.Types.Discount
import {-# SOURCE #-} StripeAPI.Types.DiscountsResourceDiscountAmount
import {-# SOURCE #-} StripeAPI.Types.InvoiceSettingCustomField
import {-# SOURCE #-} StripeAPI.Types.InvoiceTaxAmount
import {-# SOURCE #-} StripeAPI.Types.InvoiceThresholdReason
import {-# SOURCE #-} StripeAPI.Types.InvoiceTransferData
import {-# SOURCE #-} StripeAPI.Types.InvoicesPaymentSettings
import {-# SOURCE #-} StripeAPI.Types.InvoicesResourceInvoiceTaxId
import {-# SOURCE #-} StripeAPI.Types.InvoicesStatusTransitions
import {-# SOURCE #-} StripeAPI.Types.LineItem
import {-# SOURCE #-} StripeAPI.Types.PaymentIntent
import {-# SOURCE #-} StripeAPI.Types.PaymentMethod
import {-# SOURCE #-} StripeAPI.Types.PromotionCode
import {-# SOURCE #-} StripeAPI.Types.Recipient
import {-# SOURCE #-} StripeAPI.Types.SetupIntent
import {-# SOURCE #-} StripeAPI.Types.Shipping
import {-# SOURCE #-} StripeAPI.Types.Source
import {-# SOURCE #-} StripeAPI.Types.SourceCodeVerificationFlow
import {-# SOURCE #-} StripeAPI.Types.SourceOrder
import {-# SOURCE #-} StripeAPI.Types.SourceOwner
import {-# SOURCE #-} StripeAPI.Types.SourceReceiverFlow
import {-# SOURCE #-} StripeAPI.Types.SourceRedirectFlow
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchCreditTransfer
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAchDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAcssDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAlipay
import {-# SOURCE #-} StripeAPI.Types.SourceTypeAuBecsDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeBancontact
import {-# SOURCE #-} StripeAPI.Types.SourceTypeCard
import {-# SOURCE #-} StripeAPI.Types.SourceTypeCardPresent
import {-# SOURCE #-} StripeAPI.Types.SourceTypeEps
import {-# SOURCE #-} StripeAPI.Types.SourceTypeGiropay
import {-# SOURCE #-} StripeAPI.Types.SourceTypeIdeal
import {-# SOURCE #-} StripeAPI.Types.SourceTypeKlarna
import {-# SOURCE #-} StripeAPI.Types.SourceTypeMultibanco
import {-# SOURCE #-} StripeAPI.Types.SourceTypeP24
import {-# SOURCE #-} StripeAPI.Types.SourceTypeSepaDebit
import {-# SOURCE #-} StripeAPI.Types.SourceTypeSofort
import {-# SOURCE #-} StripeAPI.Types.SourceTypeThreeDSecure
import {-# SOURCE #-} StripeAPI.Types.SourceTypeWechat
import {-# SOURCE #-} StripeAPI.Types.Subscription
import {-# SOURCE #-} StripeAPI.Types.TaxId
import {-# SOURCE #-} StripeAPI.Types.TaxRate
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.invoice@ in the specification.
--
-- Invoices are statements of amounts owed by a customer, and are either
-- generated one-off, or generated periodically from a subscription.
--
-- They contain [invoice items](https:\/\/stripe.com\/docs\/api\#invoiceitems), and proration adjustments
-- that may be caused by subscription upgrades\/downgrades (if necessary).
--
-- If your invoice is configured to be billed through automatic charges,
-- Stripe automatically finalizes your invoice and attempts payment. Note
-- that finalizing the invoice,
-- [when automatic](https:\/\/stripe.com\/docs\/billing\/invoices\/workflow\/\#auto_advance), does
-- not happen immediately as the invoice is created. Stripe waits
-- until one hour after the last webhook was successfully sent (or the last
-- webhook timed out after failing). If you (and the platforms you may have
-- connected to) have no webhooks configured, Stripe waits one hour after
-- creation to finalize the invoice.
--
-- If your invoice is configured to be billed by sending an email, then based on your
-- [email settings](https:\/\/dashboard.stripe.com\/account\/billing\/automatic\'),
-- Stripe will email the invoice to your customer and await payment. These
-- emails can contain a link to a hosted page to pay the invoice.
--
-- Stripe applies any customer credit on the account before determining the
-- amount due for the invoice (i.e., the amount that will be actually
-- charged). If the amount due for the invoice is less than Stripe\'s [minimum allowed charge
-- per currency](\/docs\/currencies\#minimum-and-maximum-charge-amounts), the
-- invoice is automatically marked paid, and we add the amount due to the
-- customer\'s credit balance which is applied to the next invoice.
--
-- More details on the customer\'s credit balance are
-- [here](https:\/\/stripe.com\/docs\/billing\/customer\/balance).
--
-- Related guide: [Send Invoices to Customers](https:\/\/stripe.com\/docs\/billing\/invoices\/sending).
data Invoice = Invoice
  { -- | account_country: The country of the business associated with this invoice, most often the business creating the invoice.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceAccountCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | account_name: The public name of the business associated with this invoice, most often the business creating the invoice.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceAccountName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | account_tax_ids: The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
    Invoice -> Maybe [InvoiceAccountTaxIds'Variants]
invoiceAccountTaxIds :: (GHC.Maybe.Maybe ([InvoiceAccountTaxIds'Variants])),
    -- | amount_due: Final amount due at this time for this invoice. If the invoice\'s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the \`amount_due\` may be 0. If there is a positive \`starting_balance\` for the invoice (the customer owes money), the \`amount_due\` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in \`amount_due\`.
    Invoice -> Int
invoiceAmountDue :: GHC.Types.Int,
    -- | amount_paid: The amount, in %s, that was paid.
    Invoice -> Int
invoiceAmountPaid :: GHC.Types.Int,
    -- | amount_remaining: The amount remaining, in %s, that is due.
    Invoice -> Int
invoiceAmountRemaining :: GHC.Types.Int,
    -- | application_fee_amount: The fee in %s that will be applied to the invoice and transferred to the application owner\'s Stripe account when the invoice is paid.
    Invoice -> Maybe Int
invoiceApplicationFeeAmount :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | attempt_count: Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
    Invoice -> Int
invoiceAttemptCount :: GHC.Types.Int,
    -- | attempted: Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the \`invoice.created\` webhook, for example, so you might not want to display that invoice as unpaid to your users.
    Invoice -> Bool
invoiceAttempted :: GHC.Types.Bool,
    -- | auto_advance: Controls whether Stripe will perform [automatic collection](https:\/\/stripe.com\/docs\/billing\/invoices\/workflow\/\#auto_advance) of the invoice. When \`false\`, the invoice\'s state will not automatically advance without an explicit action.
    Invoice -> Maybe Bool
invoiceAutoAdvance :: (GHC.Maybe.Maybe GHC.Types.Bool),
    -- | automatic_tax:
    Invoice -> AutomaticTax
invoiceAutomaticTax :: AutomaticTax,
    -- | billing_reason: Indicates the reason why the invoice was created. \`subscription_cycle\` indicates an invoice created by a subscription advancing into a new period. \`subscription_create\` indicates an invoice created due to creating a subscription. \`subscription_update\` indicates an invoice created due to updating a subscription. \`subscription\` is set for all old invoices to indicate either a change to a subscription or a period advancement. \`manual\` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The \`upcoming\` value is reserved for simulated invoices per the upcoming invoice endpoint. \`subscription_threshold\` indicates an invoice created due to a billing threshold being reached.
    Invoice -> Maybe InvoiceBillingReason'
invoiceBillingReason :: (GHC.Maybe.Maybe InvoiceBillingReason'),
    -- | charge: ID of the latest charge generated for this invoice, if any.
    Invoice -> Maybe InvoiceCharge'Variants
invoiceCharge :: (GHC.Maybe.Maybe InvoiceCharge'Variants),
    -- | collection_method: Either \`charge_automatically\`, or \`send_invoice\`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
    Invoice -> Maybe InvoiceCollectionMethod'
invoiceCollectionMethod :: (GHC.Maybe.Maybe InvoiceCollectionMethod'),
    -- | created: Time at which the object was created. Measured in seconds since the Unix epoch.
    Invoice -> Int
invoiceCreated :: GHC.Types.Int,
    -- | currency: Three-letter [ISO currency code](https:\/\/www.iso.org\/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https:\/\/stripe.com\/docs\/currencies).
    Invoice -> Text
invoiceCurrency :: Data.Text.Internal.Text,
    -- | custom_fields: Custom fields displayed on the invoice.
    Invoice -> Maybe [InvoiceSettingCustomField]
invoiceCustomFields :: (GHC.Maybe.Maybe ([InvoiceSettingCustomField])),
    -- | customer: The ID of the customer who will be billed.
    Invoice -> Maybe InvoiceCustomer'Variants
invoiceCustomer :: (GHC.Maybe.Maybe InvoiceCustomer'Variants),
    -- | customer_address: The customer\'s address. Until the invoice is finalized, this field will equal \`customer.address\`. Once the invoice is finalized, this field will no longer be updated.
    Invoice -> Maybe InvoiceCustomerAddress'
invoiceCustomerAddress :: (GHC.Maybe.Maybe InvoiceCustomerAddress'),
    -- | customer_email: The customer\'s email. Until the invoice is finalized, this field will equal \`customer.email\`. Once the invoice is finalized, this field will no longer be updated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceCustomerEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | customer_name: The customer\'s name. Until the invoice is finalized, this field will equal \`customer.name\`. Once the invoice is finalized, this field will no longer be updated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceCustomerName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | customer_phone: The customer\'s phone number. Until the invoice is finalized, this field will equal \`customer.phone\`. Once the invoice is finalized, this field will no longer be updated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceCustomerPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | customer_shipping: The customer\'s shipping information. Until the invoice is finalized, this field will equal \`customer.shipping\`. Once the invoice is finalized, this field will no longer be updated.
    Invoice -> Maybe InvoiceCustomerShipping'
invoiceCustomerShipping :: (GHC.Maybe.Maybe InvoiceCustomerShipping'),
    -- | customer_tax_exempt: The customer\'s tax exempt status. Until the invoice is finalized, this field will equal \`customer.tax_exempt\`. Once the invoice is finalized, this field will no longer be updated.
    Invoice -> Maybe InvoiceCustomerTaxExempt'
invoiceCustomerTaxExempt :: (GHC.Maybe.Maybe InvoiceCustomerTaxExempt'),
    -- | customer_tax_ids: The customer\'s tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as \`customer.tax_ids\`. Once the invoice is finalized, this field will no longer be updated.
    Invoice -> Maybe [InvoicesResourceInvoiceTaxId]
invoiceCustomerTaxIds :: (GHC.Maybe.Maybe ([InvoicesResourceInvoiceTaxId])),
    -- | default_payment_method: ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription\'s default payment method, if any, or to the default payment method in the customer\'s invoice settings.
    Invoice -> Maybe InvoiceDefaultPaymentMethod'Variants
invoiceDefaultPaymentMethod :: (GHC.Maybe.Maybe InvoiceDefaultPaymentMethod'Variants),
    -- | default_source: ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription\'s default source, if any, or to the customer\'s default source.
    Invoice -> Maybe InvoiceDefaultSource'Variants
invoiceDefaultSource :: (GHC.Maybe.Maybe InvoiceDefaultSource'Variants),
    -- | default_tax_rates: The tax rates applied to this invoice, if any.
    Invoice -> [TaxRate]
invoiceDefaultTaxRates :: ([TaxRate]),
    -- | description: An arbitrary string attached to the object. Often useful for displaying to users. Referenced as \'memo\' in the Dashboard.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | discount: Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
    Invoice -> Maybe InvoiceDiscount'
invoiceDiscount :: (GHC.Maybe.Maybe InvoiceDiscount'),
    -- | discounts: The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use \`expand[]=discounts\` to expand each discount.
    Invoice -> Maybe [InvoiceDiscounts'Variants]
invoiceDiscounts :: (GHC.Maybe.Maybe ([InvoiceDiscounts'Variants])),
    -- | due_date: The date on which payment for this invoice is due. This value will be \`null\` for invoices where \`collection_method=charge_automatically\`.
    Invoice -> Maybe Int
invoiceDueDate :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | ending_balance: Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
    Invoice -> Maybe Int
invoiceEndingBalance :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | footer: Footer displayed on the invoice.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceFooter :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | hosted_invoice_url: The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceHostedInvoiceUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | id: Unique identifier for the object.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceId :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | invoice_pdf: The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceInvoicePdf :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | last_finalization_error: The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
    Invoice -> Maybe InvoiceLastFinalizationError'
invoiceLastFinalizationError :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'),
    -- | lines: The individual line items that make up the invoice. \`lines\` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
    Invoice -> InvoiceLines'
invoiceLines :: InvoiceLines',
    -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.
    Invoice -> Bool
invoiceLivemode :: GHC.Types.Bool,
    -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    Invoice -> Maybe Object
invoiceMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
    -- | next_payment_attempt: The time at which payment will next be attempted. This value will be \`null\` for invoices where \`collection_method=send_invoice\`.
    Invoice -> Maybe Int
invoiceNextPaymentAttempt :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | number: A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer\'s unique invoice_prefix if it is specified.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | on_behalf_of: The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https:\/\/stripe.com\/docs\/billing\/invoices\/connect) documentation for details.
    Invoice -> Maybe InvoiceOnBehalfOf'Variants
invoiceOnBehalfOf :: (GHC.Maybe.Maybe InvoiceOnBehalfOf'Variants),
    -- | paid: Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer\'s account balance.
    Invoice -> Bool
invoicePaid :: GHC.Types.Bool,
    -- | payment_intent: The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
    Invoice -> Maybe InvoicePaymentIntent'Variants
invoicePaymentIntent :: (GHC.Maybe.Maybe InvoicePaymentIntent'Variants),
    -- | payment_settings:
    Invoice -> InvoicesPaymentSettings
invoicePaymentSettings :: InvoicesPaymentSettings,
    -- | period_end: End of the usage period during which invoice items were added to this invoice.
    Invoice -> Int
invoicePeriodEnd :: GHC.Types.Int,
    -- | period_start: Start of the usage period during which invoice items were added to this invoice.
    Invoice -> Int
invoicePeriodStart :: GHC.Types.Int,
    -- | post_payment_credit_notes_amount: Total amount of all post-payment credit notes issued for this invoice.
    Invoice -> Int
invoicePostPaymentCreditNotesAmount :: GHC.Types.Int,
    -- | pre_payment_credit_notes_amount: Total amount of all pre-payment credit notes issued for this invoice.
    Invoice -> Int
invoicePrePaymentCreditNotesAmount :: GHC.Types.Int,
    -- | receipt_number: This is the transaction number that appears on email receipts sent for this invoice.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceReceiptNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | starting_balance: Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.
    Invoice -> Int
invoiceStartingBalance :: GHC.Types.Int,
    -- | statement_descriptor: Extra information about an invoice for the customer\'s credit card statement.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    Invoice -> Maybe Text
invoiceStatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | status: The status of the invoice, one of \`draft\`, \`open\`, \`paid\`, \`uncollectible\`, or \`void\`. [Learn more](https:\/\/stripe.com\/docs\/billing\/invoices\/workflow\#workflow-overview)
    Invoice -> Maybe InvoiceStatus'
invoiceStatus :: (GHC.Maybe.Maybe InvoiceStatus'),
    -- | status_transitions:
    Invoice -> InvoicesStatusTransitions
invoiceStatusTransitions :: InvoicesStatusTransitions,
    -- | subscription: The subscription that this invoice was prepared for, if any.
    Invoice -> Maybe InvoiceSubscription'Variants
invoiceSubscription :: (GHC.Maybe.Maybe InvoiceSubscription'Variants),
    -- | subscription_proration_date: Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
    Invoice -> Maybe Int
invoiceSubscriptionProrationDate :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | subtotal: Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
    Invoice -> Int
invoiceSubtotal :: GHC.Types.Int,
    -- | tax: The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
    Invoice -> Maybe Int
invoiceTax :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | threshold_reason:
    Invoice -> Maybe InvoiceThresholdReason
invoiceThresholdReason :: (GHC.Maybe.Maybe InvoiceThresholdReason),
    -- | total: Total after discounts and taxes.
    Invoice -> Int
invoiceTotal :: GHC.Types.Int,
    -- | total_discount_amounts: The aggregate amounts calculated per discount across all line items.
    Invoice -> Maybe [DiscountsResourceDiscountAmount]
invoiceTotalDiscountAmounts :: (GHC.Maybe.Maybe ([DiscountsResourceDiscountAmount])),
    -- | total_tax_amounts: The aggregate amounts calculated per tax rate for all line items.
    Invoice -> [InvoiceTaxAmount]
invoiceTotalTaxAmounts :: ([InvoiceTaxAmount]),
    -- | transfer_data: The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
    Invoice -> Maybe InvoiceTransferData'
invoiceTransferData :: (GHC.Maybe.Maybe InvoiceTransferData'),
    -- | webhooks_delivered_at: Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https:\/\/stripe.com\/docs\/billing\/webhooks\#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
    Invoice -> Maybe Int
invoiceWebhooksDeliveredAt :: (GHC.Maybe.Maybe GHC.Types.Int)
  }
  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
showList :: [Invoice] -> ShowS
$cshowList :: [Invoice] -> ShowS
show :: Invoice -> String
$cshow :: Invoice -> String
showsPrec :: Int -> Invoice -> ShowS
$cshowsPrec :: Int -> 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
/= :: Invoice -> Invoice -> Bool
$c/= :: Invoice -> Invoice -> Bool
== :: Invoice -> Invoice -> Bool
$c== :: 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 (Text
"account_country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceAccountCountry Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceAccountName Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_tax_ids" Text -> Maybe [InvoiceAccountTaxIds'Variants] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceAccountTaxIds'Variants]
invoiceAccountTaxIds Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_due" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountDue Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_paid" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountPaid Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_remaining" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountRemaining Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"application_fee_amount" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceApplicationFeeAmount Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"attempt_count" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAttemptCount Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"attempted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoiceAttempted Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"auto_advance" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Bool
invoiceAutoAdvance Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"automatic_tax" Text -> AutomaticTax -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> AutomaticTax
invoiceAutomaticTax Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"billing_reason" Text -> Maybe InvoiceBillingReason' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceBillingReason'
invoiceBillingReason Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"charge" Text -> Maybe InvoiceCharge'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCharge'Variants
invoiceCharge Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"collection_method" Text -> Maybe InvoiceCollectionMethod' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCollectionMethod'
invoiceCollectionMethod Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceCreated Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Text
invoiceCurrency Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"custom_fields" Text -> Maybe [InvoiceSettingCustomField] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceSettingCustomField]
invoiceCustomFields Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe InvoiceCustomer'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomer'Variants
invoiceCustomer Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_address" Text -> Maybe InvoiceCustomerAddress' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerAddress'
invoiceCustomerAddress Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerEmail Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerName Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerPhone Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_shipping" Text -> Maybe InvoiceCustomerShipping' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerShipping'
invoiceCustomerShipping Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_tax_exempt" Text -> Maybe InvoiceCustomerTaxExempt' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerTaxExempt'
invoiceCustomerTaxExempt Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer_tax_ids" Text -> Maybe [InvoicesResourceInvoiceTaxId] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoicesResourceInvoiceTaxId]
invoiceCustomerTaxIds Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_payment_method" Text -> Maybe InvoiceDefaultPaymentMethod'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDefaultPaymentMethod'Variants
invoiceDefaultPaymentMethod Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_source" Text -> Maybe InvoiceDefaultSource'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDefaultSource'Variants
invoiceDefaultSource Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_tax_rates" Text -> [TaxRate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> [TaxRate]
invoiceDefaultTaxRates Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"description" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceDescription Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"discount" Text -> Maybe InvoiceDiscount' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDiscount'
invoiceDiscount Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"discounts" Text -> Maybe [InvoiceDiscounts'Variants] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceDiscounts'Variants]
invoiceDiscounts Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"due_date" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceDueDate Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ending_balance" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceEndingBalance Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"footer" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceFooter Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"hosted_invoice_url" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceHostedInvoiceUrl Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceId Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"invoice_pdf" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceInvoicePdf Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last_finalization_error" Text -> Maybe InvoiceLastFinalizationError' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceLastFinalizationError'
invoiceLastFinalizationError Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lines" Text -> InvoiceLines' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoiceLines'
invoiceLines Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoiceLivemode Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Object
invoiceMetadata Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"next_payment_attempt" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceNextPaymentAttempt Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceNumber Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"on_behalf_of" Text -> Maybe InvoiceOnBehalfOf'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceOnBehalfOf'Variants
invoiceOnBehalfOf Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"paid" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoicePaid Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment_intent" Text -> Maybe InvoicePaymentIntent'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoicePaymentIntent'Variants
invoicePaymentIntent Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment_settings" Text -> InvoicesPaymentSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoicesPaymentSettings
invoicePaymentSettings Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"period_end" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePeriodEnd Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"period_start" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePeriodStart Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"post_payment_credit_notes_amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePostPaymentCreditNotesAmount Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"pre_payment_credit_notes_amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePrePaymentCreditNotesAmount Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"receipt_number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceReceiptNumber Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"starting_balance" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceStartingBalance Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"statement_descriptor" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceStatementDescriptor Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Maybe InvoiceStatus' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceStatus'
invoiceStatus Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status_transitions" Text -> InvoicesStatusTransitions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoicesStatusTransitions
invoiceStatusTransitions Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"subscription" Text -> Maybe InvoiceSubscription'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceSubscription'Variants
invoiceSubscription Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"subscription_proration_date" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceSubscriptionProrationDate Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"subtotal" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceSubtotal Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tax" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceTax Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"threshold_reason" Text -> Maybe InvoiceThresholdReason -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceThresholdReason
invoiceThresholdReason Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"total" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceTotal Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"total_discount_amounts" Text -> Maybe [DiscountsResourceDiscountAmount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [DiscountsResourceDiscountAmount]
invoiceTotalDiscountAmounts Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"total_tax_amounts" Text -> [InvoiceTaxAmount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> [InvoiceTaxAmount]
invoiceTotalTaxAmounts Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"transfer_data" Text -> Maybe InvoiceTransferData' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceTransferData'
invoiceTransferData Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"webhooks_delivered_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceWebhooksDeliveredAt Invoice
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"invoice" 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 ((Text
"account_country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceAccountCountry Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceAccountName Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_tax_ids" Text -> Maybe [InvoiceAccountTaxIds'Variants] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceAccountTaxIds'Variants]
invoiceAccountTaxIds Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_due" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountDue Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_paid" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountPaid Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_remaining" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAmountRemaining Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"application_fee_amount" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceApplicationFeeAmount Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"attempt_count" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceAttemptCount Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"attempted" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoiceAttempted Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"auto_advance" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Bool
invoiceAutoAdvance Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"automatic_tax" Text -> AutomaticTax -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> AutomaticTax
invoiceAutomaticTax Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"billing_reason" Text -> Maybe InvoiceBillingReason' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceBillingReason'
invoiceBillingReason Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"charge" Text -> Maybe InvoiceCharge'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCharge'Variants
invoiceCharge Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"collection_method" Text -> Maybe InvoiceCollectionMethod' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCollectionMethod'
invoiceCollectionMethod Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceCreated Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Text
invoiceCurrency Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"custom_fields" Text -> Maybe [InvoiceSettingCustomField] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceSettingCustomField]
invoiceCustomFields Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe InvoiceCustomer'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomer'Variants
invoiceCustomer Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_address" Text -> Maybe InvoiceCustomerAddress' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerAddress'
invoiceCustomerAddress Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerEmail Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerName Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceCustomerPhone Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_shipping" Text -> Maybe InvoiceCustomerShipping' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerShipping'
invoiceCustomerShipping Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_tax_exempt" Text -> Maybe InvoiceCustomerTaxExempt' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceCustomerTaxExempt'
invoiceCustomerTaxExempt Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer_tax_ids" Text -> Maybe [InvoicesResourceInvoiceTaxId] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoicesResourceInvoiceTaxId]
invoiceCustomerTaxIds Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_payment_method" Text -> Maybe InvoiceDefaultPaymentMethod'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDefaultPaymentMethod'Variants
invoiceDefaultPaymentMethod Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_source" Text -> Maybe InvoiceDefaultSource'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDefaultSource'Variants
invoiceDefaultSource Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_tax_rates" Text -> [TaxRate] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> [TaxRate]
invoiceDefaultTaxRates Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"description" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceDescription Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"discount" Text -> Maybe InvoiceDiscount' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceDiscount'
invoiceDiscount Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"discounts" Text -> Maybe [InvoiceDiscounts'Variants] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [InvoiceDiscounts'Variants]
invoiceDiscounts Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"due_date" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceDueDate Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ending_balance" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceEndingBalance Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"footer" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceFooter Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"hosted_invoice_url" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceHostedInvoiceUrl Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceId Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"invoice_pdf" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceInvoicePdf Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last_finalization_error" Text -> Maybe InvoiceLastFinalizationError' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceLastFinalizationError'
invoiceLastFinalizationError Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"lines" Text -> InvoiceLines' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoiceLines'
invoiceLines Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoiceLivemode Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Object
invoiceMetadata Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"next_payment_attempt" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceNextPaymentAttempt Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceNumber Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"on_behalf_of" Text -> Maybe InvoiceOnBehalfOf'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceOnBehalfOf'Variants
invoiceOnBehalfOf Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"paid" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Bool
invoicePaid Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment_intent" Text -> Maybe InvoicePaymentIntent'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoicePaymentIntent'Variants
invoicePaymentIntent Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment_settings" Text -> InvoicesPaymentSettings -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoicesPaymentSettings
invoicePaymentSettings Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"period_end" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePeriodEnd Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"period_start" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePeriodStart Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"post_payment_credit_notes_amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePostPaymentCreditNotesAmount Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"pre_payment_credit_notes_amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoicePrePaymentCreditNotesAmount Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"receipt_number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceReceiptNumber Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"starting_balance" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceStartingBalance Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"statement_descriptor" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Text
invoiceStatementDescriptor Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Maybe InvoiceStatus' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceStatus'
invoiceStatus Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status_transitions" Text -> InvoicesStatusTransitions -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> InvoicesStatusTransitions
invoiceStatusTransitions Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"subscription" Text -> Maybe InvoiceSubscription'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceSubscription'Variants
invoiceSubscription Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"subscription_proration_date" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceSubscriptionProrationDate Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"subtotal" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceSubtotal Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tax" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceTax Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"threshold_reason" Text -> Maybe InvoiceThresholdReason -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceThresholdReason
invoiceThresholdReason Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"total" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Int
invoiceTotal Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"total_discount_amounts" Text -> Maybe [DiscountsResourceDiscountAmount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe [DiscountsResourceDiscountAmount]
invoiceTotalDiscountAmounts Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"total_tax_amounts" Text -> [InvoiceTaxAmount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> [InvoiceTaxAmount]
invoiceTotalTaxAmounts Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"transfer_data" Text -> Maybe InvoiceTransferData' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe InvoiceTransferData'
invoiceTransferData Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"webhooks_delivered_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Invoice -> Maybe Int
invoiceWebhooksDeliveredAt Invoice
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"invoice")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

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 Text
 -> Maybe Text
 -> Maybe [InvoiceAccountTaxIds'Variants]
 -> Int
 -> Int
 -> Int
 -> Maybe Int
 -> Int
 -> Bool
 -> Maybe Bool
 -> AutomaticTax
 -> Maybe InvoiceBillingReason'
 -> Maybe InvoiceCharge'Variants
 -> Maybe InvoiceCollectionMethod'
 -> Int
 -> Text
 -> Maybe [InvoiceSettingCustomField]
 -> Maybe InvoiceCustomer'Variants
 -> Maybe InvoiceCustomerAddress'
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InvoiceCustomerShipping'
 -> Maybe InvoiceCustomerTaxExempt'
 -> Maybe [InvoicesResourceInvoiceTaxId]
 -> Maybe InvoiceDefaultPaymentMethod'Variants
 -> Maybe InvoiceDefaultSource'Variants
 -> [TaxRate]
 -> Maybe Text
 -> Maybe InvoiceDiscount'
 -> Maybe [InvoiceDiscounts'Variants]
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InvoiceLastFinalizationError'
 -> InvoiceLines'
 -> Bool
 -> Maybe Object
 -> Maybe Int
 -> Maybe Text
 -> Maybe InvoiceOnBehalfOf'Variants
 -> Bool
 -> Maybe InvoicePaymentIntent'Variants
 -> InvoicesPaymentSettings
 -> Int
 -> Int
 -> Int
 -> Int
 -> Maybe Text
 -> Int
 -> Maybe Text
 -> Maybe InvoiceStatus'
 -> InvoicesStatusTransitions
 -> Maybe InvoiceSubscription'Variants
 -> Maybe Int
 -> Int
 -> Maybe Int
 -> Maybe InvoiceThresholdReason
 -> Int
 -> Maybe [DiscountsResourceDiscountAmount]
 -> [InvoiceTaxAmount]
 -> Maybe InvoiceTransferData'
 -> Maybe Int
 -> Invoice)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [InvoiceAccountTaxIds'Variants]
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe [InvoiceAccountTaxIds'Variants]
-> Int
-> Int
-> Int
-> Maybe Int
-> Int
-> Bool
-> Maybe Bool
-> AutomaticTax
-> Maybe InvoiceBillingReason'
-> Maybe InvoiceCharge'Variants
-> Maybe InvoiceCollectionMethod'
-> Int
-> Text
-> Maybe [InvoiceSettingCustomField]
-> Maybe InvoiceCustomer'Variants
-> Maybe InvoiceCustomerAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceCustomerShipping'
-> Maybe InvoiceCustomerTaxExempt'
-> Maybe [InvoicesResourceInvoiceTaxId]
-> Maybe InvoiceDefaultPaymentMethod'Variants
-> Maybe InvoiceDefaultSource'Variants
-> [TaxRate]
-> Maybe Text
-> Maybe InvoiceDiscount'
-> Maybe [InvoiceDiscounts'Variants]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'
-> InvoiceLines'
-> Bool
-> Maybe Object
-> Maybe Int
-> Maybe Text
-> Maybe InvoiceOnBehalfOf'Variants
-> Bool
-> Maybe InvoicePaymentIntent'Variants
-> InvoicesPaymentSettings
-> Int
-> Int
-> Int
-> Int
-> Maybe Text
-> Int
-> Maybe Text
-> Maybe InvoiceStatus'
-> InvoicesStatusTransitions
-> Maybe InvoiceSubscription'Variants
-> Maybe Int
-> Int
-> Maybe Int
-> Maybe InvoiceThresholdReason
-> Int
-> Maybe [DiscountsResourceDiscountAmount]
-> [InvoiceTaxAmount]
-> Maybe InvoiceTransferData'
-> Maybe Int
-> Invoice
Invoice Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [InvoiceAccountTaxIds'Variants]
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [InvoiceAccountTaxIds'Variants]
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_country")) Parser
  (Maybe Text
   -> Maybe [InvoiceAccountTaxIds'Variants]
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe [InvoiceAccountTaxIds'Variants]
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_name")) Parser
  (Maybe [InvoiceAccountTaxIds'Variants]
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe [InvoiceAccountTaxIds'Variants])
-> Parser
     (Int
      -> Int
      -> Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [InvoiceAccountTaxIds'Variants])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_tax_ids")) Parser
  (Int
   -> Int
   -> Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_due")) Parser
  (Int
   -> Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_paid")) Parser
  (Int
   -> Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Maybe Int
      -> Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_remaining")) Parser
  (Maybe Int
   -> Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"application_fee_amount")) Parser
  (Int
   -> Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Bool
      -> Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"attempt_count")) Parser
  (Bool
   -> Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Bool
-> Parser
     (Maybe Bool
      -> AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"attempted")) Parser
  (Maybe Bool
   -> AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Bool)
-> Parser
     (AutomaticTax
      -> Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"auto_advance")) Parser
  (AutomaticTax
   -> Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser AutomaticTax
-> Parser
     (Maybe InvoiceBillingReason'
      -> Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser AutomaticTax
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"automatic_tax")) Parser
  (Maybe InvoiceBillingReason'
   -> Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceBillingReason')
-> Parser
     (Maybe InvoiceCharge'Variants
      -> Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceBillingReason')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"billing_reason")) Parser
  (Maybe InvoiceCharge'Variants
   -> Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCharge'Variants)
-> Parser
     (Maybe InvoiceCollectionMethod'
      -> Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCharge'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"charge")) Parser
  (Maybe InvoiceCollectionMethod'
   -> Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCollectionMethod')
-> Parser
     (Int
      -> Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCollectionMethod')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"collection_method")) Parser
  (Int
   -> Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Text
      -> Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"created")) Parser
  (Text
   -> Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Text
-> Parser
     (Maybe [InvoiceSettingCustomField]
      -> Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"currency")) Parser
  (Maybe [InvoiceSettingCustomField]
   -> Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe [InvoiceSettingCustomField])
-> Parser
     (Maybe InvoiceCustomer'Variants
      -> Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [InvoiceSettingCustomField])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"custom_fields")) Parser
  (Maybe InvoiceCustomer'Variants
   -> Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCustomer'Variants)
-> Parser
     (Maybe InvoiceCustomerAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCustomer'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
  (Maybe InvoiceCustomerAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCustomerAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCustomerAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_email")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_name")) Parser
  (Maybe Text
   -> Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceCustomerShipping'
      -> Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_phone")) Parser
  (Maybe InvoiceCustomerShipping'
   -> Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCustomerShipping')
-> Parser
     (Maybe InvoiceCustomerTaxExempt'
      -> Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCustomerShipping')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_shipping")) Parser
  (Maybe InvoiceCustomerTaxExempt'
   -> Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceCustomerTaxExempt')
-> Parser
     (Maybe [InvoicesResourceInvoiceTaxId]
      -> Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceCustomerTaxExempt')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_tax_exempt")) Parser
  (Maybe [InvoicesResourceInvoiceTaxId]
   -> Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe [InvoicesResourceInvoiceTaxId])
-> Parser
     (Maybe InvoiceDefaultPaymentMethod'Variants
      -> Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [InvoicesResourceInvoiceTaxId])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer_tax_ids")) Parser
  (Maybe InvoiceDefaultPaymentMethod'Variants
   -> Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceDefaultPaymentMethod'Variants)
-> Parser
     (Maybe InvoiceDefaultSource'Variants
      -> [TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe InvoiceDefaultPaymentMethod'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"default_payment_method")) Parser
  (Maybe InvoiceDefaultSource'Variants
   -> [TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceDefaultSource'Variants)
-> Parser
     ([TaxRate]
      -> Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceDefaultSource'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"default_source")) Parser
  ([TaxRate]
   -> Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser [TaxRate]
-> Parser
     (Maybe Text
      -> Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [TaxRate]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"default_tax_rates")) Parser
  (Maybe Text
   -> Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceDiscount'
      -> Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"description")) Parser
  (Maybe InvoiceDiscount'
   -> Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceDiscount')
-> Parser
     (Maybe [InvoiceDiscounts'Variants]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceDiscount')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"discount")) Parser
  (Maybe [InvoiceDiscounts'Variants]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe [InvoiceDiscounts'Variants])
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [InvoiceDiscounts'Variants])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"discounts")) Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"due_date")) Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ending_balance")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"footer")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"hosted_invoice_url")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
  (Maybe Text
   -> Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceLastFinalizationError'
      -> InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"invoice_pdf")) Parser
  (Maybe InvoiceLastFinalizationError'
   -> InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceLastFinalizationError')
-> Parser
     (InvoiceLines'
      -> Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceLastFinalizationError')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"last_finalization_error")) Parser
  (InvoiceLines'
   -> Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser InvoiceLines'
-> Parser
     (Bool
      -> Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser InvoiceLines'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"lines")) Parser
  (Bool
   -> Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Bool
-> Parser
     (Maybe Object
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"livemode")) Parser
  (Maybe Object
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Object)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"next_payment_attempt")) Parser
  (Maybe Text
   -> Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceOnBehalfOf'Variants
      -> Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"number")) Parser
  (Maybe InvoiceOnBehalfOf'Variants
   -> Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceOnBehalfOf'Variants)
-> Parser
     (Bool
      -> Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceOnBehalfOf'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"on_behalf_of")) Parser
  (Bool
   -> Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Bool
-> Parser
     (Maybe InvoicePaymentIntent'Variants
      -> InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"paid")) Parser
  (Maybe InvoicePaymentIntent'Variants
   -> InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoicePaymentIntent'Variants)
-> Parser
     (InvoicesPaymentSettings
      -> Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoicePaymentIntent'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"payment_intent")) Parser
  (InvoicesPaymentSettings
   -> Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser InvoicesPaymentSettings
-> Parser
     (Int
      -> Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser InvoicesPaymentSettings
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"payment_settings")) Parser
  (Int
   -> Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"period_end")) Parser
  (Int
   -> Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"period_start")) Parser
  (Int
   -> Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Int
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"post_payment_credit_notes_amount")) Parser
  (Int
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"pre_payment_credit_notes_amount")) Parser
  (Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"receipt_number")) Parser
  (Int
   -> Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Maybe Text
      -> Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"starting_balance")) Parser
  (Maybe Text
   -> Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceStatus'
      -> InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"statement_descriptor")) Parser
  (Maybe InvoiceStatus'
   -> InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceStatus')
-> Parser
     (InvoicesStatusTransitions
      -> Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceStatus')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"status")) Parser
  (InvoicesStatusTransitions
   -> Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser InvoicesStatusTransitions
-> Parser
     (Maybe InvoiceSubscription'Variants
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser InvoicesStatusTransitions
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"status_transitions")) Parser
  (Maybe InvoiceSubscription'Variants
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceSubscription'Variants)
-> Parser
     (Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceSubscription'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"subscription")) Parser
  (Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"subscription_proration_date")) Parser
  (Int
   -> Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"subtotal")) Parser
  (Maybe Int
   -> Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe Int)
-> Parser
     (Maybe InvoiceThresholdReason
      -> Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tax")) Parser
  (Maybe InvoiceThresholdReason
   -> Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe InvoiceThresholdReason)
-> Parser
     (Int
      -> Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceThresholdReason)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"threshold_reason")) Parser
  (Int
   -> Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser Int
-> Parser
     (Maybe [DiscountsResourceDiscountAmount]
      -> [InvoiceTaxAmount]
      -> Maybe InvoiceTransferData'
      -> Maybe Int
      -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"total")) Parser
  (Maybe [DiscountsResourceDiscountAmount]
   -> [InvoiceTaxAmount]
   -> Maybe InvoiceTransferData'
   -> Maybe Int
   -> Invoice)
-> Parser (Maybe [DiscountsResourceDiscountAmount])
-> Parser
     ([InvoiceTaxAmount]
      -> Maybe InvoiceTransferData' -> Maybe Int -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [DiscountsResourceDiscountAmount])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"total_discount_amounts")) Parser
  ([InvoiceTaxAmount]
   -> Maybe InvoiceTransferData' -> Maybe Int -> Invoice)
-> Parser [InvoiceTaxAmount]
-> Parser (Maybe InvoiceTransferData' -> Maybe Int -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [InvoiceTaxAmount]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"total_tax_amounts")) Parser (Maybe InvoiceTransferData' -> Maybe Int -> Invoice)
-> Parser (Maybe InvoiceTransferData')
-> Parser (Maybe Int -> Invoice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceTransferData')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"transfer_data")) Parser (Maybe Int -> Invoice)
-> Parser (Maybe Int) -> Parser Invoice
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"webhooks_delivered_at"))

-- | Create a new 'Invoice' with all required fields.
mkInvoice ::
  -- | 'invoiceAmountDue'
  GHC.Types.Int ->
  -- | 'invoiceAmountPaid'
  GHC.Types.Int ->
  -- | 'invoiceAmountRemaining'
  GHC.Types.Int ->
  -- | 'invoiceAttemptCount'
  GHC.Types.Int ->
  -- | 'invoiceAttempted'
  GHC.Types.Bool ->
  -- | 'invoiceAutomaticTax'
  AutomaticTax ->
  -- | 'invoiceCreated'
  GHC.Types.Int ->
  -- | 'invoiceCurrency'
  Data.Text.Internal.Text ->
  -- | 'invoiceDefaultTaxRates'
  [TaxRate] ->
  -- | 'invoiceLines'
  InvoiceLines' ->
  -- | 'invoiceLivemode'
  GHC.Types.Bool ->
  -- | 'invoicePaid'
  GHC.Types.Bool ->
  -- | 'invoicePaymentSettings'
  InvoicesPaymentSettings ->
  -- | 'invoicePeriodEnd'
  GHC.Types.Int ->
  -- | 'invoicePeriodStart'
  GHC.Types.Int ->
  -- | 'invoicePostPaymentCreditNotesAmount'
  GHC.Types.Int ->
  -- | 'invoicePrePaymentCreditNotesAmount'
  GHC.Types.Int ->
  -- | 'invoiceStartingBalance'
  GHC.Types.Int ->
  -- | 'invoiceStatusTransitions'
  InvoicesStatusTransitions ->
  -- | 'invoiceSubtotal'
  GHC.Types.Int ->
  -- | 'invoiceTotal'
  GHC.Types.Int ->
  -- | 'invoiceTotalTaxAmounts'
  [InvoiceTaxAmount] ->
  Invoice
mkInvoice :: Int
-> Int
-> Int
-> Int
-> Bool
-> AutomaticTax
-> Int
-> Text
-> [TaxRate]
-> InvoiceLines'
-> Bool
-> Bool
-> InvoicesPaymentSettings
-> Int
-> Int
-> Int
-> Int
-> Int
-> InvoicesStatusTransitions
-> Int
-> Int
-> [InvoiceTaxAmount]
-> Invoice
mkInvoice Int
invoiceAmountDue Int
invoiceAmountPaid Int
invoiceAmountRemaining Int
invoiceAttemptCount Bool
invoiceAttempted AutomaticTax
invoiceAutomaticTax Int
invoiceCreated Text
invoiceCurrency [TaxRate]
invoiceDefaultTaxRates InvoiceLines'
invoiceLines Bool
invoiceLivemode Bool
invoicePaid InvoicesPaymentSettings
invoicePaymentSettings Int
invoicePeriodEnd Int
invoicePeriodStart Int
invoicePostPaymentCreditNotesAmount Int
invoicePrePaymentCreditNotesAmount Int
invoiceStartingBalance InvoicesStatusTransitions
invoiceStatusTransitions Int
invoiceSubtotal Int
invoiceTotal [InvoiceTaxAmount]
invoiceTotalTaxAmounts =
  Invoice :: Maybe Text
-> Maybe Text
-> Maybe [InvoiceAccountTaxIds'Variants]
-> Int
-> Int
-> Int
-> Maybe Int
-> Int
-> Bool
-> Maybe Bool
-> AutomaticTax
-> Maybe InvoiceBillingReason'
-> Maybe InvoiceCharge'Variants
-> Maybe InvoiceCollectionMethod'
-> Int
-> Text
-> Maybe [InvoiceSettingCustomField]
-> Maybe InvoiceCustomer'Variants
-> Maybe InvoiceCustomerAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceCustomerShipping'
-> Maybe InvoiceCustomerTaxExempt'
-> Maybe [InvoicesResourceInvoiceTaxId]
-> Maybe InvoiceDefaultPaymentMethod'Variants
-> Maybe InvoiceDefaultSource'Variants
-> [TaxRate]
-> Maybe Text
-> Maybe InvoiceDiscount'
-> Maybe [InvoiceDiscounts'Variants]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'
-> InvoiceLines'
-> Bool
-> Maybe Object
-> Maybe Int
-> Maybe Text
-> Maybe InvoiceOnBehalfOf'Variants
-> Bool
-> Maybe InvoicePaymentIntent'Variants
-> InvoicesPaymentSettings
-> Int
-> Int
-> Int
-> Int
-> Maybe Text
-> Int
-> Maybe Text
-> Maybe InvoiceStatus'
-> InvoicesStatusTransitions
-> Maybe InvoiceSubscription'Variants
-> Maybe Int
-> Int
-> Maybe Int
-> Maybe InvoiceThresholdReason
-> Int
-> Maybe [DiscountsResourceDiscountAmount]
-> [InvoiceTaxAmount]
-> Maybe InvoiceTransferData'
-> Maybe Int
-> Invoice
Invoice
    { invoiceAccountCountry :: Maybe Text
invoiceAccountCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceAccountName :: Maybe Text
invoiceAccountName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceAccountTaxIds :: Maybe [InvoiceAccountTaxIds'Variants]
invoiceAccountTaxIds = Maybe [InvoiceAccountTaxIds'Variants]
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceAmountDue :: Int
invoiceAmountDue = Int
invoiceAmountDue,
      invoiceAmountPaid :: Int
invoiceAmountPaid = Int
invoiceAmountPaid,
      invoiceAmountRemaining :: Int
invoiceAmountRemaining = Int
invoiceAmountRemaining,
      invoiceApplicationFeeAmount :: Maybe Int
invoiceApplicationFeeAmount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceAttemptCount :: Int
invoiceAttemptCount = Int
invoiceAttemptCount,
      invoiceAttempted :: Bool
invoiceAttempted = Bool
invoiceAttempted,
      invoiceAutoAdvance :: Maybe Bool
invoiceAutoAdvance = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceAutomaticTax :: AutomaticTax
invoiceAutomaticTax = AutomaticTax
invoiceAutomaticTax,
      invoiceBillingReason :: Maybe InvoiceBillingReason'
invoiceBillingReason = Maybe InvoiceBillingReason'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCharge :: Maybe InvoiceCharge'Variants
invoiceCharge = Maybe InvoiceCharge'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCollectionMethod :: Maybe InvoiceCollectionMethod'
invoiceCollectionMethod = Maybe InvoiceCollectionMethod'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCreated :: Int
invoiceCreated = Int
invoiceCreated,
      invoiceCurrency :: Text
invoiceCurrency = Text
invoiceCurrency,
      invoiceCustomFields :: Maybe [InvoiceSettingCustomField]
invoiceCustomFields = Maybe [InvoiceSettingCustomField]
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomer :: Maybe InvoiceCustomer'Variants
invoiceCustomer = Maybe InvoiceCustomer'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress :: Maybe InvoiceCustomerAddress'
invoiceCustomerAddress = Maybe InvoiceCustomerAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerEmail :: Maybe Text
invoiceCustomerEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerName :: Maybe Text
invoiceCustomerName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerPhone :: Maybe Text
invoiceCustomerPhone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerShipping :: Maybe InvoiceCustomerShipping'
invoiceCustomerShipping = Maybe InvoiceCustomerShipping'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerTaxExempt :: Maybe InvoiceCustomerTaxExempt'
invoiceCustomerTaxExempt = Maybe InvoiceCustomerTaxExempt'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerTaxIds :: Maybe [InvoicesResourceInvoiceTaxId]
invoiceCustomerTaxIds = Maybe [InvoicesResourceInvoiceTaxId]
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDefaultPaymentMethod :: Maybe InvoiceDefaultPaymentMethod'Variants
invoiceDefaultPaymentMethod = Maybe InvoiceDefaultPaymentMethod'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDefaultSource :: Maybe InvoiceDefaultSource'Variants
invoiceDefaultSource = Maybe InvoiceDefaultSource'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDefaultTaxRates :: [TaxRate]
invoiceDefaultTaxRates = [TaxRate]
invoiceDefaultTaxRates,
      invoiceDescription :: Maybe Text
invoiceDescription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount :: Maybe InvoiceDiscount'
invoiceDiscount = Maybe InvoiceDiscount'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscounts :: Maybe [InvoiceDiscounts'Variants]
invoiceDiscounts = Maybe [InvoiceDiscounts'Variants]
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDueDate :: Maybe Int
invoiceDueDate = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceEndingBalance :: Maybe Int
invoiceEndingBalance = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceFooter :: Maybe Text
invoiceFooter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceHostedInvoiceUrl :: Maybe Text
invoiceHostedInvoiceUrl = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceId :: Maybe Text
invoiceId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceInvoicePdf :: Maybe Text
invoiceInvoicePdf = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError :: Maybe InvoiceLastFinalizationError'
invoiceLastFinalizationError = Maybe InvoiceLastFinalizationError'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLines :: InvoiceLines'
invoiceLines = InvoiceLines'
invoiceLines,
      invoiceLivemode :: Bool
invoiceLivemode = Bool
invoiceLivemode,
      invoiceMetadata :: Maybe Object
invoiceMetadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceNextPaymentAttempt :: Maybe Int
invoiceNextPaymentAttempt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceNumber :: Maybe Text
invoiceNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceOnBehalfOf :: Maybe InvoiceOnBehalfOf'Variants
invoiceOnBehalfOf = Maybe InvoiceOnBehalfOf'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoicePaid :: Bool
invoicePaid = Bool
invoicePaid,
      invoicePaymentIntent :: Maybe InvoicePaymentIntent'Variants
invoicePaymentIntent = Maybe InvoicePaymentIntent'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoicePaymentSettings :: InvoicesPaymentSettings
invoicePaymentSettings = InvoicesPaymentSettings
invoicePaymentSettings,
      invoicePeriodEnd :: Int
invoicePeriodEnd = Int
invoicePeriodEnd,
      invoicePeriodStart :: Int
invoicePeriodStart = Int
invoicePeriodStart,
      invoicePostPaymentCreditNotesAmount :: Int
invoicePostPaymentCreditNotesAmount = Int
invoicePostPaymentCreditNotesAmount,
      invoicePrePaymentCreditNotesAmount :: Int
invoicePrePaymentCreditNotesAmount = Int
invoicePrePaymentCreditNotesAmount,
      invoiceReceiptNumber :: Maybe Text
invoiceReceiptNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceStartingBalance :: Int
invoiceStartingBalance = Int
invoiceStartingBalance,
      invoiceStatementDescriptor :: Maybe Text
invoiceStatementDescriptor = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceStatus :: Maybe InvoiceStatus'
invoiceStatus = Maybe InvoiceStatus'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceStatusTransitions :: InvoicesStatusTransitions
invoiceStatusTransitions = InvoicesStatusTransitions
invoiceStatusTransitions,
      invoiceSubscription :: Maybe InvoiceSubscription'Variants
invoiceSubscription = Maybe InvoiceSubscription'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceSubscriptionProrationDate :: Maybe Int
invoiceSubscriptionProrationDate = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceSubtotal :: Int
invoiceSubtotal = Int
invoiceSubtotal,
      invoiceTax :: Maybe Int
invoiceTax = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceThresholdReason :: Maybe InvoiceThresholdReason
invoiceThresholdReason = Maybe InvoiceThresholdReason
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceTotal :: Int
invoiceTotal = Int
invoiceTotal,
      invoiceTotalDiscountAmounts :: Maybe [DiscountsResourceDiscountAmount]
invoiceTotalDiscountAmounts = Maybe [DiscountsResourceDiscountAmount]
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceTotalTaxAmounts :: [InvoiceTaxAmount]
invoiceTotalTaxAmounts = [InvoiceTaxAmount]
invoiceTotalTaxAmounts,
      invoiceTransferData :: Maybe InvoiceTransferData'
invoiceTransferData = Maybe InvoiceTransferData'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceWebhooksDeliveredAt :: Maybe Int
invoiceWebhooksDeliveredAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.account_tax_ids.items.anyOf@ in the specification.
data InvoiceAccountTaxIds'Variants
  = InvoiceAccountTaxIds'Text Data.Text.Internal.Text
  | InvoiceAccountTaxIds'TaxId TaxId
  | InvoiceAccountTaxIds'DeletedTaxId DeletedTaxId
  deriving (Int -> InvoiceAccountTaxIds'Variants -> ShowS
[InvoiceAccountTaxIds'Variants] -> ShowS
InvoiceAccountTaxIds'Variants -> String
(Int -> InvoiceAccountTaxIds'Variants -> ShowS)
-> (InvoiceAccountTaxIds'Variants -> String)
-> ([InvoiceAccountTaxIds'Variants] -> ShowS)
-> Show InvoiceAccountTaxIds'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceAccountTaxIds'Variants] -> ShowS
$cshowList :: [InvoiceAccountTaxIds'Variants] -> ShowS
show :: InvoiceAccountTaxIds'Variants -> String
$cshow :: InvoiceAccountTaxIds'Variants -> String
showsPrec :: Int -> InvoiceAccountTaxIds'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceAccountTaxIds'Variants -> ShowS
GHC.Show.Show, InvoiceAccountTaxIds'Variants
-> InvoiceAccountTaxIds'Variants -> Bool
(InvoiceAccountTaxIds'Variants
 -> InvoiceAccountTaxIds'Variants -> Bool)
-> (InvoiceAccountTaxIds'Variants
    -> InvoiceAccountTaxIds'Variants -> Bool)
-> Eq InvoiceAccountTaxIds'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceAccountTaxIds'Variants
-> InvoiceAccountTaxIds'Variants -> Bool
$c/= :: InvoiceAccountTaxIds'Variants
-> InvoiceAccountTaxIds'Variants -> Bool
== :: InvoiceAccountTaxIds'Variants
-> InvoiceAccountTaxIds'Variants -> Bool
$c== :: InvoiceAccountTaxIds'Variants
-> InvoiceAccountTaxIds'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceAccountTaxIds'Variants where
  toJSON :: InvoiceAccountTaxIds'Variants -> Value
toJSON (InvoiceAccountTaxIds'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceAccountTaxIds'TaxId TaxId
a) = TaxId -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON TaxId
a
  toJSON (InvoiceAccountTaxIds'DeletedTaxId DeletedTaxId
a) = DeletedTaxId -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedTaxId
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceAccountTaxIds'Variants where
  parseJSON :: Value -> Parser InvoiceAccountTaxIds'Variants
parseJSON Value
val = case (Text -> InvoiceAccountTaxIds'Variants
InvoiceAccountTaxIds'Text (Text -> InvoiceAccountTaxIds'Variants)
-> Result Text -> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((TaxId -> InvoiceAccountTaxIds'Variants
InvoiceAccountTaxIds'TaxId (TaxId -> InvoiceAccountTaxIds'Variants)
-> Result TaxId -> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result TaxId
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedTaxId -> InvoiceAccountTaxIds'Variants
InvoiceAccountTaxIds'DeletedTaxId (DeletedTaxId -> InvoiceAccountTaxIds'Variants)
-> Result DeletedTaxId -> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedTaxId
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
-> Result InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceAccountTaxIds'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
    Data.Aeson.Types.Internal.Success InvoiceAccountTaxIds'Variants
a -> InvoiceAccountTaxIds'Variants
-> Parser InvoiceAccountTaxIds'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceAccountTaxIds'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceAccountTaxIds'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the enum schema located at @components.schemas.invoice.properties.billing_reason@ in the specification.
--
-- Indicates the reason why the invoice was created. \`subscription_cycle\` indicates an invoice created by a subscription advancing into a new period. \`subscription_create\` indicates an invoice created due to creating a subscription. \`subscription_update\` indicates an invoice created due to updating a subscription. \`subscription\` is set for all old invoices to indicate either a change to a subscription or a period advancement. \`manual\` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The \`upcoming\` value is reserved for simulated invoices per the upcoming invoice endpoint. \`subscription_threshold\` indicates an invoice created due to a billing threshold being reached.
data InvoiceBillingReason'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceBillingReason'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceBillingReason'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"automatic_pending_invoice_item_invoice"@
    InvoiceBillingReason'EnumAutomaticPendingInvoiceItemInvoice
  | -- | Represents the JSON value @"manual"@
    InvoiceBillingReason'EnumManual
  | -- | Represents the JSON value @"subscription"@
    InvoiceBillingReason'EnumSubscription
  | -- | Represents the JSON value @"subscription_create"@
    InvoiceBillingReason'EnumSubscriptionCreate
  | -- | Represents the JSON value @"subscription_cycle"@
    InvoiceBillingReason'EnumSubscriptionCycle
  | -- | Represents the JSON value @"subscription_threshold"@
    InvoiceBillingReason'EnumSubscriptionThreshold
  | -- | Represents the JSON value @"subscription_update"@
    InvoiceBillingReason'EnumSubscriptionUpdate
  | -- | Represents the JSON value @"upcoming"@
    InvoiceBillingReason'EnumUpcoming
  deriving (Int -> InvoiceBillingReason' -> ShowS
[InvoiceBillingReason'] -> ShowS
InvoiceBillingReason' -> String
(Int -> InvoiceBillingReason' -> ShowS)
-> (InvoiceBillingReason' -> String)
-> ([InvoiceBillingReason'] -> ShowS)
-> Show InvoiceBillingReason'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceBillingReason'] -> ShowS
$cshowList :: [InvoiceBillingReason'] -> ShowS
show :: InvoiceBillingReason' -> String
$cshow :: InvoiceBillingReason' -> String
showsPrec :: Int -> InvoiceBillingReason' -> ShowS
$cshowsPrec :: Int -> InvoiceBillingReason' -> ShowS
GHC.Show.Show, InvoiceBillingReason' -> InvoiceBillingReason' -> Bool
(InvoiceBillingReason' -> InvoiceBillingReason' -> Bool)
-> (InvoiceBillingReason' -> InvoiceBillingReason' -> Bool)
-> Eq InvoiceBillingReason'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceBillingReason' -> InvoiceBillingReason' -> Bool
$c/= :: InvoiceBillingReason' -> InvoiceBillingReason' -> Bool
== :: InvoiceBillingReason' -> InvoiceBillingReason' -> Bool
$c== :: InvoiceBillingReason' -> InvoiceBillingReason' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceBillingReason' where
  toJSON :: InvoiceBillingReason' -> Value
toJSON (InvoiceBillingReason'Other Value
val) = Value
val
  toJSON (InvoiceBillingReason'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumAutomaticPendingInvoiceItemInvoice) = Value
"automatic_pending_invoice_item_invoice"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumManual) = Value
"manual"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumSubscription) = Value
"subscription"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionCreate) = Value
"subscription_create"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionCycle) = Value
"subscription_cycle"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionThreshold) = Value
"subscription_threshold"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionUpdate) = Value
"subscription_update"
  toJSON (InvoiceBillingReason'
InvoiceBillingReason'EnumUpcoming) = Value
"upcoming"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceBillingReason' where
  parseJSON :: Value -> Parser InvoiceBillingReason'
parseJSON Value
val =
    InvoiceBillingReason' -> Parser InvoiceBillingReason'
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_pending_invoice_item_invoice" -> InvoiceBillingReason'
InvoiceBillingReason'EnumAutomaticPendingInvoiceItemInvoice
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"manual" -> InvoiceBillingReason'
InvoiceBillingReason'EnumManual
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription" -> InvoiceBillingReason'
InvoiceBillingReason'EnumSubscription
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription_create" -> InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionCreate
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription_cycle" -> InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionCycle
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription_threshold" -> InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionThreshold
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription_update" -> InvoiceBillingReason'
InvoiceBillingReason'EnumSubscriptionUpdate
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"upcoming" -> InvoiceBillingReason'
InvoiceBillingReason'EnumUpcoming
            | Bool
GHC.Base.otherwise -> Value -> InvoiceBillingReason'
InvoiceBillingReason'Other Value
val
      )

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.charge.anyOf@ in the specification.
--
-- ID of the latest charge generated for this invoice, if any.
data InvoiceCharge'Variants
  = InvoiceCharge'Text Data.Text.Internal.Text
  | InvoiceCharge'Charge Charge
  deriving (Int -> InvoiceCharge'Variants -> ShowS
[InvoiceCharge'Variants] -> ShowS
InvoiceCharge'Variants -> String
(Int -> InvoiceCharge'Variants -> ShowS)
-> (InvoiceCharge'Variants -> String)
-> ([InvoiceCharge'Variants] -> ShowS)
-> Show InvoiceCharge'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCharge'Variants] -> ShowS
$cshowList :: [InvoiceCharge'Variants] -> ShowS
show :: InvoiceCharge'Variants -> String
$cshow :: InvoiceCharge'Variants -> String
showsPrec :: Int -> InvoiceCharge'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceCharge'Variants -> ShowS
GHC.Show.Show, InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool
(InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool)
-> (InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool)
-> Eq InvoiceCharge'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool
$c/= :: InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool
== :: InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool
$c== :: InvoiceCharge'Variants -> InvoiceCharge'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCharge'Variants where
  toJSON :: InvoiceCharge'Variants -> Value
toJSON (InvoiceCharge'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceCharge'Charge Charge
a) = Charge -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Charge
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCharge'Variants where
  parseJSON :: Value -> Parser InvoiceCharge'Variants
parseJSON Value
val = case (Text -> InvoiceCharge'Variants
InvoiceCharge'Text (Text -> InvoiceCharge'Variants)
-> Result Text -> Result InvoiceCharge'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceCharge'Variants
-> Result InvoiceCharge'Variants -> Result InvoiceCharge'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Charge -> InvoiceCharge'Variants
InvoiceCharge'Charge (Charge -> InvoiceCharge'Variants)
-> Result Charge -> Result InvoiceCharge'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Charge
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceCharge'Variants
-> Result InvoiceCharge'Variants -> Result InvoiceCharge'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceCharge'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceCharge'Variants
a -> InvoiceCharge'Variants -> Parser InvoiceCharge'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceCharge'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceCharge'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the enum schema located at @components.schemas.invoice.properties.collection_method@ in the specification.
--
-- Either \`charge_automatically\`, or \`send_invoice\`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
data InvoiceCollectionMethod'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceCollectionMethod'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceCollectionMethod'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"charge_automatically"@
    InvoiceCollectionMethod'EnumChargeAutomatically
  | -- | Represents the JSON value @"send_invoice"@
    InvoiceCollectionMethod'EnumSendInvoice
  deriving (Int -> InvoiceCollectionMethod' -> ShowS
[InvoiceCollectionMethod'] -> ShowS
InvoiceCollectionMethod' -> String
(Int -> InvoiceCollectionMethod' -> ShowS)
-> (InvoiceCollectionMethod' -> String)
-> ([InvoiceCollectionMethod'] -> ShowS)
-> Show InvoiceCollectionMethod'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCollectionMethod'] -> ShowS
$cshowList :: [InvoiceCollectionMethod'] -> ShowS
show :: InvoiceCollectionMethod' -> String
$cshow :: InvoiceCollectionMethod' -> String
showsPrec :: Int -> InvoiceCollectionMethod' -> ShowS
$cshowsPrec :: Int -> InvoiceCollectionMethod' -> ShowS
GHC.Show.Show, InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool
(InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool)
-> (InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool)
-> Eq InvoiceCollectionMethod'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool
$c/= :: InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool
== :: InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool
$c== :: InvoiceCollectionMethod' -> InvoiceCollectionMethod' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCollectionMethod' where
  toJSON :: InvoiceCollectionMethod' -> Value
toJSON (InvoiceCollectionMethod'Other Value
val) = Value
val
  toJSON (InvoiceCollectionMethod'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceCollectionMethod'
InvoiceCollectionMethod'EnumChargeAutomatically) = Value
"charge_automatically"
  toJSON (InvoiceCollectionMethod'
InvoiceCollectionMethod'EnumSendInvoice) = Value
"send_invoice"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCollectionMethod' where
  parseJSON :: Value -> Parser InvoiceCollectionMethod'
parseJSON Value
val =
    InvoiceCollectionMethod' -> Parser InvoiceCollectionMethod'
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_automatically" -> InvoiceCollectionMethod'
InvoiceCollectionMethod'EnumChargeAutomatically
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"send_invoice" -> InvoiceCollectionMethod'
InvoiceCollectionMethod'EnumSendInvoice
            | Bool
GHC.Base.otherwise -> Value -> InvoiceCollectionMethod'
InvoiceCollectionMethod'Other Value
val
      )

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.customer.anyOf@ in the specification.
--
-- The ID of the customer who will be billed.
data InvoiceCustomer'Variants
  = InvoiceCustomer'Text Data.Text.Internal.Text
  | InvoiceCustomer'Customer Customer
  | InvoiceCustomer'DeletedCustomer DeletedCustomer
  deriving (Int -> InvoiceCustomer'Variants -> ShowS
[InvoiceCustomer'Variants] -> ShowS
InvoiceCustomer'Variants -> String
(Int -> InvoiceCustomer'Variants -> ShowS)
-> (InvoiceCustomer'Variants -> String)
-> ([InvoiceCustomer'Variants] -> ShowS)
-> Show InvoiceCustomer'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCustomer'Variants] -> ShowS
$cshowList :: [InvoiceCustomer'Variants] -> ShowS
show :: InvoiceCustomer'Variants -> String
$cshow :: InvoiceCustomer'Variants -> String
showsPrec :: Int -> InvoiceCustomer'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceCustomer'Variants -> ShowS
GHC.Show.Show, InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool
(InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool)
-> (InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool)
-> Eq InvoiceCustomer'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool
$c/= :: InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool
== :: InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool
$c== :: InvoiceCustomer'Variants -> InvoiceCustomer'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomer'Variants where
  toJSON :: InvoiceCustomer'Variants -> Value
toJSON (InvoiceCustomer'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceCustomer'Customer Customer
a) = Customer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Customer
a
  toJSON (InvoiceCustomer'DeletedCustomer DeletedCustomer
a) = DeletedCustomer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedCustomer
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomer'Variants where
  parseJSON :: Value -> Parser InvoiceCustomer'Variants
parseJSON Value
val = case (Text -> InvoiceCustomer'Variants
InvoiceCustomer'Text (Text -> InvoiceCustomer'Variants)
-> Result Text -> Result InvoiceCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Customer -> InvoiceCustomer'Variants
InvoiceCustomer'Customer (Customer -> InvoiceCustomer'Variants)
-> Result Customer -> Result InvoiceCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Customer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedCustomer -> InvoiceCustomer'Variants
InvoiceCustomer'DeletedCustomer (DeletedCustomer -> InvoiceCustomer'Variants)
-> Result DeletedCustomer -> Result InvoiceCustomer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedCustomer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
-> Result InvoiceCustomer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceCustomer'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
    Data.Aeson.Types.Internal.Success InvoiceCustomer'Variants
a -> InvoiceCustomer'Variants -> Parser InvoiceCustomer'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceCustomer'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceCustomer'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the object schema located at @components.schemas.invoice.properties.customer_address.anyOf@ in the specification.
--
-- The customer\\\'s address. Until the invoice is finalized, this field will equal \\\`customer.address\\\`. Once the invoice is finalized, this field will no longer be updated.
data InvoiceCustomerAddress' = InvoiceCustomerAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> InvoiceCustomerAddress' -> ShowS
[InvoiceCustomerAddress'] -> ShowS
InvoiceCustomerAddress' -> String
(Int -> InvoiceCustomerAddress' -> ShowS)
-> (InvoiceCustomerAddress' -> String)
-> ([InvoiceCustomerAddress'] -> ShowS)
-> Show InvoiceCustomerAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCustomerAddress'] -> ShowS
$cshowList :: [InvoiceCustomerAddress'] -> ShowS
show :: InvoiceCustomerAddress' -> String
$cshow :: InvoiceCustomerAddress' -> String
showsPrec :: Int -> InvoiceCustomerAddress' -> ShowS
$cshowsPrec :: Int -> InvoiceCustomerAddress' -> ShowS
GHC.Show.Show,
      InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool
(InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool)
-> (InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool)
-> Eq InvoiceCustomerAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool
$c/= :: InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool
== :: InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool
$c== :: InvoiceCustomerAddress' -> InvoiceCustomerAddress' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerAddress' where
  toJSON :: InvoiceCustomerAddress' -> Value
toJSON InvoiceCustomerAddress'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'City InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Country InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line1 InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line2 InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'PostalCode InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'State InvoiceCustomerAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceCustomerAddress' -> Encoding
toEncoding InvoiceCustomerAddress'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'City InvoiceCustomerAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Country InvoiceCustomerAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line1 InvoiceCustomerAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'Line2 InvoiceCustomerAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'PostalCode InvoiceCustomerAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerAddress' -> Maybe Text
invoiceCustomerAddress'State InvoiceCustomerAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerAddress' where
  parseJSON :: Value -> Parser InvoiceCustomerAddress'
parseJSON = String
-> (Object -> Parser InvoiceCustomerAddress')
-> Value
-> Parser InvoiceCustomerAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceCustomerAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InvoiceCustomerAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceCustomerAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceCustomerAddress'
InvoiceCustomerAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceCustomerAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceCustomerAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceCustomerAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceCustomerAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceCustomerAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> InvoiceCustomerAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line1")) Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> InvoiceCustomerAddress')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> InvoiceCustomerAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line2")) Parser (Maybe Text -> Maybe Text -> InvoiceCustomerAddress')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> InvoiceCustomerAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"postal_code")) Parser (Maybe Text -> InvoiceCustomerAddress')
-> Parser (Maybe Text) -> Parser InvoiceCustomerAddress'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"state"))

-- | Create a new 'InvoiceCustomerAddress'' with all required fields.
mkInvoiceCustomerAddress' :: InvoiceCustomerAddress'
mkInvoiceCustomerAddress' :: InvoiceCustomerAddress'
mkInvoiceCustomerAddress' =
  InvoiceCustomerAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceCustomerAddress'
InvoiceCustomerAddress'
    { invoiceCustomerAddress'City :: Maybe Text
invoiceCustomerAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress'Country :: Maybe Text
invoiceCustomerAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress'Line1 :: Maybe Text
invoiceCustomerAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress'Line2 :: Maybe Text
invoiceCustomerAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress'PostalCode :: Maybe Text
invoiceCustomerAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerAddress'State :: Maybe Text
invoiceCustomerAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.invoice.properties.customer_shipping.anyOf@ in the specification.
--
-- The customer\\\'s shipping information. Until the invoice is finalized, this field will equal \\\`customer.shipping\\\`. Once the invoice is finalized, this field will no longer be updated.
data InvoiceCustomerShipping' = InvoiceCustomerShipping'
  { -- | address:
    InvoiceCustomerShipping' -> Maybe Address
invoiceCustomerShipping'Address :: (GHC.Maybe.Maybe Address),
    -- | carrier: The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Carrier :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | name: Recipient name.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | phone: Recipient phone (including extension).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | tracking_number: The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'TrackingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> InvoiceCustomerShipping' -> ShowS
[InvoiceCustomerShipping'] -> ShowS
InvoiceCustomerShipping' -> String
(Int -> InvoiceCustomerShipping' -> ShowS)
-> (InvoiceCustomerShipping' -> String)
-> ([InvoiceCustomerShipping'] -> ShowS)
-> Show InvoiceCustomerShipping'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCustomerShipping'] -> ShowS
$cshowList :: [InvoiceCustomerShipping'] -> ShowS
show :: InvoiceCustomerShipping' -> String
$cshow :: InvoiceCustomerShipping' -> String
showsPrec :: Int -> InvoiceCustomerShipping' -> ShowS
$cshowsPrec :: Int -> InvoiceCustomerShipping' -> ShowS
GHC.Show.Show,
      InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool
(InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool)
-> (InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool)
-> Eq InvoiceCustomerShipping'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool
$c/= :: InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool
== :: InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool
$c== :: InvoiceCustomerShipping' -> InvoiceCustomerShipping' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerShipping' where
  toJSON :: InvoiceCustomerShipping' -> Value
toJSON InvoiceCustomerShipping'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"address" Text -> Maybe Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Address
invoiceCustomerShipping'Address InvoiceCustomerShipping'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"carrier" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Carrier InvoiceCustomerShipping'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Name InvoiceCustomerShipping'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Phone InvoiceCustomerShipping'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tracking_number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'TrackingNumber InvoiceCustomerShipping'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceCustomerShipping' -> Encoding
toEncoding InvoiceCustomerShipping'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"address" Text -> Maybe Address -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Address
invoiceCustomerShipping'Address InvoiceCustomerShipping'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"carrier" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Carrier InvoiceCustomerShipping'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Name InvoiceCustomerShipping'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'Phone InvoiceCustomerShipping'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"tracking_number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceCustomerShipping' -> Maybe Text
invoiceCustomerShipping'TrackingNumber InvoiceCustomerShipping'
obj)))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerShipping' where
  parseJSON :: Value -> Parser InvoiceCustomerShipping'
parseJSON = String
-> (Object -> Parser InvoiceCustomerShipping')
-> Value
-> Parser InvoiceCustomerShipping'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceCustomerShipping'" (\Object
obj -> (((((Maybe Address
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InvoiceCustomerShipping')
-> Parser
     (Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceCustomerShipping')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceCustomerShipping'
InvoiceCustomerShipping' Parser
  (Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceCustomerShipping')
-> Parser (Maybe Address)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceCustomerShipping')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceCustomerShipping')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> InvoiceCustomerShipping')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"carrier")) Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> InvoiceCustomerShipping')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> InvoiceCustomerShipping')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"name")) Parser (Maybe Text -> Maybe Text -> InvoiceCustomerShipping')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> InvoiceCustomerShipping')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"phone")) Parser (Maybe Text -> InvoiceCustomerShipping')
-> Parser (Maybe Text) -> Parser InvoiceCustomerShipping'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tracking_number"))

-- | Create a new 'InvoiceCustomerShipping'' with all required fields.
mkInvoiceCustomerShipping' :: InvoiceCustomerShipping'
mkInvoiceCustomerShipping' :: InvoiceCustomerShipping'
mkInvoiceCustomerShipping' =
  InvoiceCustomerShipping' :: Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceCustomerShipping'
InvoiceCustomerShipping'
    { invoiceCustomerShipping'Address :: Maybe Address
invoiceCustomerShipping'Address = Maybe Address
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerShipping'Carrier :: Maybe Text
invoiceCustomerShipping'Carrier = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerShipping'Name :: Maybe Text
invoiceCustomerShipping'Name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerShipping'Phone :: Maybe Text
invoiceCustomerShipping'Phone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceCustomerShipping'TrackingNumber :: Maybe Text
invoiceCustomerShipping'TrackingNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the enum schema located at @components.schemas.invoice.properties.customer_tax_exempt@ in the specification.
--
-- The customer\'s tax exempt status. Until the invoice is finalized, this field will equal \`customer.tax_exempt\`. Once the invoice is finalized, this field will no longer be updated.
data InvoiceCustomerTaxExempt'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceCustomerTaxExempt'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceCustomerTaxExempt'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"exempt"@
    InvoiceCustomerTaxExempt'EnumExempt
  | -- | Represents the JSON value @"none"@
    InvoiceCustomerTaxExempt'EnumNone
  | -- | Represents the JSON value @"reverse"@
    InvoiceCustomerTaxExempt'EnumReverse
  deriving (Int -> InvoiceCustomerTaxExempt' -> ShowS
[InvoiceCustomerTaxExempt'] -> ShowS
InvoiceCustomerTaxExempt' -> String
(Int -> InvoiceCustomerTaxExempt' -> ShowS)
-> (InvoiceCustomerTaxExempt' -> String)
-> ([InvoiceCustomerTaxExempt'] -> ShowS)
-> Show InvoiceCustomerTaxExempt'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceCustomerTaxExempt'] -> ShowS
$cshowList :: [InvoiceCustomerTaxExempt'] -> ShowS
show :: InvoiceCustomerTaxExempt' -> String
$cshow :: InvoiceCustomerTaxExempt' -> String
showsPrec :: Int -> InvoiceCustomerTaxExempt' -> ShowS
$cshowsPrec :: Int -> InvoiceCustomerTaxExempt' -> ShowS
GHC.Show.Show, InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool
(InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool)
-> (InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool)
-> Eq InvoiceCustomerTaxExempt'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool
$c/= :: InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool
== :: InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool
$c== :: InvoiceCustomerTaxExempt' -> InvoiceCustomerTaxExempt' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerTaxExempt' where
  toJSON :: InvoiceCustomerTaxExempt' -> Value
toJSON (InvoiceCustomerTaxExempt'Other Value
val) = Value
val
  toJSON (InvoiceCustomerTaxExempt'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumExempt) = Value
"exempt"
  toJSON (InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumNone) = Value
"none"
  toJSON (InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumReverse) = Value
"reverse"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerTaxExempt' where
  parseJSON :: Value -> Parser InvoiceCustomerTaxExempt'
parseJSON Value
val =
    InvoiceCustomerTaxExempt' -> Parser InvoiceCustomerTaxExempt'
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
"exempt" -> InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumExempt
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"none" -> InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumNone
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"reverse" -> InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'EnumReverse
            | Bool
GHC.Base.otherwise -> Value -> InvoiceCustomerTaxExempt'
InvoiceCustomerTaxExempt'Other Value
val
      )

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.default_payment_method.anyOf@ in the specification.
--
-- ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription\'s default payment method, if any, or to the default payment method in the customer\'s invoice settings.
data InvoiceDefaultPaymentMethod'Variants
  = InvoiceDefaultPaymentMethod'Text Data.Text.Internal.Text
  | InvoiceDefaultPaymentMethod'PaymentMethod PaymentMethod
  deriving (Int -> InvoiceDefaultPaymentMethod'Variants -> ShowS
[InvoiceDefaultPaymentMethod'Variants] -> ShowS
InvoiceDefaultPaymentMethod'Variants -> String
(Int -> InvoiceDefaultPaymentMethod'Variants -> ShowS)
-> (InvoiceDefaultPaymentMethod'Variants -> String)
-> ([InvoiceDefaultPaymentMethod'Variants] -> ShowS)
-> Show InvoiceDefaultPaymentMethod'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDefaultPaymentMethod'Variants] -> ShowS
$cshowList :: [InvoiceDefaultPaymentMethod'Variants] -> ShowS
show :: InvoiceDefaultPaymentMethod'Variants -> String
$cshow :: InvoiceDefaultPaymentMethod'Variants -> String
showsPrec :: Int -> InvoiceDefaultPaymentMethod'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceDefaultPaymentMethod'Variants -> ShowS
GHC.Show.Show, InvoiceDefaultPaymentMethod'Variants
-> InvoiceDefaultPaymentMethod'Variants -> Bool
(InvoiceDefaultPaymentMethod'Variants
 -> InvoiceDefaultPaymentMethod'Variants -> Bool)
-> (InvoiceDefaultPaymentMethod'Variants
    -> InvoiceDefaultPaymentMethod'Variants -> Bool)
-> Eq InvoiceDefaultPaymentMethod'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDefaultPaymentMethod'Variants
-> InvoiceDefaultPaymentMethod'Variants -> Bool
$c/= :: InvoiceDefaultPaymentMethod'Variants
-> InvoiceDefaultPaymentMethod'Variants -> Bool
== :: InvoiceDefaultPaymentMethod'Variants
-> InvoiceDefaultPaymentMethod'Variants -> Bool
$c== :: InvoiceDefaultPaymentMethod'Variants
-> InvoiceDefaultPaymentMethod'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDefaultPaymentMethod'Variants where
  toJSON :: InvoiceDefaultPaymentMethod'Variants -> Value
toJSON (InvoiceDefaultPaymentMethod'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceDefaultPaymentMethod'PaymentMethod PaymentMethod
a) = PaymentMethod -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PaymentMethod
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDefaultPaymentMethod'Variants where
  parseJSON :: Value -> Parser InvoiceDefaultPaymentMethod'Variants
parseJSON Value
val = case (Text -> InvoiceDefaultPaymentMethod'Variants
InvoiceDefaultPaymentMethod'Text (Text -> InvoiceDefaultPaymentMethod'Variants)
-> Result Text -> Result InvoiceDefaultPaymentMethod'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultPaymentMethod'Variants
-> Result InvoiceDefaultPaymentMethod'Variants
-> Result InvoiceDefaultPaymentMethod'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((PaymentMethod -> InvoiceDefaultPaymentMethod'Variants
InvoiceDefaultPaymentMethod'PaymentMethod (PaymentMethod -> InvoiceDefaultPaymentMethod'Variants)
-> Result PaymentMethod
-> Result InvoiceDefaultPaymentMethod'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PaymentMethod
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultPaymentMethod'Variants
-> Result InvoiceDefaultPaymentMethod'Variants
-> Result InvoiceDefaultPaymentMethod'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceDefaultPaymentMethod'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceDefaultPaymentMethod'Variants
a -> InvoiceDefaultPaymentMethod'Variants
-> Parser InvoiceDefaultPaymentMethod'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceDefaultPaymentMethod'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceDefaultPaymentMethod'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.default_source.anyOf@ in the specification.
--
-- ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription\'s default source, if any, or to the customer\'s default source.
data InvoiceDefaultSource'Variants
  = InvoiceDefaultSource'Text Data.Text.Internal.Text
  | InvoiceDefaultSource'AlipayAccount AlipayAccount
  | InvoiceDefaultSource'BankAccount BankAccount
  | InvoiceDefaultSource'BitcoinReceiver BitcoinReceiver
  | InvoiceDefaultSource'Card Card
  | InvoiceDefaultSource'Source Source
  deriving (Int -> InvoiceDefaultSource'Variants -> ShowS
[InvoiceDefaultSource'Variants] -> ShowS
InvoiceDefaultSource'Variants -> String
(Int -> InvoiceDefaultSource'Variants -> ShowS)
-> (InvoiceDefaultSource'Variants -> String)
-> ([InvoiceDefaultSource'Variants] -> ShowS)
-> Show InvoiceDefaultSource'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDefaultSource'Variants] -> ShowS
$cshowList :: [InvoiceDefaultSource'Variants] -> ShowS
show :: InvoiceDefaultSource'Variants -> String
$cshow :: InvoiceDefaultSource'Variants -> String
showsPrec :: Int -> InvoiceDefaultSource'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceDefaultSource'Variants -> ShowS
GHC.Show.Show, InvoiceDefaultSource'Variants
-> InvoiceDefaultSource'Variants -> Bool
(InvoiceDefaultSource'Variants
 -> InvoiceDefaultSource'Variants -> Bool)
-> (InvoiceDefaultSource'Variants
    -> InvoiceDefaultSource'Variants -> Bool)
-> Eq InvoiceDefaultSource'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDefaultSource'Variants
-> InvoiceDefaultSource'Variants -> Bool
$c/= :: InvoiceDefaultSource'Variants
-> InvoiceDefaultSource'Variants -> Bool
== :: InvoiceDefaultSource'Variants
-> InvoiceDefaultSource'Variants -> Bool
$c== :: InvoiceDefaultSource'Variants
-> InvoiceDefaultSource'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDefaultSource'Variants where
  toJSON :: InvoiceDefaultSource'Variants -> Value
toJSON (InvoiceDefaultSource'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceDefaultSource'AlipayAccount AlipayAccount
a) = AlipayAccount -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON AlipayAccount
a
  toJSON (InvoiceDefaultSource'BankAccount BankAccount
a) = BankAccount -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON BankAccount
a
  toJSON (InvoiceDefaultSource'BitcoinReceiver BitcoinReceiver
a) = BitcoinReceiver -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON BitcoinReceiver
a
  toJSON (InvoiceDefaultSource'Card Card
a) = Card -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Card
a
  toJSON (InvoiceDefaultSource'Source Source
a) = Source -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Source
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDefaultSource'Variants where
  parseJSON :: Value -> Parser InvoiceDefaultSource'Variants
parseJSON Value
val = case (Text -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'Text (Text -> InvoiceDefaultSource'Variants)
-> Result Text -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((AlipayAccount -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'AlipayAccount (AlipayAccount -> InvoiceDefaultSource'Variants)
-> Result AlipayAccount -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result AlipayAccount
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((BankAccount -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'BankAccount (BankAccount -> InvoiceDefaultSource'Variants)
-> Result BankAccount -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result BankAccount
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((BitcoinReceiver -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'BitcoinReceiver (BitcoinReceiver -> InvoiceDefaultSource'Variants)
-> Result BitcoinReceiver -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result BitcoinReceiver
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Card -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'Card (Card -> InvoiceDefaultSource'Variants)
-> Result Card -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Card
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Source -> InvoiceDefaultSource'Variants
InvoiceDefaultSource'Source (Source -> InvoiceDefaultSource'Variants)
-> Result Source -> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Source
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
-> Result InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceDefaultSource'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched"))))) of
    Data.Aeson.Types.Internal.Success InvoiceDefaultSource'Variants
a -> InvoiceDefaultSource'Variants
-> Parser InvoiceDefaultSource'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceDefaultSource'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceDefaultSource'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the object schema located at @components.schemas.invoice.properties.discount.anyOf@ in the specification.
--
-- Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
data InvoiceDiscount' = InvoiceDiscount'
  { -- | checkout_session: The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceDiscount' -> Maybe Text
invoiceDiscount'CheckoutSession :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | coupon: A coupon contains information about a percent-off or amount-off discount you
    -- might want to apply to a customer. Coupons may be applied to [invoices](https:\/\/stripe.com\/docs\/api\#invoices) or
    -- [orders](https:\/\/stripe.com\/docs\/api\#create_order-coupon). Coupons do not work with conventional one-off [charges](https:\/\/stripe.com\/docs\/api\#create_charge).
    InvoiceDiscount' -> Maybe Coupon
invoiceDiscount'Coupon :: (GHC.Maybe.Maybe Coupon),
    -- | customer: The ID of the customer associated with this discount.
    InvoiceDiscount' -> Maybe InvoiceDiscount'Customer'Variants
invoiceDiscount'Customer :: (GHC.Maybe.Maybe InvoiceDiscount'Customer'Variants),
    -- | end: If the coupon has a duration of \`repeating\`, the date that this discount will end. If the coupon has a duration of \`once\` or \`forever\`, this attribute will be null.
    InvoiceDiscount' -> Maybe Int
invoiceDiscount'End :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | id: The ID of the discount object. Discounts cannot be fetched by ID. Use \`expand[]=discounts\` in API calls to expand discount IDs in an array.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceDiscount' -> Maybe Text
invoiceDiscount'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | invoice: The invoice that the discount\'s coupon was applied to, if it was applied directly to a particular invoice.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceDiscount' -> Maybe Text
invoiceDiscount'Invoice :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | invoice_item: The invoice item \`id\` (or invoice line item \`id\` for invoice line items of type=\'subscription\') that the discount\'s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceDiscount' -> Maybe Text
invoiceDiscount'InvoiceItem :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | promotion_code: The promotion code applied to create this discount.
    InvoiceDiscount' -> Maybe InvoiceDiscount'PromotionCode'Variants
invoiceDiscount'PromotionCode :: (GHC.Maybe.Maybe InvoiceDiscount'PromotionCode'Variants),
    -- | start: Date that the coupon was applied.
    InvoiceDiscount' -> Maybe Int
invoiceDiscount'Start :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | subscription: The subscription that this coupon is applied to, if it is applied to a particular subscription.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceDiscount' -> Maybe Text
invoiceDiscount'Subscription :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> InvoiceDiscount' -> ShowS
[InvoiceDiscount'] -> ShowS
InvoiceDiscount' -> String
(Int -> InvoiceDiscount' -> ShowS)
-> (InvoiceDiscount' -> String)
-> ([InvoiceDiscount'] -> ShowS)
-> Show InvoiceDiscount'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDiscount'] -> ShowS
$cshowList :: [InvoiceDiscount'] -> ShowS
show :: InvoiceDiscount' -> String
$cshow :: InvoiceDiscount' -> String
showsPrec :: Int -> InvoiceDiscount' -> ShowS
$cshowsPrec :: Int -> InvoiceDiscount' -> ShowS
GHC.Show.Show,
      InvoiceDiscount' -> InvoiceDiscount' -> Bool
(InvoiceDiscount' -> InvoiceDiscount' -> Bool)
-> (InvoiceDiscount' -> InvoiceDiscount' -> Bool)
-> Eq InvoiceDiscount'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDiscount' -> InvoiceDiscount' -> Bool
$c/= :: InvoiceDiscount' -> InvoiceDiscount' -> Bool
== :: InvoiceDiscount' -> InvoiceDiscount' -> Bool
$c== :: InvoiceDiscount' -> InvoiceDiscount' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount' where
  toJSON :: InvoiceDiscount' -> Value
toJSON InvoiceDiscount'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"checkout_session" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'CheckoutSession InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"coupon" Text -> Maybe Coupon -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Coupon
invoiceDiscount'Coupon InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe InvoiceDiscount'Customer'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe InvoiceDiscount'Customer'Variants
invoiceDiscount'Customer InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"end" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Int
invoiceDiscount'End InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Id InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"invoice" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Invoice InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"invoice_item" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'InvoiceItem InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"promotion_code" Text -> Maybe InvoiceDiscount'PromotionCode'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe InvoiceDiscount'PromotionCode'Variants
invoiceDiscount'PromotionCode InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"start" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Int
invoiceDiscount'Start InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"subscription" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Subscription InvoiceDiscount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"discount" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceDiscount' -> Encoding
toEncoding InvoiceDiscount'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"checkout_session" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'CheckoutSession InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"coupon" Text -> Maybe Coupon -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Coupon
invoiceDiscount'Coupon InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe InvoiceDiscount'Customer'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe InvoiceDiscount'Customer'Variants
invoiceDiscount'Customer InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"end" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Int
invoiceDiscount'End InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Id InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"invoice" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Invoice InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"invoice_item" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'InvoiceItem InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"promotion_code" Text -> Maybe InvoiceDiscount'PromotionCode'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe InvoiceDiscount'PromotionCode'Variants
invoiceDiscount'PromotionCode InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"start" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Int
invoiceDiscount'Start InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"subscription" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceDiscount' -> Maybe Text
invoiceDiscount'Subscription InvoiceDiscount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"discount")))))))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount' where
  parseJSON :: Value -> Parser InvoiceDiscount'
parseJSON = String
-> (Object -> Parser InvoiceDiscount')
-> Value
-> Parser InvoiceDiscount'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceDiscount'" (\Object
obj -> ((((((((((Maybe Text
 -> Maybe Coupon
 -> Maybe InvoiceDiscount'Customer'Variants
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InvoiceDiscount'PromotionCode'Variants
 -> Maybe Int
 -> Maybe Text
 -> InvoiceDiscount')
-> Parser
     (Maybe Text
      -> Maybe Coupon
      -> Maybe InvoiceDiscount'Customer'Variants
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Coupon
-> Maybe InvoiceDiscount'Customer'Variants
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceDiscount'PromotionCode'Variants
-> Maybe Int
-> Maybe Text
-> InvoiceDiscount'
InvoiceDiscount' Parser
  (Maybe Text
   -> Maybe Coupon
   -> Maybe InvoiceDiscount'Customer'Variants
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Text)
-> Parser
     (Maybe Coupon
      -> Maybe InvoiceDiscount'Customer'Variants
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"checkout_session")) Parser
  (Maybe Coupon
   -> Maybe InvoiceDiscount'Customer'Variants
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Coupon)
-> Parser
     (Maybe InvoiceDiscount'Customer'Variants
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Coupon)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"coupon")) Parser
  (Maybe InvoiceDiscount'Customer'Variants
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe InvoiceDiscount'Customer'Variants)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceDiscount'Customer'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"end")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int
      -> Maybe Text
      -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"invoice")) Parser
  (Maybe Text
   -> Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int
   -> Maybe Text
   -> InvoiceDiscount')
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceDiscount'PromotionCode'Variants
      -> Maybe Int -> Maybe Text -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"invoice_item")) Parser
  (Maybe InvoiceDiscount'PromotionCode'Variants
   -> Maybe Int -> Maybe Text -> InvoiceDiscount')
-> Parser (Maybe InvoiceDiscount'PromotionCode'Variants)
-> Parser (Maybe Int -> Maybe Text -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe InvoiceDiscount'PromotionCode'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"promotion_code")) Parser (Maybe Int -> Maybe Text -> InvoiceDiscount')
-> Parser (Maybe Int) -> Parser (Maybe Text -> InvoiceDiscount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"start")) Parser (Maybe Text -> InvoiceDiscount')
-> Parser (Maybe Text) -> Parser InvoiceDiscount'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"subscription"))

-- | Create a new 'InvoiceDiscount'' with all required fields.
mkInvoiceDiscount' :: InvoiceDiscount'
mkInvoiceDiscount' :: InvoiceDiscount'
mkInvoiceDiscount' =
  InvoiceDiscount' :: Maybe Text
-> Maybe Coupon
-> Maybe InvoiceDiscount'Customer'Variants
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceDiscount'PromotionCode'Variants
-> Maybe Int
-> Maybe Text
-> InvoiceDiscount'
InvoiceDiscount'
    { invoiceDiscount'CheckoutSession :: Maybe Text
invoiceDiscount'CheckoutSession = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Coupon :: Maybe Coupon
invoiceDiscount'Coupon = Maybe Coupon
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Customer :: Maybe InvoiceDiscount'Customer'Variants
invoiceDiscount'Customer = Maybe InvoiceDiscount'Customer'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'End :: Maybe Int
invoiceDiscount'End = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Id :: Maybe Text
invoiceDiscount'Id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Invoice :: Maybe Text
invoiceDiscount'Invoice = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'InvoiceItem :: Maybe Text
invoiceDiscount'InvoiceItem = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'PromotionCode :: Maybe InvoiceDiscount'PromotionCode'Variants
invoiceDiscount'PromotionCode = Maybe InvoiceDiscount'PromotionCode'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Start :: Maybe Int
invoiceDiscount'Start = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceDiscount'Subscription :: Maybe Text
invoiceDiscount'Subscription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.discount.anyOf.properties.customer.anyOf@ in the specification.
--
-- The ID of the customer associated with this discount.
data InvoiceDiscount'Customer'Variants
  = InvoiceDiscount'Customer'Text Data.Text.Internal.Text
  | InvoiceDiscount'Customer'Customer Customer
  | InvoiceDiscount'Customer'DeletedCustomer DeletedCustomer
  deriving (Int -> InvoiceDiscount'Customer'Variants -> ShowS
[InvoiceDiscount'Customer'Variants] -> ShowS
InvoiceDiscount'Customer'Variants -> String
(Int -> InvoiceDiscount'Customer'Variants -> ShowS)
-> (InvoiceDiscount'Customer'Variants -> String)
-> ([InvoiceDiscount'Customer'Variants] -> ShowS)
-> Show InvoiceDiscount'Customer'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDiscount'Customer'Variants] -> ShowS
$cshowList :: [InvoiceDiscount'Customer'Variants] -> ShowS
show :: InvoiceDiscount'Customer'Variants -> String
$cshow :: InvoiceDiscount'Customer'Variants -> String
showsPrec :: Int -> InvoiceDiscount'Customer'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceDiscount'Customer'Variants -> ShowS
GHC.Show.Show, InvoiceDiscount'Customer'Variants
-> InvoiceDiscount'Customer'Variants -> Bool
(InvoiceDiscount'Customer'Variants
 -> InvoiceDiscount'Customer'Variants -> Bool)
-> (InvoiceDiscount'Customer'Variants
    -> InvoiceDiscount'Customer'Variants -> Bool)
-> Eq InvoiceDiscount'Customer'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDiscount'Customer'Variants
-> InvoiceDiscount'Customer'Variants -> Bool
$c/= :: InvoiceDiscount'Customer'Variants
-> InvoiceDiscount'Customer'Variants -> Bool
== :: InvoiceDiscount'Customer'Variants
-> InvoiceDiscount'Customer'Variants -> Bool
$c== :: InvoiceDiscount'Customer'Variants
-> InvoiceDiscount'Customer'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount'Customer'Variants where
  toJSON :: InvoiceDiscount'Customer'Variants -> Value
toJSON (InvoiceDiscount'Customer'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceDiscount'Customer'Customer Customer
a) = Customer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Customer
a
  toJSON (InvoiceDiscount'Customer'DeletedCustomer DeletedCustomer
a) = DeletedCustomer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedCustomer
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount'Customer'Variants where
  parseJSON :: Value -> Parser InvoiceDiscount'Customer'Variants
parseJSON Value
val = case (Text -> InvoiceDiscount'Customer'Variants
InvoiceDiscount'Customer'Text (Text -> InvoiceDiscount'Customer'Variants)
-> Result Text -> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Customer -> InvoiceDiscount'Customer'Variants
InvoiceDiscount'Customer'Customer (Customer -> InvoiceDiscount'Customer'Variants)
-> Result Customer -> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Customer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedCustomer -> InvoiceDiscount'Customer'Variants
InvoiceDiscount'Customer'DeletedCustomer (DeletedCustomer -> InvoiceDiscount'Customer'Variants)
-> Result DeletedCustomer
-> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedCustomer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
-> Result InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceDiscount'Customer'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
    Data.Aeson.Types.Internal.Success InvoiceDiscount'Customer'Variants
a -> InvoiceDiscount'Customer'Variants
-> Parser InvoiceDiscount'Customer'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceDiscount'Customer'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceDiscount'Customer'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.discount.anyOf.properties.promotion_code.anyOf@ in the specification.
--
-- The promotion code applied to create this discount.
data InvoiceDiscount'PromotionCode'Variants
  = InvoiceDiscount'PromotionCode'Text Data.Text.Internal.Text
  | InvoiceDiscount'PromotionCode'PromotionCode PromotionCode
  deriving (Int -> InvoiceDiscount'PromotionCode'Variants -> ShowS
[InvoiceDiscount'PromotionCode'Variants] -> ShowS
InvoiceDiscount'PromotionCode'Variants -> String
(Int -> InvoiceDiscount'PromotionCode'Variants -> ShowS)
-> (InvoiceDiscount'PromotionCode'Variants -> String)
-> ([InvoiceDiscount'PromotionCode'Variants] -> ShowS)
-> Show InvoiceDiscount'PromotionCode'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDiscount'PromotionCode'Variants] -> ShowS
$cshowList :: [InvoiceDiscount'PromotionCode'Variants] -> ShowS
show :: InvoiceDiscount'PromotionCode'Variants -> String
$cshow :: InvoiceDiscount'PromotionCode'Variants -> String
showsPrec :: Int -> InvoiceDiscount'PromotionCode'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceDiscount'PromotionCode'Variants -> ShowS
GHC.Show.Show, InvoiceDiscount'PromotionCode'Variants
-> InvoiceDiscount'PromotionCode'Variants -> Bool
(InvoiceDiscount'PromotionCode'Variants
 -> InvoiceDiscount'PromotionCode'Variants -> Bool)
-> (InvoiceDiscount'PromotionCode'Variants
    -> InvoiceDiscount'PromotionCode'Variants -> Bool)
-> Eq InvoiceDiscount'PromotionCode'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDiscount'PromotionCode'Variants
-> InvoiceDiscount'PromotionCode'Variants -> Bool
$c/= :: InvoiceDiscount'PromotionCode'Variants
-> InvoiceDiscount'PromotionCode'Variants -> Bool
== :: InvoiceDiscount'PromotionCode'Variants
-> InvoiceDiscount'PromotionCode'Variants -> Bool
$c== :: InvoiceDiscount'PromotionCode'Variants
-> InvoiceDiscount'PromotionCode'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount'PromotionCode'Variants where
  toJSON :: InvoiceDiscount'PromotionCode'Variants -> Value
toJSON (InvoiceDiscount'PromotionCode'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceDiscount'PromotionCode'PromotionCode PromotionCode
a) = PromotionCode -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PromotionCode
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount'PromotionCode'Variants where
  parseJSON :: Value -> Parser InvoiceDiscount'PromotionCode'Variants
parseJSON Value
val = case (Text -> InvoiceDiscount'PromotionCode'Variants
InvoiceDiscount'PromotionCode'Text (Text -> InvoiceDiscount'PromotionCode'Variants)
-> Result Text -> Result InvoiceDiscount'PromotionCode'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscount'PromotionCode'Variants
-> Result InvoiceDiscount'PromotionCode'Variants
-> Result InvoiceDiscount'PromotionCode'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((PromotionCode -> InvoiceDiscount'PromotionCode'Variants
InvoiceDiscount'PromotionCode'PromotionCode (PromotionCode -> InvoiceDiscount'PromotionCode'Variants)
-> Result PromotionCode
-> Result InvoiceDiscount'PromotionCode'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PromotionCode
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscount'PromotionCode'Variants
-> Result InvoiceDiscount'PromotionCode'Variants
-> Result InvoiceDiscount'PromotionCode'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceDiscount'PromotionCode'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceDiscount'PromotionCode'Variants
a -> InvoiceDiscount'PromotionCode'Variants
-> Parser InvoiceDiscount'PromotionCode'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceDiscount'PromotionCode'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceDiscount'PromotionCode'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.discounts.items.anyOf@ in the specification.
data InvoiceDiscounts'Variants
  = InvoiceDiscounts'Text Data.Text.Internal.Text
  | InvoiceDiscounts'Discount Discount
  | InvoiceDiscounts'DeletedDiscount DeletedDiscount
  deriving (Int -> InvoiceDiscounts'Variants -> ShowS
[InvoiceDiscounts'Variants] -> ShowS
InvoiceDiscounts'Variants -> String
(Int -> InvoiceDiscounts'Variants -> ShowS)
-> (InvoiceDiscounts'Variants -> String)
-> ([InvoiceDiscounts'Variants] -> ShowS)
-> Show InvoiceDiscounts'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceDiscounts'Variants] -> ShowS
$cshowList :: [InvoiceDiscounts'Variants] -> ShowS
show :: InvoiceDiscounts'Variants -> String
$cshow :: InvoiceDiscounts'Variants -> String
showsPrec :: Int -> InvoiceDiscounts'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceDiscounts'Variants -> ShowS
GHC.Show.Show, InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool
(InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool)
-> (InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool)
-> Eq InvoiceDiscounts'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool
$c/= :: InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool
== :: InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool
$c== :: InvoiceDiscounts'Variants -> InvoiceDiscounts'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscounts'Variants where
  toJSON :: InvoiceDiscounts'Variants -> Value
toJSON (InvoiceDiscounts'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceDiscounts'Discount Discount
a) = Discount -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Discount
a
  toJSON (InvoiceDiscounts'DeletedDiscount DeletedDiscount
a) = DeletedDiscount -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedDiscount
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscounts'Variants where
  parseJSON :: Value -> Parser InvoiceDiscounts'Variants
parseJSON Value
val = case (Text -> InvoiceDiscounts'Variants
InvoiceDiscounts'Text (Text -> InvoiceDiscounts'Variants)
-> Result Text -> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Discount -> InvoiceDiscounts'Variants
InvoiceDiscounts'Discount (Discount -> InvoiceDiscounts'Variants)
-> Result Discount -> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Discount
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedDiscount -> InvoiceDiscounts'Variants
InvoiceDiscounts'DeletedDiscount (DeletedDiscount -> InvoiceDiscounts'Variants)
-> Result DeletedDiscount -> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedDiscount
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
-> Result InvoiceDiscounts'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceDiscounts'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
    Data.Aeson.Types.Internal.Success InvoiceDiscounts'Variants
a -> InvoiceDiscounts'Variants -> Parser InvoiceDiscounts'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceDiscounts'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceDiscounts'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the object schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf@ in the specification.
--
-- The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
data InvoiceLastFinalizationError' = InvoiceLastFinalizationError'
  { -- | charge: For card errors, the ID of the failed charge.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Charge :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | code: For some errors that could be handled programmatically, a short string indicating the [error code](https:\/\/stripe.com\/docs\/error-codes) reported.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Code :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | decline_code: For card errors resulting from a card issuer decline, a short string indicating the [card issuer\'s reason for the decline](https:\/\/stripe.com\/docs\/declines\#issuer-declines) if they provide one.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DeclineCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | doc_url: A URL to more information about the [error code](https:\/\/stripe.com\/docs\/error-codes) reported.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DocUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | message: A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
    --
    -- Constraints:
    --
    -- * Maximum length of 40000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Message :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | param: If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Param :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | payment_intent: A PaymentIntent guides you through the process of collecting a payment from your customer.
    -- We recommend that you create exactly one PaymentIntent for each order or
    -- customer session in your system. You can reference the PaymentIntent later to
    -- see the history of payment attempts for a particular session.
    --
    -- A PaymentIntent transitions through
    -- [multiple statuses](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses)
    -- throughout its lifetime as it interfaces with Stripe.js to perform
    -- authentication flows and ultimately creates at most one successful charge.
    --
    -- Related guide: [Payment Intents API](https:\/\/stripe.com\/docs\/payments\/payment-intents).
    InvoiceLastFinalizationError' -> Maybe PaymentIntent
invoiceLastFinalizationError'PaymentIntent :: (GHC.Maybe.Maybe PaymentIntent),
    -- | payment_method: PaymentMethod objects represent your customer\'s payment instruments.
    -- They can be used with [PaymentIntents](https:\/\/stripe.com\/docs\/payments\/payment-intents) to collect payments or saved to
    -- Customer objects to store instrument details for future payments.
    --
    -- Related guides: [Payment Methods](https:\/\/stripe.com\/docs\/payments\/payment-methods) and [More Payment Scenarios](https:\/\/stripe.com\/docs\/payments\/more-payment-scenarios).
    InvoiceLastFinalizationError' -> Maybe PaymentMethod
invoiceLastFinalizationError'PaymentMethod :: (GHC.Maybe.Maybe PaymentMethod),
    -- | payment_method_type: If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'PaymentMethodType :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | setup_intent: A SetupIntent guides you through the process of setting up and saving a customer\'s payment credentials for future payments.
    -- For example, you could use a SetupIntent to set up and save your customer\'s card without immediately collecting a payment.
    -- Later, you can use [PaymentIntents](https:\/\/stripe.com\/docs\/api\#payment_intents) to drive the payment flow.
    --
    -- Create a SetupIntent as soon as you\'re ready to collect your customer\'s payment credentials.
    -- Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.
    -- The SetupIntent then transitions through multiple [statuses](https:\/\/stripe.com\/docs\/payments\/intents\#intent-statuses) as it guides
    -- you through the setup process.
    --
    -- Successful SetupIntents result in payment credentials that are optimized for future payments.
    -- For example, cardholders in [certain regions](\/guides\/strong-customer-authentication) may need to be run through
    -- [Strong Customer Authentication](https:\/\/stripe.com\/docs\/strong-customer-authentication) at the time of payment method collection
    -- in order to streamline later [off-session payments](https:\/\/stripe.com\/docs\/payments\/setup-intents).
    -- If the SetupIntent is used with a [Customer](https:\/\/stripe.com\/docs\/api\#setup_intent_object-customer), upon success,
    -- it will automatically attach the resulting payment method to that Customer.
    -- We recommend using SetupIntents or [setup_future_usage](https:\/\/stripe.com\/docs\/api\#payment_intent_object-setup_future_usage) on
    -- PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.
    --
    -- By using SetupIntents, you ensure that your customers experience the minimum set of required friction,
    -- even as regulations change over time.
    --
    -- Related guide: [Setup Intents API](https:\/\/stripe.com\/docs\/payments\/setup-intents).
    InvoiceLastFinalizationError' -> Maybe SetupIntent
invoiceLastFinalizationError'SetupIntent :: (GHC.Maybe.Maybe SetupIntent),
    -- | source: The source object for errors returned on a request involving a source.
    InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Source'
invoiceLastFinalizationError'Source :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'),
    -- | type: The type of error returned. One of \`api_connection_error\`, \`api_error\`, \`authentication_error\`, \`card_error\`, \`idempotency_error\`, \`invalid_request_error\`, or \`rate_limit_error\`
    InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Type'
invoiceLastFinalizationError'Type :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Type')
  }
  deriving
    ( Int -> InvoiceLastFinalizationError' -> ShowS
[InvoiceLastFinalizationError'] -> ShowS
InvoiceLastFinalizationError' -> String
(Int -> InvoiceLastFinalizationError' -> ShowS)
-> (InvoiceLastFinalizationError' -> String)
-> ([InvoiceLastFinalizationError'] -> ShowS)
-> Show InvoiceLastFinalizationError'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'] -> ShowS
show :: InvoiceLastFinalizationError' -> String
$cshow :: InvoiceLastFinalizationError' -> String
showsPrec :: Int -> InvoiceLastFinalizationError' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError' -> ShowS
GHC.Show.Show,
      InvoiceLastFinalizationError'
-> InvoiceLastFinalizationError' -> Bool
(InvoiceLastFinalizationError'
 -> InvoiceLastFinalizationError' -> Bool)
-> (InvoiceLastFinalizationError'
    -> InvoiceLastFinalizationError' -> Bool)
-> Eq InvoiceLastFinalizationError'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'
-> InvoiceLastFinalizationError' -> Bool
$c/= :: InvoiceLastFinalizationError'
-> InvoiceLastFinalizationError' -> Bool
== :: InvoiceLastFinalizationError'
-> InvoiceLastFinalizationError' -> Bool
$c== :: InvoiceLastFinalizationError'
-> InvoiceLastFinalizationError' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError' where
  toJSON :: InvoiceLastFinalizationError' -> Value
toJSON InvoiceLastFinalizationError'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"charge" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Charge InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Code InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"decline_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DeclineCode InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"doc_url" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DocUrl InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"message" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Message InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"param" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Param InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment_intent" Text -> Maybe PaymentIntent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe PaymentIntent
invoiceLastFinalizationError'PaymentIntent InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment_method" Text -> Maybe PaymentMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe PaymentMethod
invoiceLastFinalizationError'PaymentMethod InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment_method_type" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'PaymentMethodType InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"setup_intent" Text -> Maybe SetupIntent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe SetupIntent
invoiceLastFinalizationError'SetupIntent InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"source" Text -> Maybe InvoiceLastFinalizationError'Source' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Source'
invoiceLastFinalizationError'Source InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Maybe InvoiceLastFinalizationError'Type' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Type'
invoiceLastFinalizationError'Type InvoiceLastFinalizationError'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLastFinalizationError' -> Encoding
toEncoding InvoiceLastFinalizationError'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"charge" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Charge InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Code InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"decline_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DeclineCode InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"doc_url" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'DocUrl InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"message" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Message InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"param" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'Param InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment_intent" Text -> Maybe PaymentIntent -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe PaymentIntent
invoiceLastFinalizationError'PaymentIntent InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment_method" Text -> Maybe PaymentMethod -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe PaymentMethod
invoiceLastFinalizationError'PaymentMethod InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment_method_type" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe Text
invoiceLastFinalizationError'PaymentMethodType InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"setup_intent" Text -> Maybe SetupIntent -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError' -> Maybe SetupIntent
invoiceLastFinalizationError'SetupIntent InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"source" Text -> Maybe InvoiceLastFinalizationError'Source' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Source'
invoiceLastFinalizationError'Source InvoiceLastFinalizationError'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"type" Text -> Maybe InvoiceLastFinalizationError'Type' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'
-> Maybe InvoiceLastFinalizationError'Type'
invoiceLastFinalizationError'Type InvoiceLastFinalizationError'
obj))))))))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'
parseJSON = String
-> (Object -> Parser InvoiceLastFinalizationError')
-> Value
-> Parser InvoiceLastFinalizationError'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLastFinalizationError'" (\Object
obj -> ((((((((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe PaymentIntent
 -> Maybe PaymentMethod
 -> Maybe Text
 -> Maybe SetupIntent
 -> Maybe InvoiceLastFinalizationError'Source'
 -> Maybe InvoiceLastFinalizationError'Type'
 -> InvoiceLastFinalizationError')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PaymentIntent
-> Maybe PaymentMethod
-> Maybe Text
-> Maybe SetupIntent
-> Maybe InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'
InvoiceLastFinalizationError' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"charge")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"code")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"decline_code")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"doc_url")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"message")) Parser
  (Maybe Text
   -> Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe PaymentIntent
      -> Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"param")) Parser
  (Maybe PaymentIntent
   -> Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe PaymentIntent)
-> Parser
     (Maybe PaymentMethod
      -> Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe PaymentIntent)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"payment_intent")) Parser
  (Maybe PaymentMethod
   -> Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe PaymentMethod)
-> Parser
     (Maybe Text
      -> Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe PaymentMethod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"payment_method")) Parser
  (Maybe Text
   -> Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe Text)
-> Parser
     (Maybe SetupIntent
      -> Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"payment_method_type")) Parser
  (Maybe SetupIntent
   -> Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe SetupIntent)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'
      -> Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SetupIntent)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"setup_intent")) Parser
  (Maybe InvoiceLastFinalizationError'Source'
   -> Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe InvoiceLastFinalizationError'Type'
      -> InvoiceLastFinalizationError')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe InvoiceLastFinalizationError'Source')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"source")) Parser
  (Maybe InvoiceLastFinalizationError'Type'
   -> InvoiceLastFinalizationError')
-> Parser (Maybe InvoiceLastFinalizationError'Type')
-> Parser InvoiceLastFinalizationError'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe InvoiceLastFinalizationError'Type')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type"))

-- | Create a new 'InvoiceLastFinalizationError'' with all required fields.
mkInvoiceLastFinalizationError' :: InvoiceLastFinalizationError'
mkInvoiceLastFinalizationError' :: InvoiceLastFinalizationError'
mkInvoiceLastFinalizationError' =
  InvoiceLastFinalizationError' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PaymentIntent
-> Maybe PaymentMethod
-> Maybe Text
-> Maybe SetupIntent
-> Maybe InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'
InvoiceLastFinalizationError'
    { invoiceLastFinalizationError'Charge :: Maybe Text
invoiceLastFinalizationError'Charge = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Code :: Maybe Text
invoiceLastFinalizationError'Code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'DeclineCode :: Maybe Text
invoiceLastFinalizationError'DeclineCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'DocUrl :: Maybe Text
invoiceLastFinalizationError'DocUrl = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Message :: Maybe Text
invoiceLastFinalizationError'Message = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Param :: Maybe Text
invoiceLastFinalizationError'Param = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'PaymentIntent :: Maybe PaymentIntent
invoiceLastFinalizationError'PaymentIntent = Maybe PaymentIntent
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'PaymentMethod :: Maybe PaymentMethod
invoiceLastFinalizationError'PaymentMethod = Maybe PaymentMethod
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'PaymentMethodType :: Maybe Text
invoiceLastFinalizationError'PaymentMethodType = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'SetupIntent :: Maybe SetupIntent
invoiceLastFinalizationError'SetupIntent = Maybe SetupIntent
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source :: Maybe InvoiceLastFinalizationError'Source'
invoiceLastFinalizationError'Source = Maybe InvoiceLastFinalizationError'Source'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Type :: Maybe InvoiceLastFinalizationError'Type'
invoiceLastFinalizationError'Type = Maybe InvoiceLastFinalizationError'Type'
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf@ in the specification.
--
-- The source object for errors returned on a request involving a source.
data InvoiceLastFinalizationError'Source' = InvoiceLastFinalizationError'Source'
  { -- | account: The ID of the account that the bank account is associated with.
    InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Account'Variants
invoiceLastFinalizationError'Source'Account :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Account'Variants),
    -- | account_holder_name: The name of the person or business that owns the bank account.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | account_holder_type: The type of entity that holds the account. This can be either \`individual\` or \`company\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | ach_credit_transfer
    InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeAchCreditTransfer
invoiceLastFinalizationError'Source'AchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer),
    -- | ach_debit
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAchDebit
invoiceLastFinalizationError'Source'AchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit),
    -- | acss_debit
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAcssDebit
invoiceLastFinalizationError'Source'AcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit),
    -- | address_city: City\/District\/Suburb\/Town\/Village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_country: Billing address country, if provided when creating card.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_line1: Address line 1 (Street address\/PO Box\/Company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_line1_check: If \`address_line1\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_state: State\/County\/Province\/Region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_zip: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | address_zip_check: If \`address_zip\` was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | alipay
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAlipay
invoiceLastFinalizationError'Source'Alipay :: (GHC.Maybe.Maybe SourceTypeAlipay),
    -- | amount: A positive integer in the smallest currency unit (that is, 100 cents for \$1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for \`single_use\` sources.
    InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Amount :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | au_becs_debit
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAuBecsDebit
invoiceLastFinalizationError'Source'AuBecsDebit :: (GHC.Maybe.Maybe SourceTypeAuBecsDebit),
    -- | available_payout_methods: A set of available payout methods for this bank account. Only values from this set should be passed as the \`method\` when creating a payout.
    InvoiceLastFinalizationError'Source'
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
invoiceLastFinalizationError'Source'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([InvoiceLastFinalizationError'Source'AvailablePayoutMethods'])),
    -- | bancontact
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeBancontact
invoiceLastFinalizationError'Source'Bancontact :: (GHC.Maybe.Maybe SourceTypeBancontact),
    -- | bank_name: Name of the bank associated with the routing number (e.g., \`WELLS FARGO\`).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'BankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | brand: Card brand. Can be \`American Express\`, \`Diners Club\`, \`Discover\`, \`JCB\`, \`MasterCard\`, \`UnionPay\`, \`Visa\`, or \`Unknown\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | card
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCard
invoiceLastFinalizationError'Source'Card :: (GHC.Maybe.Maybe SourceTypeCard),
    -- | card_present
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCardPresent
invoiceLastFinalizationError'Source'CardPresent :: (GHC.Maybe.Maybe SourceTypeCardPresent),
    -- | client_secret: The client secret of the source. Used for client-side retrieval using a publishable key.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'ClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | code_verification:
    InvoiceLastFinalizationError'Source'
-> Maybe SourceCodeVerificationFlow
invoiceLastFinalizationError'Source'CodeVerification :: (GHC.Maybe.Maybe SourceCodeVerificationFlow),
    -- | country: Two-letter ISO code representing the country the bank account is located in.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | created: Time at which the object was created. Measured in seconds since the Unix epoch.
    InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Created :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/payouts) paid out to the bank account.
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | customer: The ID of the customer that the bank account is associated with.
    InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
invoiceLastFinalizationError'Source'Customer :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Customer'Variants),
    -- | cvc_check: If a CVC was provided, results of the check: \`pass\`, \`fail\`, \`unavailable\`, or \`unchecked\`. A result of unchecked indicates that CVC was provided but hasn\'t been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https:\/\/support.stripe.com\/questions\/check-if-a-card-is-valid-without-a-charge).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'CvcCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | default_for_currency: Whether this bank account is the default external account for its currency.
    InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'DefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool),
    -- | dynamic_last4: (For tokenized numbers only.) The last four digits of the device account number.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'DynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | eps
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeEps
invoiceLastFinalizationError'Source'Eps :: (GHC.Maybe.Maybe SourceTypeEps),
    -- | exp_month: Two-digit number representing the card\'s expiration month.
    InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | exp_year: Four-digit number representing the card\'s expiration year.
    InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpYear :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | fingerprint: Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Fingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | flow: The authentication \`flow\` of the source. \`flow\` is one of \`redirect\`, \`receiver\`, \`code_verification\`, \`none\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Flow :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | funding: Card funding type. Can be \`credit\`, \`debit\`, \`prepaid\`, or \`unknown\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | giropay
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeGiropay
invoiceLastFinalizationError'Source'Giropay :: (GHC.Maybe.Maybe SourceTypeGiropay),
    -- | id: Unique identifier for the object.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | ideal
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeIdeal
invoiceLastFinalizationError'Source'Ideal :: (GHC.Maybe.Maybe SourceTypeIdeal),
    -- | klarna
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeKlarna
invoiceLastFinalizationError'Source'Klarna :: (GHC.Maybe.Maybe SourceTypeKlarna),
    -- | last4: The last four digits of the bank account number.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Last4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.
    InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'Livemode :: (GHC.Maybe.Maybe GHC.Types.Bool),
    -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    InvoiceLastFinalizationError'Source' -> Maybe Object
invoiceLastFinalizationError'Source'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
    -- | multibanco
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeMultibanco
invoiceLastFinalizationError'Source'Multibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco),
    -- | name: Cardholder name.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types.
    InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Owner'
invoiceLastFinalizationError'Source'Owner :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Owner'),
    -- | p24
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeP24
invoiceLastFinalizationError'Source'P24 :: (GHC.Maybe.Maybe SourceTypeP24),
    -- | receiver:
    InvoiceLastFinalizationError'Source' -> Maybe SourceReceiverFlow
invoiceLastFinalizationError'Source'Receiver :: (GHC.Maybe.Maybe SourceReceiverFlow),
    -- | recipient: The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
    InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
invoiceLastFinalizationError'Source'Recipient :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Recipient'Variants),
    -- | redirect:
    InvoiceLastFinalizationError'Source' -> Maybe SourceRedirectFlow
invoiceLastFinalizationError'Source'Redirect :: (GHC.Maybe.Maybe SourceRedirectFlow),
    -- | routing_number: The routing transit number for the bank account.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | sepa_debit
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSepaDebit
invoiceLastFinalizationError'Source'SepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit),
    -- | sofort
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSofort
invoiceLastFinalizationError'Source'Sofort :: (GHC.Maybe.Maybe SourceTypeSofort),
    -- | source_order:
    InvoiceLastFinalizationError'Source' -> Maybe SourceOrder
invoiceLastFinalizationError'Source'SourceOrder :: (GHC.Maybe.Maybe SourceOrder),
    -- | statement_descriptor: Extra information about a source. This will appear on your customer\'s statement every time you charge the source.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'StatementDescriptor :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | status: For bank accounts, possible values are \`new\`, \`validated\`, \`verified\`, \`verification_failed\`, or \`errored\`. A bank account that hasn\'t had any activity or validation performed is \`new\`. If Stripe can determine that the bank account exists, its status will be \`validated\`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be \`verified\`. If the verification failed for any reason, such as microdeposit failure, the status will be \`verification_failed\`. If a transfer sent to this bank account fails, we\'ll set the status to \`errored\` and will not continue to send transfers until the bank details are updated.
    --
    -- For external accounts, possible values are \`new\` and \`errored\`. Validations aren\'t run against external accounts because they\'re only used for payouts. This means the other statuses don\'t apply. If a transfer fails, the status is set to \`errored\` and transfers are stopped until account details are updated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | three_d_secure
    InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeThreeDSecure
invoiceLastFinalizationError'Source'ThreeDSecure :: (GHC.Maybe.Maybe SourceTypeThreeDSecure),
    -- | tokenization_method: If the card number is tokenized, this is the method that was used. Can be \`android_pay\` (includes Google Pay), \`apple_pay\`, \`masterpass\`, \`visa_checkout\`, or null.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'TokenizationMethod :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | type: The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used.
    InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Type'
invoiceLastFinalizationError'Source'Type :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Type'),
    -- | usage: Either \`reusable\` or \`single_use\`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Usage :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | wechat
    InvoiceLastFinalizationError'Source' -> Maybe SourceTypeWechat
invoiceLastFinalizationError'Source'Wechat :: (GHC.Maybe.Maybe SourceTypeWechat)
  }
  deriving
    ( Int -> InvoiceLastFinalizationError'Source' -> ShowS
[InvoiceLastFinalizationError'Source'] -> ShowS
InvoiceLastFinalizationError'Source' -> String
(Int -> InvoiceLastFinalizationError'Source' -> ShowS)
-> (InvoiceLastFinalizationError'Source' -> String)
-> ([InvoiceLastFinalizationError'Source'] -> ShowS)
-> Show InvoiceLastFinalizationError'Source'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'] -> ShowS
show :: InvoiceLastFinalizationError'Source' -> String
$cshow :: InvoiceLastFinalizationError'Source' -> String
showsPrec :: Int -> InvoiceLastFinalizationError'Source' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError'Source' -> ShowS
GHC.Show.Show,
      InvoiceLastFinalizationError'Source'
-> InvoiceLastFinalizationError'Source' -> Bool
(InvoiceLastFinalizationError'Source'
 -> InvoiceLastFinalizationError'Source' -> Bool)
-> (InvoiceLastFinalizationError'Source'
    -> InvoiceLastFinalizationError'Source' -> Bool)
-> Eq InvoiceLastFinalizationError'Source'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'
-> InvoiceLastFinalizationError'Source' -> Bool
$c/= :: InvoiceLastFinalizationError'Source'
-> InvoiceLastFinalizationError'Source' -> Bool
== :: InvoiceLastFinalizationError'Source'
-> InvoiceLastFinalizationError'Source' -> Bool
$c== :: InvoiceLastFinalizationError'Source'
-> InvoiceLastFinalizationError'Source' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source' where
  toJSON :: InvoiceLastFinalizationError'Source' -> Value
toJSON InvoiceLastFinalizationError'Source'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"account" Text
-> Maybe InvoiceLastFinalizationError'Source'Account'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Account'Variants
invoiceLastFinalizationError'Source'Account InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderName InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_type" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderType InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ach_credit_transfer" Text -> Maybe SourceTypeAchCreditTransfer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeAchCreditTransfer
invoiceLastFinalizationError'Source'AchCreditTransfer InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ach_debit" Text -> Maybe SourceTypeAchDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAchDebit
invoiceLastFinalizationError'Source'AchDebit InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"acss_debit" Text -> Maybe SourceTypeAcssDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAcssDebit
invoiceLastFinalizationError'Source'AcssDebit InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCity InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCountry InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1 InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line1_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1Check InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine2 InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressState InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZip InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZipCheck InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"alipay" Text -> Maybe SourceTypeAlipay -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAlipay
invoiceLastFinalizationError'Source'Alipay InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Amount InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"au_becs_debit" Text -> Maybe SourceTypeAuBecsDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAuBecsDebit
invoiceLastFinalizationError'Source'AuBecsDebit InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"available_payout_methods" Text
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
invoiceLastFinalizationError'Source'AvailablePayoutMethods InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bancontact" Text -> Maybe SourceTypeBancontact -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeBancontact
invoiceLastFinalizationError'Source'Bancontact InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bank_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'BankName InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"brand" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Brand InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"card" Text -> Maybe SourceTypeCard -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCard
invoiceLastFinalizationError'Source'Card InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"card_present" Text -> Maybe SourceTypeCardPresent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCardPresent
invoiceLastFinalizationError'Source'CardPresent InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"client_secret" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'ClientSecret InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"code_verification" Text -> Maybe SourceCodeVerificationFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceCodeVerificationFlow
invoiceLastFinalizationError'Source'CodeVerification InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Country InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Created InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Currency InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
invoiceLastFinalizationError'Source'Customer InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cvc_check" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'CvcCheck InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_for_currency" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'DefaultForCurrency InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"dynamic_last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'DynamicLast4 InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"eps" Text -> Maybe SourceTypeEps -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeEps
invoiceLastFinalizationError'Source'Eps InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_month" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpMonth InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_year" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpYear InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fingerprint" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Fingerprint InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"flow" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Flow InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"funding" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Funding InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"giropay" Text -> Maybe SourceTypeGiropay -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeGiropay
invoiceLastFinalizationError'Source'Giropay InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Id InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"ideal" Text -> Maybe SourceTypeIdeal -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeIdeal
invoiceLastFinalizationError'Source'Ideal InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"klarna" Text -> Maybe SourceTypeKlarna -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeKlarna
invoiceLastFinalizationError'Source'Klarna InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Last4 InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'Livemode InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Object
invoiceLastFinalizationError'Source'Metadata InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"multibanco" Text -> Maybe SourceTypeMultibanco -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeMultibanco
invoiceLastFinalizationError'Source'Multibanco InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Name InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"owner" Text -> Maybe InvoiceLastFinalizationError'Source'Owner' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Owner'
invoiceLastFinalizationError'Source'Owner InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"p24" Text -> Maybe SourceTypeP24 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeP24
invoiceLastFinalizationError'Source'P24 InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"receiver" Text -> Maybe SourceReceiverFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceReceiverFlow
invoiceLastFinalizationError'Source'Receiver InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"recipient" Text
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
invoiceLastFinalizationError'Source'Recipient InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"redirect" Text -> Maybe SourceRedirectFlow -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceRedirectFlow
invoiceLastFinalizationError'Source'Redirect InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"routing_number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'RoutingNumber InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"sepa_debit" Text -> Maybe SourceTypeSepaDebit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSepaDebit
invoiceLastFinalizationError'Source'SepaDebit InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"sofort" Text -> Maybe SourceTypeSofort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSofort
invoiceLastFinalizationError'Source'Sofort InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"source_order" Text -> Maybe SourceOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceOrder
invoiceLastFinalizationError'Source'SourceOrder InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"statement_descriptor" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'StatementDescriptor InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Status InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"three_d_secure" Text -> Maybe SourceTypeThreeDSecure -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeThreeDSecure
invoiceLastFinalizationError'Source'ThreeDSecure InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tokenization_method" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'TokenizationMethod InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Maybe InvoiceLastFinalizationError'Source'Type' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Type'
invoiceLastFinalizationError'Source'Type InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"usage" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Usage InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"wechat" Text -> Maybe SourceTypeWechat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeWechat
invoiceLastFinalizationError'Source'Wechat InvoiceLastFinalizationError'Source'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLastFinalizationError'Source' -> Encoding
toEncoding InvoiceLastFinalizationError'Source'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"account" Text
-> Maybe InvoiceLastFinalizationError'Source'Account'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Account'Variants
invoiceLastFinalizationError'Source'Account InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderName InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_type" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AccountHolderType InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ach_credit_transfer" Text -> Maybe SourceTypeAchCreditTransfer -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeAchCreditTransfer
invoiceLastFinalizationError'Source'AchCreditTransfer InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ach_debit" Text -> Maybe SourceTypeAchDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAchDebit
invoiceLastFinalizationError'Source'AchDebit InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"acss_debit" Text -> Maybe SourceTypeAcssDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAcssDebit
invoiceLastFinalizationError'Source'AcssDebit InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCity InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressCountry InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1 InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line1_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine1Check InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressLine2 InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressState InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZip InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'AddressZipCheck InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"alipay" Text -> Maybe SourceTypeAlipay -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAlipay
invoiceLastFinalizationError'Source'Alipay InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Amount InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"au_becs_debit" Text -> Maybe SourceTypeAuBecsDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeAuBecsDebit
invoiceLastFinalizationError'Source'AuBecsDebit InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"available_payout_methods" Text
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
invoiceLastFinalizationError'Source'AvailablePayoutMethods InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bancontact" Text -> Maybe SourceTypeBancontact -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeBancontact
invoiceLastFinalizationError'Source'Bancontact InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bank_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'BankName InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"brand" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Brand InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"card" Text -> Maybe SourceTypeCard -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCard
invoiceLastFinalizationError'Source'Card InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"card_present" Text -> Maybe SourceTypeCardPresent -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeCardPresent
invoiceLastFinalizationError'Source'CardPresent InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"client_secret" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'ClientSecret InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"code_verification" Text -> Maybe SourceCodeVerificationFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceCodeVerificationFlow
invoiceLastFinalizationError'Source'CodeVerification InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Country InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'Created InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Currency InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
invoiceLastFinalizationError'Source'Customer InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cvc_check" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'CvcCheck InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_for_currency" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'DefaultForCurrency InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"dynamic_last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'DynamicLast4 InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"eps" Text -> Maybe SourceTypeEps -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeEps
invoiceLastFinalizationError'Source'Eps InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_month" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpMonth InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_year" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Int
invoiceLastFinalizationError'Source'ExpYear InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fingerprint" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Fingerprint InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"flow" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Flow InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"funding" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Funding InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"giropay" Text -> Maybe SourceTypeGiropay -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeGiropay
invoiceLastFinalizationError'Source'Giropay InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Id InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"ideal" Text -> Maybe SourceTypeIdeal -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeIdeal
invoiceLastFinalizationError'Source'Ideal InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"klarna" Text -> Maybe SourceTypeKlarna -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeKlarna
invoiceLastFinalizationError'Source'Klarna InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Last4 InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Bool
invoiceLastFinalizationError'Source'Livemode InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Object
invoiceLastFinalizationError'Source'Metadata InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"multibanco" Text -> Maybe SourceTypeMultibanco -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeMultibanco
invoiceLastFinalizationError'Source'Multibanco InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Name InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"owner" Text -> Maybe InvoiceLastFinalizationError'Source'Owner' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Owner'
invoiceLastFinalizationError'Source'Owner InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"p24" Text -> Maybe SourceTypeP24 -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeP24
invoiceLastFinalizationError'Source'P24 InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"receiver" Text -> Maybe SourceReceiverFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceReceiverFlow
invoiceLastFinalizationError'Source'Receiver InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"recipient" Text
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
invoiceLastFinalizationError'Source'Recipient InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"redirect" Text -> Maybe SourceRedirectFlow -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceRedirectFlow
invoiceLastFinalizationError'Source'Redirect InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"routing_number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'RoutingNumber InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"sepa_debit" Text -> Maybe SourceTypeSepaDebit -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSepaDebit
invoiceLastFinalizationError'Source'SepaDebit InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"sofort" Text -> Maybe SourceTypeSofort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeSofort
invoiceLastFinalizationError'Source'Sofort InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"source_order" Text -> Maybe SourceOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceOrder
invoiceLastFinalizationError'Source'SourceOrder InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"statement_descriptor" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'StatementDescriptor InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Status InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"three_d_secure" Text -> Maybe SourceTypeThreeDSecure -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe SourceTypeThreeDSecure
invoiceLastFinalizationError'Source'ThreeDSecure InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tokenization_method" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'TokenizationMethod InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> Maybe InvoiceLastFinalizationError'Source'Type' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'
-> Maybe InvoiceLastFinalizationError'Source'Type'
invoiceLastFinalizationError'Source'Type InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"usage" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe Text
invoiceLastFinalizationError'Source'Usage InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"wechat" Text -> Maybe SourceTypeWechat -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source' -> Maybe SourceTypeWechat
invoiceLastFinalizationError'Source'Wechat InvoiceLastFinalizationError'Source'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'Source'
parseJSON = String
-> (Object -> Parser InvoiceLastFinalizationError'Source')
-> Value
-> Parser InvoiceLastFinalizationError'Source'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLastFinalizationError'Source'" (\Object
obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((Maybe InvoiceLastFinalizationError'Source'Account'Variants
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeAchCreditTransfer
 -> Maybe SourceTypeAchDebit
 -> Maybe SourceTypeAcssDebit
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeAlipay
 -> Maybe Int
 -> Maybe SourceTypeAuBecsDebit
 -> Maybe
      [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
 -> Maybe SourceTypeBancontact
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeCard
 -> Maybe SourceTypeCardPresent
 -> Maybe Text
 -> Maybe SourceCodeVerificationFlow
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe SourceTypeEps
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeGiropay
 -> Maybe Text
 -> Maybe SourceTypeIdeal
 -> Maybe SourceTypeKlarna
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Object
 -> Maybe SourceTypeMultibanco
 -> Maybe Text
 -> Maybe InvoiceLastFinalizationError'Source'Owner'
 -> Maybe SourceTypeP24
 -> Maybe SourceReceiverFlow
 -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
 -> Maybe SourceRedirectFlow
 -> Maybe Text
 -> Maybe SourceTypeSepaDebit
 -> Maybe SourceTypeSofort
 -> Maybe SourceOrder
 -> Maybe Text
 -> Maybe Text
 -> Maybe SourceTypeThreeDSecure
 -> Maybe Text
 -> Maybe InvoiceLastFinalizationError'Source'Type'
 -> Maybe Text
 -> Maybe SourceTypeWechat
 -> InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Account'Variants
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAchCreditTransfer
      -> Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe InvoiceLastFinalizationError'Source'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeAchCreditTransfer
-> Maybe SourceTypeAchDebit
-> Maybe SourceTypeAcssDebit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeAlipay
-> Maybe Int
-> Maybe SourceTypeAuBecsDebit
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> Maybe SourceTypeBancontact
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeCard
-> Maybe SourceTypeCardPresent
-> Maybe Text
-> Maybe SourceCodeVerificationFlow
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe SourceTypeEps
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeGiropay
-> Maybe Text
-> Maybe SourceTypeIdeal
-> Maybe SourceTypeKlarna
-> Maybe Text
-> Maybe Bool
-> Maybe Object
-> Maybe SourceTypeMultibanco
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'
-> Maybe SourceTypeP24
-> Maybe SourceReceiverFlow
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
-> Maybe SourceRedirectFlow
-> Maybe Text
-> Maybe SourceTypeSepaDebit
-> Maybe SourceTypeSofort
-> Maybe SourceOrder
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeThreeDSecure
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Type'
-> Maybe Text
-> Maybe SourceTypeWechat
-> InvoiceLastFinalizationError'Source'
InvoiceLastFinalizationError'Source' Parser
  (Maybe InvoiceLastFinalizationError'Source'Account'Variants
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAchCreditTransfer
   -> Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Account'Variants)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAchCreditTransfer
      -> Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Account'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAchCreditTransfer
   -> Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeAchCreditTransfer
      -> Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_holder_name")) Parser
  (Maybe Text
   -> Maybe SourceTypeAchCreditTransfer
   -> Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeAchCreditTransfer
      -> Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_holder_type")) Parser
  (Maybe SourceTypeAchCreditTransfer
   -> Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeAchCreditTransfer)
-> Parser
     (Maybe SourceTypeAchDebit
      -> Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAchCreditTransfer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ach_credit_transfer")) Parser
  (Maybe SourceTypeAchDebit
   -> Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeAchDebit)
-> Parser
     (Maybe SourceTypeAcssDebit
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAchDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ach_debit")) Parser
  (Maybe SourceTypeAcssDebit
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeAcssDebit)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAcssDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"acss_debit")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line1")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line1_check")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_line2")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_state")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_zip")) Parser
  (Maybe Text
   -> Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeAlipay
      -> Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address_zip_check")) Parser
  (Maybe SourceTypeAlipay
   -> Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeAlipay)
-> Parser
     (Maybe Int
      -> Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAlipay)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"alipay")) Parser
  (Maybe Int
   -> Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Int)
-> Parser
     (Maybe SourceTypeAuBecsDebit
      -> Maybe
           [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"amount")) Parser
  (Maybe SourceTypeAuBecsDebit
   -> Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeAuBecsDebit)
-> Parser
     (Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
      -> Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeAuBecsDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"au_becs_debit")) Parser
  (Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
   -> Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods'])
-> Parser
     (Maybe SourceTypeBancontact
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe
        [InvoiceLastFinalizationError'Source'AvailablePayoutMethods'])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"available_payout_methods")) Parser
  (Maybe SourceTypeBancontact
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeBancontact)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeBancontact)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bancontact")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"bank_name")) Parser
  (Maybe Text
   -> Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeCard
      -> Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"brand")) Parser
  (Maybe SourceTypeCard
   -> Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeCard)
-> Parser
     (Maybe SourceTypeCardPresent
      -> Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeCard)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"card")) Parser
  (Maybe SourceTypeCardPresent
   -> Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeCardPresent)
-> Parser
     (Maybe Text
      -> Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeCardPresent)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"card_present")) Parser
  (Maybe Text
   -> Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceCodeVerificationFlow
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"client_secret")) Parser
  (Maybe SourceCodeVerificationFlow
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceCodeVerificationFlow)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceCodeVerificationFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"code_verification")) Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"country")) Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"created")) Parser
  (Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Customer'Variants
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"currency")) Parser
  (Maybe InvoiceLastFinalizationError'Source'Customer'Variants
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Customer'Variants)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Customer'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"cvc_check")) Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"default_for_currency")) Parser
  (Maybe Text
   -> Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeEps
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"dynamic_last4")) Parser
  (Maybe SourceTypeEps
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeEps)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeEps)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"eps")) Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"exp_month")) Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"exp_year")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"fingerprint")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"flow")) Parser
  (Maybe Text
   -> Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeGiropay
      -> Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"funding")) Parser
  (Maybe SourceTypeGiropay
   -> Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeGiropay)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeGiropay)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"giropay")) Parser
  (Maybe Text
   -> Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeIdeal
      -> Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
  (Maybe SourceTypeIdeal
   -> Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeIdeal)
-> Parser
     (Maybe SourceTypeKlarna
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeIdeal)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"ideal")) Parser
  (Maybe SourceTypeKlarna
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeKlarna)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeKlarna)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"klarna")) Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"last4")) Parser
  (Maybe Bool
   -> Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Bool)
-> Parser
     (Maybe Object
      -> Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"livemode")) Parser
  (Maybe Object
   -> Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Object)
-> Parser
     (Maybe SourceTypeMultibanco
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
  (Maybe SourceTypeMultibanco
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeMultibanco)
-> Parser
     (Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeMultibanco)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"multibanco")) Parser
  (Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'
      -> Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"name")) Parser
  (Maybe InvoiceLastFinalizationError'Source'Owner'
   -> Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe InvoiceLastFinalizationError'Source'Owner')
-> Parser
     (Maybe SourceTypeP24
      -> Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe InvoiceLastFinalizationError'Source'Owner')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"owner")) Parser
  (Maybe SourceTypeP24
   -> Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeP24)
-> Parser
     (Maybe SourceReceiverFlow
      -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeP24)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"p24")) Parser
  (Maybe SourceReceiverFlow
   -> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceReceiverFlow)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
      -> Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceReceiverFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"receiver")) Parser
  (Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
   -> Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Recipient'Variants)
-> Parser
     (Maybe SourceRedirectFlow
      -> Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Recipient'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"recipient")) Parser
  (Maybe SourceRedirectFlow
   -> Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceRedirectFlow)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceRedirectFlow)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"redirect")) Parser
  (Maybe Text
   -> Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeSepaDebit
      -> Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"routing_number")) Parser
  (Maybe SourceTypeSepaDebit
   -> Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeSepaDebit)
-> Parser
     (Maybe SourceTypeSofort
      -> Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeSepaDebit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"sepa_debit")) Parser
  (Maybe SourceTypeSofort
   -> Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeSofort)
-> Parser
     (Maybe SourceOrder
      -> Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeSofort)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"sofort")) Parser
  (Maybe SourceOrder
   -> Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceOrder)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceOrder)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"source_order")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"statement_descriptor")) Parser
  (Maybe Text
   -> Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeThreeDSecure
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"status")) Parser
  (Maybe SourceTypeThreeDSecure
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeThreeDSecure)
-> Parser
     (Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeThreeDSecure)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"three_d_secure")) Parser
  (Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Type'
      -> Maybe Text
      -> Maybe SourceTypeWechat
      -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tokenization_method")) Parser
  (Maybe InvoiceLastFinalizationError'Source'Type'
   -> Maybe Text
   -> Maybe SourceTypeWechat
   -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe InvoiceLastFinalizationError'Source'Type')
-> Parser
     (Maybe Text
      -> Maybe SourceTypeWechat -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe InvoiceLastFinalizationError'Source'Type')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type")) Parser
  (Maybe Text
   -> Maybe SourceTypeWechat -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe Text)
-> Parser
     (Maybe SourceTypeWechat -> InvoiceLastFinalizationError'Source')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"usage")) Parser
  (Maybe SourceTypeWechat -> InvoiceLastFinalizationError'Source')
-> Parser (Maybe SourceTypeWechat)
-> Parser InvoiceLastFinalizationError'Source'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe SourceTypeWechat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"wechat"))

-- | Create a new 'InvoiceLastFinalizationError'Source'' with all required fields.
mkInvoiceLastFinalizationError'Source' :: InvoiceLastFinalizationError'Source'
mkInvoiceLastFinalizationError'Source' :: InvoiceLastFinalizationError'Source'
mkInvoiceLastFinalizationError'Source' =
  InvoiceLastFinalizationError'Source' :: Maybe InvoiceLastFinalizationError'Source'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeAchCreditTransfer
-> Maybe SourceTypeAchDebit
-> Maybe SourceTypeAcssDebit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeAlipay
-> Maybe Int
-> Maybe SourceTypeAuBecsDebit
-> Maybe
     [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> Maybe SourceTypeBancontact
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeCard
-> Maybe SourceTypeCardPresent
-> Maybe Text
-> Maybe SourceCodeVerificationFlow
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Customer'Variants
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe SourceTypeEps
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeGiropay
-> Maybe Text
-> Maybe SourceTypeIdeal
-> Maybe SourceTypeKlarna
-> Maybe Text
-> Maybe Bool
-> Maybe Object
-> Maybe SourceTypeMultibanco
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'
-> Maybe SourceTypeP24
-> Maybe SourceReceiverFlow
-> Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
-> Maybe SourceRedirectFlow
-> Maybe Text
-> Maybe SourceTypeSepaDebit
-> Maybe SourceTypeSofort
-> Maybe SourceOrder
-> Maybe Text
-> Maybe Text
-> Maybe SourceTypeThreeDSecure
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Type'
-> Maybe Text
-> Maybe SourceTypeWechat
-> InvoiceLastFinalizationError'Source'
InvoiceLastFinalizationError'Source'
    { invoiceLastFinalizationError'Source'Account :: Maybe InvoiceLastFinalizationError'Source'Account'Variants
invoiceLastFinalizationError'Source'Account = Maybe InvoiceLastFinalizationError'Source'Account'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AccountHolderName :: Maybe Text
invoiceLastFinalizationError'Source'AccountHolderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AccountHolderType :: Maybe Text
invoiceLastFinalizationError'Source'AccountHolderType = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AchCreditTransfer :: Maybe SourceTypeAchCreditTransfer
invoiceLastFinalizationError'Source'AchCreditTransfer = Maybe SourceTypeAchCreditTransfer
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AchDebit :: Maybe SourceTypeAchDebit
invoiceLastFinalizationError'Source'AchDebit = Maybe SourceTypeAchDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AcssDebit :: Maybe SourceTypeAcssDebit
invoiceLastFinalizationError'Source'AcssDebit = Maybe SourceTypeAcssDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressCity :: Maybe Text
invoiceLastFinalizationError'Source'AddressCity = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressCountry :: Maybe Text
invoiceLastFinalizationError'Source'AddressCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressLine1 :: Maybe Text
invoiceLastFinalizationError'Source'AddressLine1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressLine1Check :: Maybe Text
invoiceLastFinalizationError'Source'AddressLine1Check = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressLine2 :: Maybe Text
invoiceLastFinalizationError'Source'AddressLine2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressState :: Maybe Text
invoiceLastFinalizationError'Source'AddressState = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressZip :: Maybe Text
invoiceLastFinalizationError'Source'AddressZip = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AddressZipCheck :: Maybe Text
invoiceLastFinalizationError'Source'AddressZipCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Alipay :: Maybe SourceTypeAlipay
invoiceLastFinalizationError'Source'Alipay = Maybe SourceTypeAlipay
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Amount :: Maybe Int
invoiceLastFinalizationError'Source'Amount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AuBecsDebit :: Maybe SourceTypeAuBecsDebit
invoiceLastFinalizationError'Source'AuBecsDebit = Maybe SourceTypeAuBecsDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'AvailablePayoutMethods :: Maybe [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
invoiceLastFinalizationError'Source'AvailablePayoutMethods = Maybe [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Bancontact :: Maybe SourceTypeBancontact
invoiceLastFinalizationError'Source'Bancontact = Maybe SourceTypeBancontact
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'BankName :: Maybe Text
invoiceLastFinalizationError'Source'BankName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Brand :: Maybe Text
invoiceLastFinalizationError'Source'Brand = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Card :: Maybe SourceTypeCard
invoiceLastFinalizationError'Source'Card = Maybe SourceTypeCard
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'CardPresent :: Maybe SourceTypeCardPresent
invoiceLastFinalizationError'Source'CardPresent = Maybe SourceTypeCardPresent
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'ClientSecret :: Maybe Text
invoiceLastFinalizationError'Source'ClientSecret = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'CodeVerification :: Maybe SourceCodeVerificationFlow
invoiceLastFinalizationError'Source'CodeVerification = Maybe SourceCodeVerificationFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Country :: Maybe Text
invoiceLastFinalizationError'Source'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Created :: Maybe Int
invoiceLastFinalizationError'Source'Created = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Currency :: Maybe Text
invoiceLastFinalizationError'Source'Currency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Customer :: Maybe InvoiceLastFinalizationError'Source'Customer'Variants
invoiceLastFinalizationError'Source'Customer = Maybe InvoiceLastFinalizationError'Source'Customer'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'CvcCheck :: Maybe Text
invoiceLastFinalizationError'Source'CvcCheck = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'DefaultForCurrency :: Maybe Bool
invoiceLastFinalizationError'Source'DefaultForCurrency = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'DynamicLast4 :: Maybe Text
invoiceLastFinalizationError'Source'DynamicLast4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Eps :: Maybe SourceTypeEps
invoiceLastFinalizationError'Source'Eps = Maybe SourceTypeEps
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'ExpMonth :: Maybe Int
invoiceLastFinalizationError'Source'ExpMonth = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'ExpYear :: Maybe Int
invoiceLastFinalizationError'Source'ExpYear = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Fingerprint :: Maybe Text
invoiceLastFinalizationError'Source'Fingerprint = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Flow :: Maybe Text
invoiceLastFinalizationError'Source'Flow = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Funding :: Maybe Text
invoiceLastFinalizationError'Source'Funding = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Giropay :: Maybe SourceTypeGiropay
invoiceLastFinalizationError'Source'Giropay = Maybe SourceTypeGiropay
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Id :: Maybe Text
invoiceLastFinalizationError'Source'Id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Ideal :: Maybe SourceTypeIdeal
invoiceLastFinalizationError'Source'Ideal = Maybe SourceTypeIdeal
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Klarna :: Maybe SourceTypeKlarna
invoiceLastFinalizationError'Source'Klarna = Maybe SourceTypeKlarna
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Last4 :: Maybe Text
invoiceLastFinalizationError'Source'Last4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Livemode :: Maybe Bool
invoiceLastFinalizationError'Source'Livemode = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Metadata :: Maybe Object
invoiceLastFinalizationError'Source'Metadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Multibanco :: Maybe SourceTypeMultibanco
invoiceLastFinalizationError'Source'Multibanco = Maybe SourceTypeMultibanco
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Name :: Maybe Text
invoiceLastFinalizationError'Source'Name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner :: Maybe InvoiceLastFinalizationError'Source'Owner'
invoiceLastFinalizationError'Source'Owner = Maybe InvoiceLastFinalizationError'Source'Owner'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'P24 :: Maybe SourceTypeP24
invoiceLastFinalizationError'Source'P24 = Maybe SourceTypeP24
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Receiver :: Maybe SourceReceiverFlow
invoiceLastFinalizationError'Source'Receiver = Maybe SourceReceiverFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Recipient :: Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
invoiceLastFinalizationError'Source'Recipient = Maybe InvoiceLastFinalizationError'Source'Recipient'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Redirect :: Maybe SourceRedirectFlow
invoiceLastFinalizationError'Source'Redirect = Maybe SourceRedirectFlow
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'RoutingNumber :: Maybe Text
invoiceLastFinalizationError'Source'RoutingNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'SepaDebit :: Maybe SourceTypeSepaDebit
invoiceLastFinalizationError'Source'SepaDebit = Maybe SourceTypeSepaDebit
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Sofort :: Maybe SourceTypeSofort
invoiceLastFinalizationError'Source'Sofort = Maybe SourceTypeSofort
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'SourceOrder :: Maybe SourceOrder
invoiceLastFinalizationError'Source'SourceOrder = Maybe SourceOrder
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'StatementDescriptor :: Maybe Text
invoiceLastFinalizationError'Source'StatementDescriptor = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Status :: Maybe Text
invoiceLastFinalizationError'Source'Status = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'ThreeDSecure :: Maybe SourceTypeThreeDSecure
invoiceLastFinalizationError'Source'ThreeDSecure = Maybe SourceTypeThreeDSecure
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'TokenizationMethod :: Maybe Text
invoiceLastFinalizationError'Source'TokenizationMethod = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Type :: Maybe InvoiceLastFinalizationError'Source'Type'
invoiceLastFinalizationError'Source'Type = Maybe InvoiceLastFinalizationError'Source'Type'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Usage :: Maybe Text
invoiceLastFinalizationError'Source'Usage = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Wechat :: Maybe SourceTypeWechat
invoiceLastFinalizationError'Source'Wechat = Maybe SourceTypeWechat
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.account.anyOf@ in the specification.
--
-- The ID of the account that the bank account is associated with.
data InvoiceLastFinalizationError'Source'Account'Variants
  = InvoiceLastFinalizationError'Source'Account'Text Data.Text.Internal.Text
  | InvoiceLastFinalizationError'Source'Account'Account Account
  deriving (Int
-> InvoiceLastFinalizationError'Source'Account'Variants -> ShowS
[InvoiceLastFinalizationError'Source'Account'Variants] -> ShowS
InvoiceLastFinalizationError'Source'Account'Variants -> String
(Int
 -> InvoiceLastFinalizationError'Source'Account'Variants -> ShowS)
-> (InvoiceLastFinalizationError'Source'Account'Variants -> String)
-> ([InvoiceLastFinalizationError'Source'Account'Variants]
    -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Account'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Account'Variants] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Account'Variants] -> ShowS
show :: InvoiceLastFinalizationError'Source'Account'Variants -> String
$cshow :: InvoiceLastFinalizationError'Source'Account'Variants -> String
showsPrec :: Int
-> InvoiceLastFinalizationError'Source'Account'Variants -> ShowS
$cshowsPrec :: Int
-> InvoiceLastFinalizationError'Source'Account'Variants -> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Source'Account'Variants
-> InvoiceLastFinalizationError'Source'Account'Variants -> Bool
(InvoiceLastFinalizationError'Source'Account'Variants
 -> InvoiceLastFinalizationError'Source'Account'Variants -> Bool)
-> (InvoiceLastFinalizationError'Source'Account'Variants
    -> InvoiceLastFinalizationError'Source'Account'Variants -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Account'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Account'Variants
-> InvoiceLastFinalizationError'Source'Account'Variants -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Account'Variants
-> InvoiceLastFinalizationError'Source'Account'Variants -> Bool
== :: InvoiceLastFinalizationError'Source'Account'Variants
-> InvoiceLastFinalizationError'Source'Account'Variants -> Bool
$c== :: InvoiceLastFinalizationError'Source'Account'Variants
-> InvoiceLastFinalizationError'Source'Account'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Account'Variants where
  toJSON :: InvoiceLastFinalizationError'Source'Account'Variants -> Value
toJSON (InvoiceLastFinalizationError'Source'Account'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceLastFinalizationError'Source'Account'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Account'Variants where
  parseJSON :: Value
-> Parser InvoiceLastFinalizationError'Source'Account'Variants
parseJSON Value
val = case (Text -> InvoiceLastFinalizationError'Source'Account'Variants
InvoiceLastFinalizationError'Source'Account'Text (Text -> InvoiceLastFinalizationError'Source'Account'Variants)
-> Result Text
-> Result InvoiceLastFinalizationError'Source'Account'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Account'Variants
-> Result InvoiceLastFinalizationError'Source'Account'Variants
-> Result InvoiceLastFinalizationError'Source'Account'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> InvoiceLastFinalizationError'Source'Account'Variants
InvoiceLastFinalizationError'Source'Account'Account (Account -> InvoiceLastFinalizationError'Source'Account'Variants)
-> Result Account
-> Result InvoiceLastFinalizationError'Source'Account'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Account'Variants
-> Result InvoiceLastFinalizationError'Source'Account'Variants
-> Result InvoiceLastFinalizationError'Source'Account'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result InvoiceLastFinalizationError'Source'Account'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceLastFinalizationError'Source'Account'Variants
a -> InvoiceLastFinalizationError'Source'Account'Variants
-> Parser InvoiceLastFinalizationError'Source'Account'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceLastFinalizationError'Source'Account'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String
-> Parser InvoiceLastFinalizationError'Source'Account'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the enum schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.available_payout_methods.items@ in the specification.
data InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"instant"@
    InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumInstant
  | -- | Represents the JSON value @"standard"@
    InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumStandard
  deriving (Int
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> ShowS
[InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> ShowS
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> String
(Int
 -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
 -> ShowS)
-> (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
    -> String)
-> ([InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
    -> ShowS)
-> Show InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'AvailablePayoutMethods']
-> ShowS
show :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> String
$cshow :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> String
showsPrec :: Int
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> ShowS
$cshowsPrec :: Int
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Bool
(InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
 -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
 -> Bool)
-> (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
    -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
    -> Bool)
-> Eq InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Bool
$c/= :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Bool
== :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Bool
$c== :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'AvailablePayoutMethods' where
  toJSON :: InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Value
toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Other Value
val) = Value
val
  toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumInstant) = Value
"instant"
  toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumStandard) = Value
"standard"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'AvailablePayoutMethods' where
  parseJSON :: Value
-> Parser
     InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
parseJSON Value
val =
    InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
-> Parser
     InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
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
"instant" -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumInstant
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"standard" -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumStandard
            | Bool
GHC.Base.otherwise -> Value
-> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'
InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Other Value
val
      )

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.customer.anyOf@ in the specification.
--
-- The ID of the customer that the bank account is associated with.
data InvoiceLastFinalizationError'Source'Customer'Variants
  = InvoiceLastFinalizationError'Source'Customer'Text Data.Text.Internal.Text
  | InvoiceLastFinalizationError'Source'Customer'Customer Customer
  | InvoiceLastFinalizationError'Source'Customer'DeletedCustomer DeletedCustomer
  deriving (Int
-> InvoiceLastFinalizationError'Source'Customer'Variants -> ShowS
[InvoiceLastFinalizationError'Source'Customer'Variants] -> ShowS
InvoiceLastFinalizationError'Source'Customer'Variants -> String
(Int
 -> InvoiceLastFinalizationError'Source'Customer'Variants -> ShowS)
-> (InvoiceLastFinalizationError'Source'Customer'Variants
    -> String)
-> ([InvoiceLastFinalizationError'Source'Customer'Variants]
    -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Customer'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Customer'Variants] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Customer'Variants] -> ShowS
show :: InvoiceLastFinalizationError'Source'Customer'Variants -> String
$cshow :: InvoiceLastFinalizationError'Source'Customer'Variants -> String
showsPrec :: Int
-> InvoiceLastFinalizationError'Source'Customer'Variants -> ShowS
$cshowsPrec :: Int
-> InvoiceLastFinalizationError'Source'Customer'Variants -> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Source'Customer'Variants
-> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool
(InvoiceLastFinalizationError'Source'Customer'Variants
 -> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool)
-> (InvoiceLastFinalizationError'Source'Customer'Variants
    -> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Customer'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Customer'Variants
-> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Customer'Variants
-> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool
== :: InvoiceLastFinalizationError'Source'Customer'Variants
-> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool
$c== :: InvoiceLastFinalizationError'Source'Customer'Variants
-> InvoiceLastFinalizationError'Source'Customer'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Customer'Variants where
  toJSON :: InvoiceLastFinalizationError'Source'Customer'Variants -> Value
toJSON (InvoiceLastFinalizationError'Source'Customer'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceLastFinalizationError'Source'Customer'Customer Customer
a) = Customer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Customer
a
  toJSON (InvoiceLastFinalizationError'Source'Customer'DeletedCustomer DeletedCustomer
a) = DeletedCustomer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedCustomer
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Customer'Variants where
  parseJSON :: Value
-> Parser InvoiceLastFinalizationError'Source'Customer'Variants
parseJSON Value
val = case (Text -> InvoiceLastFinalizationError'Source'Customer'Variants
InvoiceLastFinalizationError'Source'Customer'Text (Text -> InvoiceLastFinalizationError'Source'Customer'Variants)
-> Result Text
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Customer -> InvoiceLastFinalizationError'Source'Customer'Variants
InvoiceLastFinalizationError'Source'Customer'Customer (Customer -> InvoiceLastFinalizationError'Source'Customer'Variants)
-> Result Customer
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Customer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedCustomer
-> InvoiceLastFinalizationError'Source'Customer'Variants
InvoiceLastFinalizationError'Source'Customer'DeletedCustomer (DeletedCustomer
 -> InvoiceLastFinalizationError'Source'Customer'Variants)
-> Result DeletedCustomer
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedCustomer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result InvoiceLastFinalizationError'Source'Customer'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
    Data.Aeson.Types.Internal.Success InvoiceLastFinalizationError'Source'Customer'Variants
a -> InvoiceLastFinalizationError'Source'Customer'Variants
-> Parser InvoiceLastFinalizationError'Source'Customer'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceLastFinalizationError'Source'Customer'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String
-> Parser InvoiceLastFinalizationError'Source'Customer'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the object schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.owner.anyOf@ in the specification.
--
-- Information about the owner of the payment instrument that may be used or required by particular source types.
data InvoiceLastFinalizationError'Source'Owner' = InvoiceLastFinalizationError'Source'Owner'
  { -- | address: Owner\'s address.
    InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'Address'
invoiceLastFinalizationError'Source'Owner'Address :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Owner'Address'),
    -- | email: Owner\'s email address.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | name: Owner\'s full name.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | phone: Owner\'s phone number (including extension).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Phone :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_address: Verified owner\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
invoiceLastFinalizationError'Source'Owner'VerifiedAddress :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'),
    -- | verified_email: Verified owner\'s email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_name: Verified owner\'s full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | verified_phone: Verified owner\'s phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> InvoiceLastFinalizationError'Source'Owner' -> ShowS
[InvoiceLastFinalizationError'Source'Owner'] -> ShowS
InvoiceLastFinalizationError'Source'Owner' -> String
(Int -> InvoiceLastFinalizationError'Source'Owner' -> ShowS)
-> (InvoiceLastFinalizationError'Source'Owner' -> String)
-> ([InvoiceLastFinalizationError'Source'Owner'] -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Owner'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Owner'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Owner'] -> ShowS
show :: InvoiceLastFinalizationError'Source'Owner' -> String
$cshow :: InvoiceLastFinalizationError'Source'Owner' -> String
showsPrec :: Int -> InvoiceLastFinalizationError'Source'Owner' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError'Source'Owner' -> ShowS
GHC.Show.Show,
      InvoiceLastFinalizationError'Source'Owner'
-> InvoiceLastFinalizationError'Source'Owner' -> Bool
(InvoiceLastFinalizationError'Source'Owner'
 -> InvoiceLastFinalizationError'Source'Owner' -> Bool)
-> (InvoiceLastFinalizationError'Source'Owner'
    -> InvoiceLastFinalizationError'Source'Owner' -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Owner'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Owner'
-> InvoiceLastFinalizationError'Source'Owner' -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Owner'
-> InvoiceLastFinalizationError'Source'Owner' -> Bool
== :: InvoiceLastFinalizationError'Source'Owner'
-> InvoiceLastFinalizationError'Source'Owner' -> Bool
$c== :: InvoiceLastFinalizationError'Source'Owner'
-> InvoiceLastFinalizationError'Source'Owner' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner' where
  toJSON :: InvoiceLastFinalizationError'Source'Owner' -> Value
toJSON InvoiceLastFinalizationError'Source'Owner'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"address" Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'Address' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'Address'
invoiceLastFinalizationError'Source'Owner'Address InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Email InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Name InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Phone InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_address" Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
invoiceLastFinalizationError'Source'Owner'VerifiedAddress InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedEmail InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedName InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verified_phone" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedPhone InvoiceLastFinalizationError'Source'Owner'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLastFinalizationError'Source'Owner' -> Encoding
toEncoding InvoiceLastFinalizationError'Source'Owner'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"address" Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'Address'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'Address'
invoiceLastFinalizationError'Source'Owner'Address InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Email InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Name InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Phone InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_address" Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
invoiceLastFinalizationError'Source'Owner'VerifiedAddress InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedEmail InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"verified_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedName InvoiceLastFinalizationError'Source'Owner'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verified_phone" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedPhone InvoiceLastFinalizationError'Source'Owner'
obj))))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'Source'Owner'
parseJSON = String
-> (Object -> Parser InvoiceLastFinalizationError'Source'Owner')
-> Value
-> Parser InvoiceLastFinalizationError'Source'Owner'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLastFinalizationError'Source'Owner'" (\Object
obj -> ((((((((Maybe InvoiceLastFinalizationError'Source'Owner'Address'
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InvoiceLastFinalizationError'Source'Owner')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'Address'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe InvoiceLastFinalizationError'Source'Owner'Address'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'
InvoiceLastFinalizationError'Source'Owner' Parser
  (Maybe InvoiceLastFinalizationError'Source'Owner'Address'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'Address')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"email")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"name")) Parser
  (Maybe Text
   -> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"phone")) Parser
  (Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_email")) Parser
  (Maybe Text
   -> Maybe Text -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> InvoiceLastFinalizationError'Source'Owner')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_name")) Parser (Maybe Text -> InvoiceLastFinalizationError'Source'Owner')
-> Parser (Maybe Text)
-> Parser InvoiceLastFinalizationError'Source'Owner'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verified_phone"))

-- | Create a new 'InvoiceLastFinalizationError'Source'Owner'' with all required fields.
mkInvoiceLastFinalizationError'Source'Owner' :: InvoiceLastFinalizationError'Source'Owner'
mkInvoiceLastFinalizationError'Source'Owner' :: InvoiceLastFinalizationError'Source'Owner'
mkInvoiceLastFinalizationError'Source'Owner' =
  InvoiceLastFinalizationError'Source'Owner' :: Maybe InvoiceLastFinalizationError'Source'Owner'Address'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'
InvoiceLastFinalizationError'Source'Owner'
    { invoiceLastFinalizationError'Source'Owner'Address :: Maybe InvoiceLastFinalizationError'Source'Owner'Address'
invoiceLastFinalizationError'Source'Owner'Address = Maybe InvoiceLastFinalizationError'Source'Owner'Address'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Email :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Email = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Name :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Name = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Phone :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Phone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress :: Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
invoiceLastFinalizationError'Source'Owner'VerifiedAddress = Maybe InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedEmail :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedName :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedPhone :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedPhone = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.owner.anyOf.properties.address.anyOf@ in the specification.
--
-- Owner\\\'s address.
data InvoiceLastFinalizationError'Source'Owner'Address' = InvoiceLastFinalizationError'Source'Owner'Address'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> InvoiceLastFinalizationError'Source'Owner'Address' -> ShowS
[InvoiceLastFinalizationError'Source'Owner'Address'] -> ShowS
InvoiceLastFinalizationError'Source'Owner'Address' -> String
(Int
 -> InvoiceLastFinalizationError'Source'Owner'Address' -> ShowS)
-> (InvoiceLastFinalizationError'Source'Owner'Address' -> String)
-> ([InvoiceLastFinalizationError'Source'Owner'Address'] -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Owner'Address'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Owner'Address'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Owner'Address'] -> ShowS
show :: InvoiceLastFinalizationError'Source'Owner'Address' -> String
$cshow :: InvoiceLastFinalizationError'Source'Owner'Address' -> String
showsPrec :: Int -> InvoiceLastFinalizationError'Source'Owner'Address' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError'Source'Owner'Address' -> ShowS
GHC.Show.Show,
      InvoiceLastFinalizationError'Source'Owner'Address'
-> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool
(InvoiceLastFinalizationError'Source'Owner'Address'
 -> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool)
-> (InvoiceLastFinalizationError'Source'Owner'Address'
    -> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Owner'Address'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Owner'Address'
-> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Owner'Address'
-> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool
== :: InvoiceLastFinalizationError'Source'Owner'Address'
-> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool
$c== :: InvoiceLastFinalizationError'Source'Owner'Address'
-> InvoiceLastFinalizationError'Source'Owner'Address' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner'Address' where
  toJSON :: InvoiceLastFinalizationError'Source'Owner'Address' -> Value
toJSON InvoiceLastFinalizationError'Source'Owner'Address'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'City InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Country InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line1 InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line2 InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'PostalCode InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'State InvoiceLastFinalizationError'Source'Owner'Address'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLastFinalizationError'Source'Owner'Address' -> Encoding
toEncoding InvoiceLastFinalizationError'Source'Owner'Address'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'City InvoiceLastFinalizationError'Source'Owner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Country InvoiceLastFinalizationError'Source'Owner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line1 InvoiceLastFinalizationError'Source'Owner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line2 InvoiceLastFinalizationError'Source'Owner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'PostalCode InvoiceLastFinalizationError'Source'Owner'Address'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'Address' -> Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'State InvoiceLastFinalizationError'Source'Owner'Address'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner'Address' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'Source'Owner'Address'
parseJSON = String
-> (Object
    -> Parser InvoiceLastFinalizationError'Source'Owner'Address')
-> Value
-> Parser InvoiceLastFinalizationError'Source'Owner'Address'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLastFinalizationError'Source'Owner'Address'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'Address'
InvoiceLastFinalizationError'Source'Owner'Address' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line1")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line2")) Parser
  (Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> InvoiceLastFinalizationError'Source'Owner'Address')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"postal_code")) Parser
  (Maybe Text -> InvoiceLastFinalizationError'Source'Owner'Address')
-> Parser (Maybe Text)
-> Parser InvoiceLastFinalizationError'Source'Owner'Address'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"state"))

-- | Create a new 'InvoiceLastFinalizationError'Source'Owner'Address'' with all required fields.
mkInvoiceLastFinalizationError'Source'Owner'Address' :: InvoiceLastFinalizationError'Source'Owner'Address'
mkInvoiceLastFinalizationError'Source'Owner'Address' :: InvoiceLastFinalizationError'Source'Owner'Address'
mkInvoiceLastFinalizationError'Source'Owner'Address' =
  InvoiceLastFinalizationError'Source'Owner'Address' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'Address'
InvoiceLastFinalizationError'Source'Owner'Address'
    { invoiceLastFinalizationError'Source'Owner'Address'City :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Address'Country :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Address'Line1 :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Address'Line2 :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Address'PostalCode :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'Address'State :: Maybe Text
invoiceLastFinalizationError'Source'Owner'Address'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.owner.anyOf.properties.verified_address.anyOf@ in the specification.
--
-- Verified owner\\\'s address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
data InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' = InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> ShowS
[InvoiceLastFinalizationError'Source'Owner'VerifiedAddress']
-> ShowS
InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> String
(Int
 -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
 -> ShowS)
-> (InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
    -> String)
-> ([InvoiceLastFinalizationError'Source'Owner'VerifiedAddress']
    -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Owner'VerifiedAddress']
-> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Owner'VerifiedAddress']
-> ShowS
show :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> String
$cshow :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> String
showsPrec :: Int
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> ShowS
$cshowsPrec :: Int
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> ShowS
GHC.Show.Show,
      InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Bool
(InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
 -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
 -> Bool)
-> (InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
    -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
    -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Bool
$c/= :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Bool
== :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Bool
$c== :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' where
  toJSON :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' -> Value
toJSON InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Encoding
toEncoding InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
-> Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' where
  parseJSON :: Value
-> Parser
     InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
parseJSON = String
-> (Object
    -> Parser
         InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Value
-> Parser
     InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line1")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"line2")) Parser
  (Maybe Text
   -> Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"postal_code")) Parser
  (Maybe Text
   -> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress')
-> Parser (Maybe Text)
-> Parser
     InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"state"))

-- | Create a new 'InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'' with all required fields.
mkInvoiceLastFinalizationError'Source'Owner'VerifiedAddress' :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
mkInvoiceLastFinalizationError'Source'Owner'VerifiedAddress' :: InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
mkInvoiceLastFinalizationError'Source'Owner'VerifiedAddress' =
  InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'
    { invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State :: Maybe Text
invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.recipient.anyOf@ in the specification.
--
-- The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
data InvoiceLastFinalizationError'Source'Recipient'Variants
  = InvoiceLastFinalizationError'Source'Recipient'Text Data.Text.Internal.Text
  | InvoiceLastFinalizationError'Source'Recipient'Recipient Recipient
  deriving (Int
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> ShowS
[InvoiceLastFinalizationError'Source'Recipient'Variants] -> ShowS
InvoiceLastFinalizationError'Source'Recipient'Variants -> String
(Int
 -> InvoiceLastFinalizationError'Source'Recipient'Variants -> ShowS)
-> (InvoiceLastFinalizationError'Source'Recipient'Variants
    -> String)
-> ([InvoiceLastFinalizationError'Source'Recipient'Variants]
    -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Recipient'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Recipient'Variants] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Recipient'Variants] -> ShowS
show :: InvoiceLastFinalizationError'Source'Recipient'Variants -> String
$cshow :: InvoiceLastFinalizationError'Source'Recipient'Variants -> String
showsPrec :: Int
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> ShowS
$cshowsPrec :: Int
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Source'Recipient'Variants
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool
(InvoiceLastFinalizationError'Source'Recipient'Variants
 -> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool)
-> (InvoiceLastFinalizationError'Source'Recipient'Variants
    -> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Recipient'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Recipient'Variants
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Recipient'Variants
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool
== :: InvoiceLastFinalizationError'Source'Recipient'Variants
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool
$c== :: InvoiceLastFinalizationError'Source'Recipient'Variants
-> InvoiceLastFinalizationError'Source'Recipient'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Recipient'Variants where
  toJSON :: InvoiceLastFinalizationError'Source'Recipient'Variants -> Value
toJSON (InvoiceLastFinalizationError'Source'Recipient'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceLastFinalizationError'Source'Recipient'Recipient Recipient
a) = Recipient -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Recipient
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Recipient'Variants where
  parseJSON :: Value
-> Parser InvoiceLastFinalizationError'Source'Recipient'Variants
parseJSON Value
val = case (Text -> InvoiceLastFinalizationError'Source'Recipient'Variants
InvoiceLastFinalizationError'Source'Recipient'Text (Text -> InvoiceLastFinalizationError'Source'Recipient'Variants)
-> Result Text
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Recipient'Variants
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Recipient -> InvoiceLastFinalizationError'Source'Recipient'Variants
InvoiceLastFinalizationError'Source'Recipient'Recipient (Recipient
 -> InvoiceLastFinalizationError'Source'Recipient'Variants)
-> Result Recipient
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Recipient
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceLastFinalizationError'Source'Recipient'Variants
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result InvoiceLastFinalizationError'Source'Recipient'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceLastFinalizationError'Source'Recipient'Variants
a -> InvoiceLastFinalizationError'Source'Recipient'Variants
-> Parser InvoiceLastFinalizationError'Source'Recipient'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceLastFinalizationError'Source'Recipient'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String
-> Parser InvoiceLastFinalizationError'Source'Recipient'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the enum schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.type@ in the specification.
--
-- The \`type\` of the source. The \`type\` is a payment method, one of \`ach_credit_transfer\`, \`ach_debit\`, \`alipay\`, \`bancontact\`, \`card\`, \`card_present\`, \`eps\`, \`giropay\`, \`ideal\`, \`multibanco\`, \`klarna\`, \`p24\`, \`sepa_debit\`, \`sofort\`, \`three_d_secure\`, or \`wechat\`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https:\/\/stripe.com\/docs\/sources) used.
data InvoiceLastFinalizationError'Source'Type'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceLastFinalizationError'Source'Type'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceLastFinalizationError'Source'Type'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"ach_credit_transfer"@
    InvoiceLastFinalizationError'Source'Type'EnumAchCreditTransfer
  | -- | Represents the JSON value @"ach_debit"@
    InvoiceLastFinalizationError'Source'Type'EnumAchDebit
  | -- | Represents the JSON value @"acss_debit"@
    InvoiceLastFinalizationError'Source'Type'EnumAcssDebit
  | -- | Represents the JSON value @"alipay"@
    InvoiceLastFinalizationError'Source'Type'EnumAlipay
  | -- | Represents the JSON value @"au_becs_debit"@
    InvoiceLastFinalizationError'Source'Type'EnumAuBecsDebit
  | -- | Represents the JSON value @"bancontact"@
    InvoiceLastFinalizationError'Source'Type'EnumBancontact
  | -- | Represents the JSON value @"card"@
    InvoiceLastFinalizationError'Source'Type'EnumCard
  | -- | Represents the JSON value @"card_present"@
    InvoiceLastFinalizationError'Source'Type'EnumCardPresent
  | -- | Represents the JSON value @"eps"@
    InvoiceLastFinalizationError'Source'Type'EnumEps
  | -- | Represents the JSON value @"giropay"@
    InvoiceLastFinalizationError'Source'Type'EnumGiropay
  | -- | Represents the JSON value @"ideal"@
    InvoiceLastFinalizationError'Source'Type'EnumIdeal
  | -- | Represents the JSON value @"klarna"@
    InvoiceLastFinalizationError'Source'Type'EnumKlarna
  | -- | Represents the JSON value @"multibanco"@
    InvoiceLastFinalizationError'Source'Type'EnumMultibanco
  | -- | Represents the JSON value @"p24"@
    InvoiceLastFinalizationError'Source'Type'EnumP24
  | -- | Represents the JSON value @"sepa_debit"@
    InvoiceLastFinalizationError'Source'Type'EnumSepaDebit
  | -- | Represents the JSON value @"sofort"@
    InvoiceLastFinalizationError'Source'Type'EnumSofort
  | -- | Represents the JSON value @"three_d_secure"@
    InvoiceLastFinalizationError'Source'Type'EnumThreeDSecure
  | -- | Represents the JSON value @"wechat"@
    InvoiceLastFinalizationError'Source'Type'EnumWechat
  deriving (Int -> InvoiceLastFinalizationError'Source'Type' -> ShowS
[InvoiceLastFinalizationError'Source'Type'] -> ShowS
InvoiceLastFinalizationError'Source'Type' -> String
(Int -> InvoiceLastFinalizationError'Source'Type' -> ShowS)
-> (InvoiceLastFinalizationError'Source'Type' -> String)
-> ([InvoiceLastFinalizationError'Source'Type'] -> ShowS)
-> Show InvoiceLastFinalizationError'Source'Type'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Source'Type'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Source'Type'] -> ShowS
show :: InvoiceLastFinalizationError'Source'Type' -> String
$cshow :: InvoiceLastFinalizationError'Source'Type' -> String
showsPrec :: Int -> InvoiceLastFinalizationError'Source'Type' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError'Source'Type' -> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Source'Type'
-> InvoiceLastFinalizationError'Source'Type' -> Bool
(InvoiceLastFinalizationError'Source'Type'
 -> InvoiceLastFinalizationError'Source'Type' -> Bool)
-> (InvoiceLastFinalizationError'Source'Type'
    -> InvoiceLastFinalizationError'Source'Type' -> Bool)
-> Eq InvoiceLastFinalizationError'Source'Type'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Source'Type'
-> InvoiceLastFinalizationError'Source'Type' -> Bool
$c/= :: InvoiceLastFinalizationError'Source'Type'
-> InvoiceLastFinalizationError'Source'Type' -> Bool
== :: InvoiceLastFinalizationError'Source'Type'
-> InvoiceLastFinalizationError'Source'Type' -> Bool
$c== :: InvoiceLastFinalizationError'Source'Type'
-> InvoiceLastFinalizationError'Source'Type' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Type' where
  toJSON :: InvoiceLastFinalizationError'Source'Type' -> Value
toJSON (InvoiceLastFinalizationError'Source'Type'Other Value
val) = Value
val
  toJSON (InvoiceLastFinalizationError'Source'Type'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAchCreditTransfer) = Value
"ach_credit_transfer"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAchDebit) = Value
"ach_debit"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAcssDebit) = Value
"acss_debit"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAlipay) = Value
"alipay"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAuBecsDebit) = Value
"au_becs_debit"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumBancontact) = Value
"bancontact"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumCard) = Value
"card"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumCardPresent) = Value
"card_present"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumEps) = Value
"eps"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumGiropay) = Value
"giropay"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumIdeal) = Value
"ideal"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumKlarna) = Value
"klarna"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumMultibanco) = Value
"multibanco"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumP24) = Value
"p24"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumSepaDebit) = Value
"sepa_debit"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumSofort) = Value
"sofort"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumThreeDSecure) = Value
"three_d_secure"
  toJSON (InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumWechat) = Value
"wechat"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Type' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'Source'Type'
parseJSON Value
val =
    InvoiceLastFinalizationError'Source'Type'
-> Parser InvoiceLastFinalizationError'Source'Type'
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
"ach_credit_transfer" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAchCreditTransfer
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ach_debit" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAchDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"acss_debit" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAcssDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"alipay" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAlipay
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"au_becs_debit" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumAuBecsDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"bancontact" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumBancontact
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumCard
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card_present" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumCardPresent
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"eps" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumEps
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"giropay" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumGiropay
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ideal" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumIdeal
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"klarna" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumKlarna
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"multibanco" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumMultibanco
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"p24" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumP24
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sepa_debit" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumSepaDebit
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sofort" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumSofort
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"three_d_secure" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumThreeDSecure
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"wechat" -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'EnumWechat
            | Bool
GHC.Base.otherwise -> Value -> InvoiceLastFinalizationError'Source'Type'
InvoiceLastFinalizationError'Source'Type'Other Value
val
      )

-- | Defines the enum schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.type@ in the specification.
--
-- The type of error returned. One of \`api_connection_error\`, \`api_error\`, \`authentication_error\`, \`card_error\`, \`idempotency_error\`, \`invalid_request_error\`, or \`rate_limit_error\`
data InvoiceLastFinalizationError'Type'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceLastFinalizationError'Type'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceLastFinalizationError'Type'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"api_connection_error"@
    InvoiceLastFinalizationError'Type'EnumApiConnectionError
  | -- | Represents the JSON value @"api_error"@
    InvoiceLastFinalizationError'Type'EnumApiError
  | -- | Represents the JSON value @"authentication_error"@
    InvoiceLastFinalizationError'Type'EnumAuthenticationError
  | -- | Represents the JSON value @"card_error"@
    InvoiceLastFinalizationError'Type'EnumCardError
  | -- | Represents the JSON value @"idempotency_error"@
    InvoiceLastFinalizationError'Type'EnumIdempotencyError
  | -- | Represents the JSON value @"invalid_request_error"@
    InvoiceLastFinalizationError'Type'EnumInvalidRequestError
  | -- | Represents the JSON value @"rate_limit_error"@
    InvoiceLastFinalizationError'Type'EnumRateLimitError
  deriving (Int -> InvoiceLastFinalizationError'Type' -> ShowS
[InvoiceLastFinalizationError'Type'] -> ShowS
InvoiceLastFinalizationError'Type' -> String
(Int -> InvoiceLastFinalizationError'Type' -> ShowS)
-> (InvoiceLastFinalizationError'Type' -> String)
-> ([InvoiceLastFinalizationError'Type'] -> ShowS)
-> Show InvoiceLastFinalizationError'Type'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLastFinalizationError'Type'] -> ShowS
$cshowList :: [InvoiceLastFinalizationError'Type'] -> ShowS
show :: InvoiceLastFinalizationError'Type' -> String
$cshow :: InvoiceLastFinalizationError'Type' -> String
showsPrec :: Int -> InvoiceLastFinalizationError'Type' -> ShowS
$cshowsPrec :: Int -> InvoiceLastFinalizationError'Type' -> ShowS
GHC.Show.Show, InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'Type' -> Bool
(InvoiceLastFinalizationError'Type'
 -> InvoiceLastFinalizationError'Type' -> Bool)
-> (InvoiceLastFinalizationError'Type'
    -> InvoiceLastFinalizationError'Type' -> Bool)
-> Eq InvoiceLastFinalizationError'Type'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'Type' -> Bool
$c/= :: InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'Type' -> Bool
== :: InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'Type' -> Bool
$c== :: InvoiceLastFinalizationError'Type'
-> InvoiceLastFinalizationError'Type' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Type' where
  toJSON :: InvoiceLastFinalizationError'Type' -> Value
toJSON (InvoiceLastFinalizationError'Type'Other Value
val) = Value
val
  toJSON (InvoiceLastFinalizationError'Type'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumApiConnectionError) = Value
"api_connection_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumApiError) = Value
"api_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumAuthenticationError) = Value
"authentication_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumCardError) = Value
"card_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumIdempotencyError) = Value
"idempotency_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumInvalidRequestError) = Value
"invalid_request_error"
  toJSON (InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumRateLimitError) = Value
"rate_limit_error"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Type' where
  parseJSON :: Value -> Parser InvoiceLastFinalizationError'Type'
parseJSON Value
val =
    InvoiceLastFinalizationError'Type'
-> Parser InvoiceLastFinalizationError'Type'
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
"api_connection_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumApiConnectionError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"api_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumApiError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"authentication_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumAuthenticationError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"card_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumCardError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"idempotency_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumIdempotencyError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"invalid_request_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumInvalidRequestError
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"rate_limit_error" -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'EnumRateLimitError
            | Bool
GHC.Base.otherwise -> Value -> InvoiceLastFinalizationError'Type'
InvoiceLastFinalizationError'Type'Other Value
val
      )

-- | Defines the object schema located at @components.schemas.invoice.properties.lines@ in the specification.
--
-- The individual line items that make up the invoice. \`lines\` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
data InvoiceLines' = InvoiceLines'
  { -- | data: Details about each object.
    InvoiceLines' -> [LineItem]
invoiceLines'Data :: ([LineItem]),
    -- | has_more: True if this list has another page of items after this one that can be fetched.
    InvoiceLines' -> Bool
invoiceLines'HasMore :: GHC.Types.Bool,
    -- | url: The URL where this list can be accessed.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    InvoiceLines' -> Text
invoiceLines'Url :: Data.Text.Internal.Text
  }
  deriving
    ( Int -> InvoiceLines' -> ShowS
[InvoiceLines'] -> ShowS
InvoiceLines' -> String
(Int -> InvoiceLines' -> ShowS)
-> (InvoiceLines' -> String)
-> ([InvoiceLines'] -> ShowS)
-> Show InvoiceLines'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceLines'] -> ShowS
$cshowList :: [InvoiceLines'] -> ShowS
show :: InvoiceLines' -> String
$cshow :: InvoiceLines' -> String
showsPrec :: Int -> InvoiceLines' -> ShowS
$cshowsPrec :: Int -> InvoiceLines' -> ShowS
GHC.Show.Show,
      InvoiceLines' -> InvoiceLines' -> Bool
(InvoiceLines' -> InvoiceLines' -> Bool)
-> (InvoiceLines' -> InvoiceLines' -> Bool) -> Eq InvoiceLines'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceLines' -> InvoiceLines' -> Bool
$c/= :: InvoiceLines' -> InvoiceLines' -> Bool
== :: InvoiceLines' -> InvoiceLines' -> Bool
$c== :: InvoiceLines' -> InvoiceLines' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLines' where
  toJSON :: InvoiceLines' -> Value
toJSON InvoiceLines'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [LineItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> [LineItem]
invoiceLines'Data InvoiceLines'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> Bool
invoiceLines'HasMore InvoiceLines'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> Text
invoiceLines'Url InvoiceLines'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceLines' -> Encoding
toEncoding InvoiceLines'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [LineItem] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> [LineItem]
invoiceLines'Data InvoiceLines'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> Bool
invoiceLines'HasMore InvoiceLines'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceLines' -> Text
invoiceLines'Url InvoiceLines'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLines' where
  parseJSON :: Value -> Parser InvoiceLines'
parseJSON = String
-> (Object -> Parser InvoiceLines')
-> Value
-> Parser InvoiceLines'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceLines'" (\Object
obj -> ((([LineItem] -> Bool -> Text -> InvoiceLines')
-> Parser ([LineItem] -> Bool -> Text -> InvoiceLines')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [LineItem] -> Bool -> Text -> InvoiceLines'
InvoiceLines' Parser ([LineItem] -> Bool -> Text -> InvoiceLines')
-> Parser [LineItem] -> Parser (Bool -> Text -> InvoiceLines')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [LineItem]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> InvoiceLines')
-> Parser Bool -> Parser (Text -> InvoiceLines')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> InvoiceLines')
-> Parser Text -> Parser InvoiceLines'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))

-- | Create a new 'InvoiceLines'' with all required fields.
mkInvoiceLines' ::
  -- | 'invoiceLines'Data'
  [LineItem] ->
  -- | 'invoiceLines'HasMore'
  GHC.Types.Bool ->
  -- | 'invoiceLines'Url'
  Data.Text.Internal.Text ->
  InvoiceLines'
mkInvoiceLines' :: [LineItem] -> Bool -> Text -> InvoiceLines'
mkInvoiceLines' [LineItem]
invoiceLines'Data Bool
invoiceLines'HasMore Text
invoiceLines'Url =
  InvoiceLines' :: [LineItem] -> Bool -> Text -> InvoiceLines'
InvoiceLines'
    { invoiceLines'Data :: [LineItem]
invoiceLines'Data = [LineItem]
invoiceLines'Data,
      invoiceLines'HasMore :: Bool
invoiceLines'HasMore = Bool
invoiceLines'HasMore,
      invoiceLines'Url :: Text
invoiceLines'Url = Text
invoiceLines'Url
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.on_behalf_of.anyOf@ in the specification.
--
-- The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https:\/\/stripe.com\/docs\/billing\/invoices\/connect) documentation for details.
data InvoiceOnBehalfOf'Variants
  = InvoiceOnBehalfOf'Text Data.Text.Internal.Text
  | InvoiceOnBehalfOf'Account Account
  deriving (Int -> InvoiceOnBehalfOf'Variants -> ShowS
[InvoiceOnBehalfOf'Variants] -> ShowS
InvoiceOnBehalfOf'Variants -> String
(Int -> InvoiceOnBehalfOf'Variants -> ShowS)
-> (InvoiceOnBehalfOf'Variants -> String)
-> ([InvoiceOnBehalfOf'Variants] -> ShowS)
-> Show InvoiceOnBehalfOf'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceOnBehalfOf'Variants] -> ShowS
$cshowList :: [InvoiceOnBehalfOf'Variants] -> ShowS
show :: InvoiceOnBehalfOf'Variants -> String
$cshow :: InvoiceOnBehalfOf'Variants -> String
showsPrec :: Int -> InvoiceOnBehalfOf'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceOnBehalfOf'Variants -> ShowS
GHC.Show.Show, InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool
(InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool)
-> (InvoiceOnBehalfOf'Variants
    -> InvoiceOnBehalfOf'Variants -> Bool)
-> Eq InvoiceOnBehalfOf'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool
$c/= :: InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool
== :: InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool
$c== :: InvoiceOnBehalfOf'Variants -> InvoiceOnBehalfOf'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceOnBehalfOf'Variants where
  toJSON :: InvoiceOnBehalfOf'Variants -> Value
toJSON (InvoiceOnBehalfOf'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceOnBehalfOf'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceOnBehalfOf'Variants where
  parseJSON :: Value -> Parser InvoiceOnBehalfOf'Variants
parseJSON Value
val = case (Text -> InvoiceOnBehalfOf'Variants
InvoiceOnBehalfOf'Text (Text -> InvoiceOnBehalfOf'Variants)
-> Result Text -> Result InvoiceOnBehalfOf'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceOnBehalfOf'Variants
-> Result InvoiceOnBehalfOf'Variants
-> Result InvoiceOnBehalfOf'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> InvoiceOnBehalfOf'Variants
InvoiceOnBehalfOf'Account (Account -> InvoiceOnBehalfOf'Variants)
-> Result Account -> Result InvoiceOnBehalfOf'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceOnBehalfOf'Variants
-> Result InvoiceOnBehalfOf'Variants
-> Result InvoiceOnBehalfOf'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceOnBehalfOf'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceOnBehalfOf'Variants
a -> InvoiceOnBehalfOf'Variants -> Parser InvoiceOnBehalfOf'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceOnBehalfOf'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceOnBehalfOf'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.payment_intent.anyOf@ in the specification.
--
-- The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
data InvoicePaymentIntent'Variants
  = InvoicePaymentIntent'Text Data.Text.Internal.Text
  | InvoicePaymentIntent'PaymentIntent PaymentIntent
  deriving (Int -> InvoicePaymentIntent'Variants -> ShowS
[InvoicePaymentIntent'Variants] -> ShowS
InvoicePaymentIntent'Variants -> String
(Int -> InvoicePaymentIntent'Variants -> ShowS)
-> (InvoicePaymentIntent'Variants -> String)
-> ([InvoicePaymentIntent'Variants] -> ShowS)
-> Show InvoicePaymentIntent'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoicePaymentIntent'Variants] -> ShowS
$cshowList :: [InvoicePaymentIntent'Variants] -> ShowS
show :: InvoicePaymentIntent'Variants -> String
$cshow :: InvoicePaymentIntent'Variants -> String
showsPrec :: Int -> InvoicePaymentIntent'Variants -> ShowS
$cshowsPrec :: Int -> InvoicePaymentIntent'Variants -> ShowS
GHC.Show.Show, InvoicePaymentIntent'Variants
-> InvoicePaymentIntent'Variants -> Bool
(InvoicePaymentIntent'Variants
 -> InvoicePaymentIntent'Variants -> Bool)
-> (InvoicePaymentIntent'Variants
    -> InvoicePaymentIntent'Variants -> Bool)
-> Eq InvoicePaymentIntent'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoicePaymentIntent'Variants
-> InvoicePaymentIntent'Variants -> Bool
$c/= :: InvoicePaymentIntent'Variants
-> InvoicePaymentIntent'Variants -> Bool
== :: InvoicePaymentIntent'Variants
-> InvoicePaymentIntent'Variants -> Bool
$c== :: InvoicePaymentIntent'Variants
-> InvoicePaymentIntent'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoicePaymentIntent'Variants where
  toJSON :: InvoicePaymentIntent'Variants -> Value
toJSON (InvoicePaymentIntent'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoicePaymentIntent'PaymentIntent PaymentIntent
a) = PaymentIntent -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PaymentIntent
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoicePaymentIntent'Variants where
  parseJSON :: Value -> Parser InvoicePaymentIntent'Variants
parseJSON Value
val = case (Text -> InvoicePaymentIntent'Variants
InvoicePaymentIntent'Text (Text -> InvoicePaymentIntent'Variants)
-> Result Text -> Result InvoicePaymentIntent'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoicePaymentIntent'Variants
-> Result InvoicePaymentIntent'Variants
-> Result InvoicePaymentIntent'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((PaymentIntent -> InvoicePaymentIntent'Variants
InvoicePaymentIntent'PaymentIntent (PaymentIntent -> InvoicePaymentIntent'Variants)
-> Result PaymentIntent -> Result InvoicePaymentIntent'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PaymentIntent
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoicePaymentIntent'Variants
-> Result InvoicePaymentIntent'Variants
-> Result InvoicePaymentIntent'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoicePaymentIntent'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoicePaymentIntent'Variants
a -> InvoicePaymentIntent'Variants
-> Parser InvoicePaymentIntent'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoicePaymentIntent'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoicePaymentIntent'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the enum schema located at @components.schemas.invoice.properties.status@ in the specification.
--
-- The status of the invoice, one of \`draft\`, \`open\`, \`paid\`, \`uncollectible\`, or \`void\`. [Learn more](https:\/\/stripe.com\/docs\/billing\/invoices\/workflow\#workflow-overview)
data InvoiceStatus'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    InvoiceStatus'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    InvoiceStatus'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"deleted"@
    InvoiceStatus'EnumDeleted
  | -- | Represents the JSON value @"draft"@
    InvoiceStatus'EnumDraft
  | -- | Represents the JSON value @"open"@
    InvoiceStatus'EnumOpen
  | -- | Represents the JSON value @"paid"@
    InvoiceStatus'EnumPaid
  | -- | Represents the JSON value @"uncollectible"@
    InvoiceStatus'EnumUncollectible
  | -- | Represents the JSON value @"void"@
    InvoiceStatus'EnumVoid
  deriving (Int -> InvoiceStatus' -> ShowS
[InvoiceStatus'] -> ShowS
InvoiceStatus' -> String
(Int -> InvoiceStatus' -> ShowS)
-> (InvoiceStatus' -> String)
-> ([InvoiceStatus'] -> ShowS)
-> Show InvoiceStatus'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceStatus'] -> ShowS
$cshowList :: [InvoiceStatus'] -> ShowS
show :: InvoiceStatus' -> String
$cshow :: InvoiceStatus' -> String
showsPrec :: Int -> InvoiceStatus' -> ShowS
$cshowsPrec :: Int -> InvoiceStatus' -> ShowS
GHC.Show.Show, InvoiceStatus' -> InvoiceStatus' -> Bool
(InvoiceStatus' -> InvoiceStatus' -> Bool)
-> (InvoiceStatus' -> InvoiceStatus' -> Bool) -> Eq InvoiceStatus'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceStatus' -> InvoiceStatus' -> Bool
$c/= :: InvoiceStatus' -> InvoiceStatus' -> Bool
== :: InvoiceStatus' -> InvoiceStatus' -> Bool
$c== :: InvoiceStatus' -> InvoiceStatus' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceStatus' where
  toJSON :: InvoiceStatus' -> Value
toJSON (InvoiceStatus'Other Value
val) = Value
val
  toJSON (InvoiceStatus'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (InvoiceStatus'
InvoiceStatus'EnumDeleted) = Value
"deleted"
  toJSON (InvoiceStatus'
InvoiceStatus'EnumDraft) = Value
"draft"
  toJSON (InvoiceStatus'
InvoiceStatus'EnumOpen) = Value
"open"
  toJSON (InvoiceStatus'
InvoiceStatus'EnumPaid) = Value
"paid"
  toJSON (InvoiceStatus'
InvoiceStatus'EnumUncollectible) = Value
"uncollectible"
  toJSON (InvoiceStatus'
InvoiceStatus'EnumVoid) = Value
"void"

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceStatus' where
  parseJSON :: Value -> Parser InvoiceStatus'
parseJSON Value
val =
    InvoiceStatus' -> Parser InvoiceStatus'
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
"deleted" -> InvoiceStatus'
InvoiceStatus'EnumDeleted
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"draft" -> InvoiceStatus'
InvoiceStatus'EnumDraft
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"open" -> InvoiceStatus'
InvoiceStatus'EnumOpen
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"paid" -> InvoiceStatus'
InvoiceStatus'EnumPaid
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"uncollectible" -> InvoiceStatus'
InvoiceStatus'EnumUncollectible
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"void" -> InvoiceStatus'
InvoiceStatus'EnumVoid
            | Bool
GHC.Base.otherwise -> Value -> InvoiceStatus'
InvoiceStatus'Other Value
val
      )

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.subscription.anyOf@ in the specification.
--
-- The subscription that this invoice was prepared for, if any.
data InvoiceSubscription'Variants
  = InvoiceSubscription'Text Data.Text.Internal.Text
  | InvoiceSubscription'Subscription Subscription
  deriving (Int -> InvoiceSubscription'Variants -> ShowS
[InvoiceSubscription'Variants] -> ShowS
InvoiceSubscription'Variants -> String
(Int -> InvoiceSubscription'Variants -> ShowS)
-> (InvoiceSubscription'Variants -> String)
-> ([InvoiceSubscription'Variants] -> ShowS)
-> Show InvoiceSubscription'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceSubscription'Variants] -> ShowS
$cshowList :: [InvoiceSubscription'Variants] -> ShowS
show :: InvoiceSubscription'Variants -> String
$cshow :: InvoiceSubscription'Variants -> String
showsPrec :: Int -> InvoiceSubscription'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceSubscription'Variants -> ShowS
GHC.Show.Show, InvoiceSubscription'Variants
-> InvoiceSubscription'Variants -> Bool
(InvoiceSubscription'Variants
 -> InvoiceSubscription'Variants -> Bool)
-> (InvoiceSubscription'Variants
    -> InvoiceSubscription'Variants -> Bool)
-> Eq InvoiceSubscription'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceSubscription'Variants
-> InvoiceSubscription'Variants -> Bool
$c/= :: InvoiceSubscription'Variants
-> InvoiceSubscription'Variants -> Bool
== :: InvoiceSubscription'Variants
-> InvoiceSubscription'Variants -> Bool
$c== :: InvoiceSubscription'Variants
-> InvoiceSubscription'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceSubscription'Variants where
  toJSON :: InvoiceSubscription'Variants -> Value
toJSON (InvoiceSubscription'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceSubscription'Subscription Subscription
a) = Subscription -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Subscription
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceSubscription'Variants where
  parseJSON :: Value -> Parser InvoiceSubscription'Variants
parseJSON Value
val = case (Text -> InvoiceSubscription'Variants
InvoiceSubscription'Text (Text -> InvoiceSubscription'Variants)
-> Result Text -> Result InvoiceSubscription'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceSubscription'Variants
-> Result InvoiceSubscription'Variants
-> Result InvoiceSubscription'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Subscription -> InvoiceSubscription'Variants
InvoiceSubscription'Subscription (Subscription -> InvoiceSubscription'Variants)
-> Result Subscription -> Result InvoiceSubscription'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Subscription
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceSubscription'Variants
-> Result InvoiceSubscription'Variants
-> Result InvoiceSubscription'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceSubscription'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceSubscription'Variants
a -> InvoiceSubscription'Variants -> Parser InvoiceSubscription'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceSubscription'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceSubscription'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Defines the object schema located at @components.schemas.invoice.properties.transfer_data.anyOf@ in the specification.
--
-- The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
data InvoiceTransferData' = InvoiceTransferData'
  { -- | amount: The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
    InvoiceTransferData' -> Maybe Int
invoiceTransferData'Amount :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | destination: The account where funds from the payment will be transferred to upon payment success.
    InvoiceTransferData'
-> Maybe InvoiceTransferData'Destination'Variants
invoiceTransferData'Destination :: (GHC.Maybe.Maybe InvoiceTransferData'Destination'Variants)
  }
  deriving
    ( Int -> InvoiceTransferData' -> ShowS
[InvoiceTransferData'] -> ShowS
InvoiceTransferData' -> String
(Int -> InvoiceTransferData' -> ShowS)
-> (InvoiceTransferData' -> String)
-> ([InvoiceTransferData'] -> ShowS)
-> Show InvoiceTransferData'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceTransferData'] -> ShowS
$cshowList :: [InvoiceTransferData'] -> ShowS
show :: InvoiceTransferData' -> String
$cshow :: InvoiceTransferData' -> String
showsPrec :: Int -> InvoiceTransferData' -> ShowS
$cshowsPrec :: Int -> InvoiceTransferData' -> ShowS
GHC.Show.Show,
      InvoiceTransferData' -> InvoiceTransferData' -> Bool
(InvoiceTransferData' -> InvoiceTransferData' -> Bool)
-> (InvoiceTransferData' -> InvoiceTransferData' -> Bool)
-> Eq InvoiceTransferData'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceTransferData' -> InvoiceTransferData' -> Bool
$c/= :: InvoiceTransferData' -> InvoiceTransferData' -> Bool
== :: InvoiceTransferData' -> InvoiceTransferData' -> Bool
$c== :: InvoiceTransferData' -> InvoiceTransferData' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceTransferData' where
  toJSON :: InvoiceTransferData' -> Value
toJSON InvoiceTransferData'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"amount" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceTransferData' -> Maybe Int
invoiceTransferData'Amount InvoiceTransferData'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"destination" Text -> Maybe InvoiceTransferData'Destination'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceTransferData'
-> Maybe InvoiceTransferData'Destination'Variants
invoiceTransferData'Destination InvoiceTransferData'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: InvoiceTransferData' -> Encoding
toEncoding InvoiceTransferData'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"amount" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceTransferData' -> Maybe Int
invoiceTransferData'Amount InvoiceTransferData'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"destination" Text -> Maybe InvoiceTransferData'Destination'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= InvoiceTransferData'
-> Maybe InvoiceTransferData'Destination'Variants
invoiceTransferData'Destination InvoiceTransferData'
obj))

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceTransferData' where
  parseJSON :: Value -> Parser InvoiceTransferData'
parseJSON = String
-> (Object -> Parser InvoiceTransferData')
-> Value
-> Parser InvoiceTransferData'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"InvoiceTransferData'" (\Object
obj -> ((Maybe Int
 -> Maybe InvoiceTransferData'Destination'Variants
 -> InvoiceTransferData')
-> Parser
     (Maybe Int
      -> Maybe InvoiceTransferData'Destination'Variants
      -> InvoiceTransferData')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'
InvoiceTransferData' Parser
  (Maybe Int
   -> Maybe InvoiceTransferData'Destination'Variants
   -> InvoiceTransferData')
-> Parser (Maybe Int)
-> Parser
     (Maybe InvoiceTransferData'Destination'Variants
      -> InvoiceTransferData')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"amount")) Parser
  (Maybe InvoiceTransferData'Destination'Variants
   -> InvoiceTransferData')
-> Parser (Maybe InvoiceTransferData'Destination'Variants)
-> Parser InvoiceTransferData'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe InvoiceTransferData'Destination'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"destination"))

-- | Create a new 'InvoiceTransferData'' with all required fields.
mkInvoiceTransferData' :: InvoiceTransferData'
mkInvoiceTransferData' :: InvoiceTransferData'
mkInvoiceTransferData' =
  InvoiceTransferData' :: Maybe Int
-> Maybe InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'
InvoiceTransferData'
    { invoiceTransferData'Amount :: Maybe Int
invoiceTransferData'Amount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      invoiceTransferData'Destination :: Maybe InvoiceTransferData'Destination'Variants
invoiceTransferData'Destination = Maybe InvoiceTransferData'Destination'Variants
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @components.schemas.invoice.properties.transfer_data.anyOf.properties.destination.anyOf@ in the specification.
--
-- The account where funds from the payment will be transferred to upon payment success.
data InvoiceTransferData'Destination'Variants
  = InvoiceTransferData'Destination'Text Data.Text.Internal.Text
  | InvoiceTransferData'Destination'Account Account
  deriving (Int -> InvoiceTransferData'Destination'Variants -> ShowS
[InvoiceTransferData'Destination'Variants] -> ShowS
InvoiceTransferData'Destination'Variants -> String
(Int -> InvoiceTransferData'Destination'Variants -> ShowS)
-> (InvoiceTransferData'Destination'Variants -> String)
-> ([InvoiceTransferData'Destination'Variants] -> ShowS)
-> Show InvoiceTransferData'Destination'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvoiceTransferData'Destination'Variants] -> ShowS
$cshowList :: [InvoiceTransferData'Destination'Variants] -> ShowS
show :: InvoiceTransferData'Destination'Variants -> String
$cshow :: InvoiceTransferData'Destination'Variants -> String
showsPrec :: Int -> InvoiceTransferData'Destination'Variants -> ShowS
$cshowsPrec :: Int -> InvoiceTransferData'Destination'Variants -> ShowS
GHC.Show.Show, InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'Destination'Variants -> Bool
(InvoiceTransferData'Destination'Variants
 -> InvoiceTransferData'Destination'Variants -> Bool)
-> (InvoiceTransferData'Destination'Variants
    -> InvoiceTransferData'Destination'Variants -> Bool)
-> Eq InvoiceTransferData'Destination'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'Destination'Variants -> Bool
$c/= :: InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'Destination'Variants -> Bool
== :: InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'Destination'Variants -> Bool
$c== :: InvoiceTransferData'Destination'Variants
-> InvoiceTransferData'Destination'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON InvoiceTransferData'Destination'Variants where
  toJSON :: InvoiceTransferData'Destination'Variants -> Value
toJSON (InvoiceTransferData'Destination'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
  toJSON (InvoiceTransferData'Destination'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a

instance Data.Aeson.Types.FromJSON.FromJSON InvoiceTransferData'Destination'Variants where
  parseJSON :: Value -> Parser InvoiceTransferData'Destination'Variants
parseJSON Value
val = case (Text -> InvoiceTransferData'Destination'Variants
InvoiceTransferData'Destination'Text (Text -> InvoiceTransferData'Destination'Variants)
-> Result Text -> Result InvoiceTransferData'Destination'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceTransferData'Destination'Variants
-> Result InvoiceTransferData'Destination'Variants
-> Result InvoiceTransferData'Destination'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> InvoiceTransferData'Destination'Variants
InvoiceTransferData'Destination'Account (Account -> InvoiceTransferData'Destination'Variants)
-> Result Account
-> Result InvoiceTransferData'Destination'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result InvoiceTransferData'Destination'Variants
-> Result InvoiceTransferData'Destination'Variants
-> Result InvoiceTransferData'Destination'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result InvoiceTransferData'Destination'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success InvoiceTransferData'Destination'Variants
a -> InvoiceTransferData'Destination'Variants
-> Parser InvoiceTransferData'Destination'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure InvoiceTransferData'Destination'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String -> Parser InvoiceTransferData'Destination'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a