{-# 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 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 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. 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\`. invoiceAmountDue :: GHC.Types.Int, -- | amount_paid: The amount, in %s, that was paid. invoiceAmountPaid :: GHC.Types.Int, -- | amount_remaining: The amount remaining, in %s, that is due. 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. 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. 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. 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. invoiceAutoAdvance :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | automatic_tax: 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. invoiceBillingReason :: (GHC.Maybe.Maybe InvoiceBillingReason'), -- | charge: ID of the latest charge generated for this invoice, if any. 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. invoiceCollectionMethod :: (GHC.Maybe.Maybe InvoiceCollectionMethod'), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. 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). invoiceCurrency :: Data.Text.Internal.Text, -- | custom_fields: Custom fields displayed on the invoice. invoiceCustomFields :: (GHC.Maybe.Maybe ([InvoiceSettingCustomField])), -- | customer: The ID of the customer who will be billed. 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. 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 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 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 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. 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. 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. 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. 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. invoiceDefaultSource :: (GHC.Maybe.Maybe InvoiceDefaultSource'Variants), -- | default_tax_rates: The tax rates applied to this invoice, if any. 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 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. 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. 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\`. 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. invoiceEndingBalance :: (GHC.Maybe.Maybe GHC.Types.Int), -- | footer: Footer displayed on the invoice. -- -- Constraints: -- -- * Maximum length of 5000 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 invoiceHostedInvoiceUrl :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 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 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. 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. 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. 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. 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\`. 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 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. 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. 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. invoicePaymentIntent :: (GHC.Maybe.Maybe InvoicePaymentIntent'Variants), -- | payment_settings: invoicePaymentSettings :: InvoicesPaymentSettings, -- | period_end: End of the usage period during which invoice items were added to this invoice. invoicePeriodEnd :: GHC.Types.Int, -- | period_start: Start of the usage period during which invoice items were added to this invoice. invoicePeriodStart :: GHC.Types.Int, -- | post_payment_credit_notes_amount: Total amount of all post-payment credit notes issued for this invoice. invoicePostPaymentCreditNotesAmount :: GHC.Types.Int, -- | pre_payment_credit_notes_amount: Total amount of all pre-payment credit notes issued for this invoice. 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 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. invoiceStartingBalance :: GHC.Types.Int, -- | statement_descriptor: Extra information about an invoice for the customer\'s credit card statement. -- -- Constraints: -- -- * Maximum length of 5000 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) invoiceStatus :: (GHC.Maybe.Maybe InvoiceStatus'), -- | status_transitions: invoiceStatusTransitions :: InvoicesStatusTransitions, -- | subscription: The subscription that this invoice was prepared for, if any. invoiceSubscription :: (GHC.Maybe.Maybe InvoiceSubscription'Variants), -- | subscription_proration_date: Only set for upcoming invoices that preview prorations. The time used to calculate prorations. 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 invoiceSubtotal :: GHC.Types.Int, -- | tax: The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. invoiceTax :: (GHC.Maybe.Maybe GHC.Types.Int), -- | threshold_reason: invoiceThresholdReason :: (GHC.Maybe.Maybe InvoiceThresholdReason), -- | total: Total after discounts and taxes. invoiceTotal :: GHC.Types.Int, -- | total_discount_amounts: The aggregate amounts calculated per discount across all line items. invoiceTotalDiscountAmounts :: (GHC.Maybe.Maybe ([DiscountsResourceDiscountAmount])), -- | total_tax_amounts: The aggregate amounts calculated per tax rate for all line items. 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. 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. invoiceWebhooksDeliveredAt :: (GHC.Maybe.Maybe GHC.Types.Int) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON Invoice where toJSON obj = Data.Aeson.Types.Internal.object ("account_country" Data.Aeson.Types.ToJSON..= invoiceAccountCountry obj : "account_name" Data.Aeson.Types.ToJSON..= invoiceAccountName obj : "account_tax_ids" Data.Aeson.Types.ToJSON..= invoiceAccountTaxIds obj : "amount_due" Data.Aeson.Types.ToJSON..= invoiceAmountDue obj : "amount_paid" Data.Aeson.Types.ToJSON..= invoiceAmountPaid obj : "amount_remaining" Data.Aeson.Types.ToJSON..= invoiceAmountRemaining obj : "application_fee_amount" Data.Aeson.Types.ToJSON..= invoiceApplicationFeeAmount obj : "attempt_count" Data.Aeson.Types.ToJSON..= invoiceAttemptCount obj : "attempted" Data.Aeson.Types.ToJSON..= invoiceAttempted obj : "auto_advance" Data.Aeson.Types.ToJSON..= invoiceAutoAdvance obj : "automatic_tax" Data.Aeson.Types.ToJSON..= invoiceAutomaticTax obj : "billing_reason" Data.Aeson.Types.ToJSON..= invoiceBillingReason obj : "charge" Data.Aeson.Types.ToJSON..= invoiceCharge obj : "collection_method" Data.Aeson.Types.ToJSON..= invoiceCollectionMethod obj : "created" Data.Aeson.Types.ToJSON..= invoiceCreated obj : "currency" Data.Aeson.Types.ToJSON..= invoiceCurrency obj : "custom_fields" Data.Aeson.Types.ToJSON..= invoiceCustomFields obj : "customer" Data.Aeson.Types.ToJSON..= invoiceCustomer obj : "customer_address" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress obj : "customer_email" Data.Aeson.Types.ToJSON..= invoiceCustomerEmail obj : "customer_name" Data.Aeson.Types.ToJSON..= invoiceCustomerName obj : "customer_phone" Data.Aeson.Types.ToJSON..= invoiceCustomerPhone obj : "customer_shipping" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping obj : "customer_tax_exempt" Data.Aeson.Types.ToJSON..= invoiceCustomerTaxExempt obj : "customer_tax_ids" Data.Aeson.Types.ToJSON..= invoiceCustomerTaxIds obj : "default_payment_method" Data.Aeson.Types.ToJSON..= invoiceDefaultPaymentMethod obj : "default_source" Data.Aeson.Types.ToJSON..= invoiceDefaultSource obj : "default_tax_rates" Data.Aeson.Types.ToJSON..= invoiceDefaultTaxRates obj : "description" Data.Aeson.Types.ToJSON..= invoiceDescription obj : "discount" Data.Aeson.Types.ToJSON..= invoiceDiscount obj : "discounts" Data.Aeson.Types.ToJSON..= invoiceDiscounts obj : "due_date" Data.Aeson.Types.ToJSON..= invoiceDueDate obj : "ending_balance" Data.Aeson.Types.ToJSON..= invoiceEndingBalance obj : "footer" Data.Aeson.Types.ToJSON..= invoiceFooter obj : "hosted_invoice_url" Data.Aeson.Types.ToJSON..= invoiceHostedInvoiceUrl obj : "id" Data.Aeson.Types.ToJSON..= invoiceId obj : "invoice_pdf" Data.Aeson.Types.ToJSON..= invoiceInvoicePdf obj : "last_finalization_error" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError obj : "lines" Data.Aeson.Types.ToJSON..= invoiceLines obj : "livemode" Data.Aeson.Types.ToJSON..= invoiceLivemode obj : "metadata" Data.Aeson.Types.ToJSON..= invoiceMetadata obj : "next_payment_attempt" Data.Aeson.Types.ToJSON..= invoiceNextPaymentAttempt obj : "number" Data.Aeson.Types.ToJSON..= invoiceNumber obj : "on_behalf_of" Data.Aeson.Types.ToJSON..= invoiceOnBehalfOf obj : "paid" Data.Aeson.Types.ToJSON..= invoicePaid obj : "payment_intent" Data.Aeson.Types.ToJSON..= invoicePaymentIntent obj : "payment_settings" Data.Aeson.Types.ToJSON..= invoicePaymentSettings obj : "period_end" Data.Aeson.Types.ToJSON..= invoicePeriodEnd obj : "period_start" Data.Aeson.Types.ToJSON..= invoicePeriodStart obj : "post_payment_credit_notes_amount" Data.Aeson.Types.ToJSON..= invoicePostPaymentCreditNotesAmount obj : "pre_payment_credit_notes_amount" Data.Aeson.Types.ToJSON..= invoicePrePaymentCreditNotesAmount obj : "receipt_number" Data.Aeson.Types.ToJSON..= invoiceReceiptNumber obj : "starting_balance" Data.Aeson.Types.ToJSON..= invoiceStartingBalance obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= invoiceStatementDescriptor obj : "status" Data.Aeson.Types.ToJSON..= invoiceStatus obj : "status_transitions" Data.Aeson.Types.ToJSON..= invoiceStatusTransitions obj : "subscription" Data.Aeson.Types.ToJSON..= invoiceSubscription obj : "subscription_proration_date" Data.Aeson.Types.ToJSON..= invoiceSubscriptionProrationDate obj : "subtotal" Data.Aeson.Types.ToJSON..= invoiceSubtotal obj : "tax" Data.Aeson.Types.ToJSON..= invoiceTax obj : "threshold_reason" Data.Aeson.Types.ToJSON..= invoiceThresholdReason obj : "total" Data.Aeson.Types.ToJSON..= invoiceTotal obj : "total_discount_amounts" Data.Aeson.Types.ToJSON..= invoiceTotalDiscountAmounts obj : "total_tax_amounts" Data.Aeson.Types.ToJSON..= invoiceTotalTaxAmounts obj : "transfer_data" Data.Aeson.Types.ToJSON..= invoiceTransferData obj : "webhooks_delivered_at" Data.Aeson.Types.ToJSON..= invoiceWebhooksDeliveredAt obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "invoice" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account_country" Data.Aeson.Types.ToJSON..= invoiceAccountCountry obj) GHC.Base.<> (("account_name" Data.Aeson.Types.ToJSON..= invoiceAccountName obj) GHC.Base.<> (("account_tax_ids" Data.Aeson.Types.ToJSON..= invoiceAccountTaxIds obj) GHC.Base.<> (("amount_due" Data.Aeson.Types.ToJSON..= invoiceAmountDue obj) GHC.Base.<> (("amount_paid" Data.Aeson.Types.ToJSON..= invoiceAmountPaid obj) GHC.Base.<> (("amount_remaining" Data.Aeson.Types.ToJSON..= invoiceAmountRemaining obj) GHC.Base.<> (("application_fee_amount" Data.Aeson.Types.ToJSON..= invoiceApplicationFeeAmount obj) GHC.Base.<> (("attempt_count" Data.Aeson.Types.ToJSON..= invoiceAttemptCount obj) GHC.Base.<> (("attempted" Data.Aeson.Types.ToJSON..= invoiceAttempted obj) GHC.Base.<> (("auto_advance" Data.Aeson.Types.ToJSON..= invoiceAutoAdvance obj) GHC.Base.<> (("automatic_tax" Data.Aeson.Types.ToJSON..= invoiceAutomaticTax obj) GHC.Base.<> (("billing_reason" Data.Aeson.Types.ToJSON..= invoiceBillingReason obj) GHC.Base.<> (("charge" Data.Aeson.Types.ToJSON..= invoiceCharge obj) GHC.Base.<> (("collection_method" Data.Aeson.Types.ToJSON..= invoiceCollectionMethod obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= invoiceCreated obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= invoiceCurrency obj) GHC.Base.<> (("custom_fields" Data.Aeson.Types.ToJSON..= invoiceCustomFields obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= invoiceCustomer obj) GHC.Base.<> (("customer_address" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress obj) GHC.Base.<> (("customer_email" Data.Aeson.Types.ToJSON..= invoiceCustomerEmail obj) GHC.Base.<> (("customer_name" Data.Aeson.Types.ToJSON..= invoiceCustomerName obj) GHC.Base.<> (("customer_phone" Data.Aeson.Types.ToJSON..= invoiceCustomerPhone obj) GHC.Base.<> (("customer_shipping" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping obj) GHC.Base.<> (("customer_tax_exempt" Data.Aeson.Types.ToJSON..= invoiceCustomerTaxExempt obj) GHC.Base.<> (("customer_tax_ids" Data.Aeson.Types.ToJSON..= invoiceCustomerTaxIds obj) GHC.Base.<> (("default_payment_method" Data.Aeson.Types.ToJSON..= invoiceDefaultPaymentMethod obj) GHC.Base.<> (("default_source" Data.Aeson.Types.ToJSON..= invoiceDefaultSource obj) GHC.Base.<> (("default_tax_rates" Data.Aeson.Types.ToJSON..= invoiceDefaultTaxRates obj) GHC.Base.<> (("description" Data.Aeson.Types.ToJSON..= invoiceDescription obj) GHC.Base.<> (("discount" Data.Aeson.Types.ToJSON..= invoiceDiscount obj) GHC.Base.<> (("discounts" Data.Aeson.Types.ToJSON..= invoiceDiscounts obj) GHC.Base.<> (("due_date" Data.Aeson.Types.ToJSON..= invoiceDueDate obj) GHC.Base.<> (("ending_balance" Data.Aeson.Types.ToJSON..= invoiceEndingBalance obj) GHC.Base.<> (("footer" Data.Aeson.Types.ToJSON..= invoiceFooter obj) GHC.Base.<> (("hosted_invoice_url" Data.Aeson.Types.ToJSON..= invoiceHostedInvoiceUrl obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= invoiceId obj) GHC.Base.<> (("invoice_pdf" Data.Aeson.Types.ToJSON..= invoiceInvoicePdf obj) GHC.Base.<> (("last_finalization_error" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError obj) GHC.Base.<> (("lines" Data.Aeson.Types.ToJSON..= invoiceLines obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= invoiceLivemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= invoiceMetadata obj) GHC.Base.<> (("next_payment_attempt" Data.Aeson.Types.ToJSON..= invoiceNextPaymentAttempt obj) GHC.Base.<> (("number" Data.Aeson.Types.ToJSON..= invoiceNumber obj) GHC.Base.<> (("on_behalf_of" Data.Aeson.Types.ToJSON..= invoiceOnBehalfOf obj) GHC.Base.<> (("paid" Data.Aeson.Types.ToJSON..= invoicePaid obj) GHC.Base.<> (("payment_intent" Data.Aeson.Types.ToJSON..= invoicePaymentIntent obj) GHC.Base.<> (("payment_settings" Data.Aeson.Types.ToJSON..= invoicePaymentSettings obj) GHC.Base.<> (("period_end" Data.Aeson.Types.ToJSON..= invoicePeriodEnd obj) GHC.Base.<> (("period_start" Data.Aeson.Types.ToJSON..= invoicePeriodStart obj) GHC.Base.<> (("post_payment_credit_notes_amount" Data.Aeson.Types.ToJSON..= invoicePostPaymentCreditNotesAmount obj) GHC.Base.<> (("pre_payment_credit_notes_amount" Data.Aeson.Types.ToJSON..= invoicePrePaymentCreditNotesAmount obj) GHC.Base.<> (("receipt_number" Data.Aeson.Types.ToJSON..= invoiceReceiptNumber obj) GHC.Base.<> (("starting_balance" Data.Aeson.Types.ToJSON..= invoiceStartingBalance obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= invoiceStatementDescriptor obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= invoiceStatus obj) GHC.Base.<> (("status_transitions" Data.Aeson.Types.ToJSON..= invoiceStatusTransitions obj) GHC.Base.<> (("subscription" Data.Aeson.Types.ToJSON..= invoiceSubscription obj) GHC.Base.<> (("subscription_proration_date" Data.Aeson.Types.ToJSON..= invoiceSubscriptionProrationDate obj) GHC.Base.<> (("subtotal" Data.Aeson.Types.ToJSON..= invoiceSubtotal obj) GHC.Base.<> (("tax" Data.Aeson.Types.ToJSON..= invoiceTax obj) GHC.Base.<> (("threshold_reason" Data.Aeson.Types.ToJSON..= invoiceThresholdReason obj) GHC.Base.<> (("total" Data.Aeson.Types.ToJSON..= invoiceTotal obj) GHC.Base.<> (("total_discount_amounts" Data.Aeson.Types.ToJSON..= invoiceTotalDiscountAmounts obj) GHC.Base.<> (("total_tax_amounts" Data.Aeson.Types.ToJSON..= invoiceTotalTaxAmounts obj) GHC.Base.<> (("transfer_data" Data.Aeson.Types.ToJSON..= invoiceTransferData obj) GHC.Base.<> (("webhooks_delivered_at" Data.Aeson.Types.ToJSON..= invoiceWebhooksDeliveredAt obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "invoice"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON Invoice where parseJSON = Data.Aeson.Types.FromJSON.withObject "Invoice" (\obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((GHC.Base.pure Invoice GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_tax_ids")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount_due")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount_paid")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "amount_remaining")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "application_fee_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "attempt_count")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "attempted")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "auto_advance")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "automatic_tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "billing_reason")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "charge")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "collection_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "custom_fields")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_shipping")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_tax_exempt")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer_tax_ids")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_source")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "default_tax_rates")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "discount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "discounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "due_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ending_balance")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "footer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "hosted_invoice_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice_pdf")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last_finalization_error")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "lines")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "next_payment_attempt")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "on_behalf_of")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "paid")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_intent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "payment_settings")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "period_end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "period_start")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "post_payment_credit_notes_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pre_payment_credit_notes_amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "receipt_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "starting_balance")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "status_transitions")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "subscription")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "subscription_proration_date")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "subtotal")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tax")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "threshold_reason")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "total")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "total_discount_amounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "total_tax_amounts")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "transfer_data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "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 invoiceAmountDue invoiceAmountPaid invoiceAmountRemaining invoiceAttemptCount invoiceAttempted invoiceAutomaticTax invoiceCreated invoiceCurrency invoiceDefaultTaxRates invoiceLines invoiceLivemode invoicePaid invoicePaymentSettings invoicePeriodEnd invoicePeriodStart invoicePostPaymentCreditNotesAmount invoicePrePaymentCreditNotesAmount invoiceStartingBalance invoiceStatusTransitions invoiceSubtotal invoiceTotal invoiceTotalTaxAmounts = Invoice { invoiceAccountCountry = GHC.Maybe.Nothing, invoiceAccountName = GHC.Maybe.Nothing, invoiceAccountTaxIds = GHC.Maybe.Nothing, invoiceAmountDue = invoiceAmountDue, invoiceAmountPaid = invoiceAmountPaid, invoiceAmountRemaining = invoiceAmountRemaining, invoiceApplicationFeeAmount = GHC.Maybe.Nothing, invoiceAttemptCount = invoiceAttemptCount, invoiceAttempted = invoiceAttempted, invoiceAutoAdvance = GHC.Maybe.Nothing, invoiceAutomaticTax = invoiceAutomaticTax, invoiceBillingReason = GHC.Maybe.Nothing, invoiceCharge = GHC.Maybe.Nothing, invoiceCollectionMethod = GHC.Maybe.Nothing, invoiceCreated = invoiceCreated, invoiceCurrency = invoiceCurrency, invoiceCustomFields = GHC.Maybe.Nothing, invoiceCustomer = GHC.Maybe.Nothing, invoiceCustomerAddress = GHC.Maybe.Nothing, invoiceCustomerEmail = GHC.Maybe.Nothing, invoiceCustomerName = GHC.Maybe.Nothing, invoiceCustomerPhone = GHC.Maybe.Nothing, invoiceCustomerShipping = GHC.Maybe.Nothing, invoiceCustomerTaxExempt = GHC.Maybe.Nothing, invoiceCustomerTaxIds = GHC.Maybe.Nothing, invoiceDefaultPaymentMethod = GHC.Maybe.Nothing, invoiceDefaultSource = GHC.Maybe.Nothing, invoiceDefaultTaxRates = invoiceDefaultTaxRates, invoiceDescription = GHC.Maybe.Nothing, invoiceDiscount = GHC.Maybe.Nothing, invoiceDiscounts = GHC.Maybe.Nothing, invoiceDueDate = GHC.Maybe.Nothing, invoiceEndingBalance = GHC.Maybe.Nothing, invoiceFooter = GHC.Maybe.Nothing, invoiceHostedInvoiceUrl = GHC.Maybe.Nothing, invoiceId = GHC.Maybe.Nothing, invoiceInvoicePdf = GHC.Maybe.Nothing, invoiceLastFinalizationError = GHC.Maybe.Nothing, invoiceLines = invoiceLines, invoiceLivemode = invoiceLivemode, invoiceMetadata = GHC.Maybe.Nothing, invoiceNextPaymentAttempt = GHC.Maybe.Nothing, invoiceNumber = GHC.Maybe.Nothing, invoiceOnBehalfOf = GHC.Maybe.Nothing, invoicePaid = invoicePaid, invoicePaymentIntent = GHC.Maybe.Nothing, invoicePaymentSettings = invoicePaymentSettings, invoicePeriodEnd = invoicePeriodEnd, invoicePeriodStart = invoicePeriodStart, invoicePostPaymentCreditNotesAmount = invoicePostPaymentCreditNotesAmount, invoicePrePaymentCreditNotesAmount = invoicePrePaymentCreditNotesAmount, invoiceReceiptNumber = GHC.Maybe.Nothing, invoiceStartingBalance = invoiceStartingBalance, invoiceStatementDescriptor = GHC.Maybe.Nothing, invoiceStatus = GHC.Maybe.Nothing, invoiceStatusTransitions = invoiceStatusTransitions, invoiceSubscription = GHC.Maybe.Nothing, invoiceSubscriptionProrationDate = GHC.Maybe.Nothing, invoiceSubtotal = invoiceSubtotal, invoiceTax = GHC.Maybe.Nothing, invoiceThresholdReason = GHC.Maybe.Nothing, invoiceTotal = invoiceTotal, invoiceTotalDiscountAmounts = GHC.Maybe.Nothing, invoiceTotalTaxAmounts = invoiceTotalTaxAmounts, invoiceTransferData = GHC.Maybe.Nothing, invoiceWebhooksDeliveredAt = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceAccountTaxIds'Variants where toJSON (InvoiceAccountTaxIds'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceAccountTaxIds'TaxId a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceAccountTaxIds'DeletedTaxId a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceAccountTaxIds'Variants where parseJSON val = case (InvoiceAccountTaxIds'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceAccountTaxIds'TaxId Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceAccountTaxIds'DeletedTaxId Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceBillingReason' where toJSON (InvoiceBillingReason'Other val) = val toJSON (InvoiceBillingReason'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceBillingReason'EnumAutomaticPendingInvoiceItemInvoice) = "automatic_pending_invoice_item_invoice" toJSON (InvoiceBillingReason'EnumManual) = "manual" toJSON (InvoiceBillingReason'EnumSubscription) = "subscription" toJSON (InvoiceBillingReason'EnumSubscriptionCreate) = "subscription_create" toJSON (InvoiceBillingReason'EnumSubscriptionCycle) = "subscription_cycle" toJSON (InvoiceBillingReason'EnumSubscriptionThreshold) = "subscription_threshold" toJSON (InvoiceBillingReason'EnumSubscriptionUpdate) = "subscription_update" toJSON (InvoiceBillingReason'EnumUpcoming) = "upcoming" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceBillingReason' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "automatic_pending_invoice_item_invoice" -> InvoiceBillingReason'EnumAutomaticPendingInvoiceItemInvoice | val GHC.Classes.== "manual" -> InvoiceBillingReason'EnumManual | val GHC.Classes.== "subscription" -> InvoiceBillingReason'EnumSubscription | val GHC.Classes.== "subscription_create" -> InvoiceBillingReason'EnumSubscriptionCreate | val GHC.Classes.== "subscription_cycle" -> InvoiceBillingReason'EnumSubscriptionCycle | val GHC.Classes.== "subscription_threshold" -> InvoiceBillingReason'EnumSubscriptionThreshold | val GHC.Classes.== "subscription_update" -> InvoiceBillingReason'EnumSubscriptionUpdate | val GHC.Classes.== "upcoming" -> InvoiceBillingReason'EnumUpcoming | GHC.Base.otherwise -> InvoiceBillingReason'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCharge'Variants where toJSON (InvoiceCharge'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceCharge'Charge a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCharge'Variants where parseJSON val = case (InvoiceCharge'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceCharge'Charge Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCollectionMethod' where toJSON (InvoiceCollectionMethod'Other val) = val toJSON (InvoiceCollectionMethod'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceCollectionMethod'EnumChargeAutomatically) = "charge_automatically" toJSON (InvoiceCollectionMethod'EnumSendInvoice) = "send_invoice" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCollectionMethod' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "charge_automatically" -> InvoiceCollectionMethod'EnumChargeAutomatically | val GHC.Classes.== "send_invoice" -> InvoiceCollectionMethod'EnumSendInvoice | GHC.Base.otherwise -> InvoiceCollectionMethod'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomer'Variants where toJSON (InvoiceCustomer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceCustomer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceCustomer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomer'Variants where parseJSON val = case (InvoiceCustomer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceCustomer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceCustomer'DeletedCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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'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'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'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'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 invoiceCustomerAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | state: State, county, province, or region. -- -- Constraints: -- -- * Maximum length of 5000 invoiceCustomerAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerAddress' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'City obj : "country" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Country obj : "line1" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= invoiceCustomerAddress'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerAddress' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceCustomerAddress'" (\obj -> (((((GHC.Base.pure InvoiceCustomerAddress' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "state")) -- | Create a new 'InvoiceCustomerAddress'' with all required fields. mkInvoiceCustomerAddress' :: InvoiceCustomerAddress' mkInvoiceCustomerAddress' = InvoiceCustomerAddress' { invoiceCustomerAddress'City = GHC.Maybe.Nothing, invoiceCustomerAddress'Country = GHC.Maybe.Nothing, invoiceCustomerAddress'Line1 = GHC.Maybe.Nothing, invoiceCustomerAddress'Line2 = GHC.Maybe.Nothing, invoiceCustomerAddress'PostalCode = GHC.Maybe.Nothing, invoiceCustomerAddress'State = 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'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'Carrier :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Recipient name. -- -- Constraints: -- -- * Maximum length of 5000 invoiceCustomerShipping'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | phone: Recipient phone (including extension). -- -- Constraints: -- -- * Maximum length of 5000 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'TrackingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerShipping' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Address obj : "carrier" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Carrier obj : "name" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Name obj : "phone" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Phone obj : "tracking_number" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'TrackingNumber obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Address obj) GHC.Base.<> (("carrier" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Carrier obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'Phone obj) GHC.Base.<> ("tracking_number" Data.Aeson.Types.ToJSON..= invoiceCustomerShipping'TrackingNumber obj))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerShipping' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceCustomerShipping'" (\obj -> ((((GHC.Base.pure InvoiceCustomerShipping' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "carrier")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tracking_number")) -- | Create a new 'InvoiceCustomerShipping'' with all required fields. mkInvoiceCustomerShipping' :: InvoiceCustomerShipping' mkInvoiceCustomerShipping' = InvoiceCustomerShipping' { invoiceCustomerShipping'Address = GHC.Maybe.Nothing, invoiceCustomerShipping'Carrier = GHC.Maybe.Nothing, invoiceCustomerShipping'Name = GHC.Maybe.Nothing, invoiceCustomerShipping'Phone = GHC.Maybe.Nothing, invoiceCustomerShipping'TrackingNumber = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceCustomerTaxExempt' where toJSON (InvoiceCustomerTaxExempt'Other val) = val toJSON (InvoiceCustomerTaxExempt'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceCustomerTaxExempt'EnumExempt) = "exempt" toJSON (InvoiceCustomerTaxExempt'EnumNone) = "none" toJSON (InvoiceCustomerTaxExempt'EnumReverse) = "reverse" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceCustomerTaxExempt' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "exempt" -> InvoiceCustomerTaxExempt'EnumExempt | val GHC.Classes.== "none" -> InvoiceCustomerTaxExempt'EnumNone | val GHC.Classes.== "reverse" -> InvoiceCustomerTaxExempt'EnumReverse | GHC.Base.otherwise -> InvoiceCustomerTaxExempt'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDefaultPaymentMethod'Variants where toJSON (InvoiceDefaultPaymentMethod'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultPaymentMethod'PaymentMethod a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDefaultPaymentMethod'Variants where parseJSON val = case (InvoiceDefaultPaymentMethod'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultPaymentMethod'PaymentMethod Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDefaultSource'Variants where toJSON (InvoiceDefaultSource'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultSource'AlipayAccount a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultSource'BankAccount a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultSource'BitcoinReceiver a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultSource'Card a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDefaultSource'Source a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDefaultSource'Variants where parseJSON val = case (InvoiceDefaultSource'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultSource'AlipayAccount Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultSource'BankAccount Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultSource'BitcoinReceiver Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultSource'Card Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDefaultSource'Source Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched"))))) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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'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'Coupon :: (GHC.Maybe.Maybe Coupon), -- | customer: The ID of the customer associated with this discount. 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'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'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'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'InvoiceItem :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | object: String representing the object\'s type. Objects of the same type share the same value. invoiceDiscount'Object :: (GHC.Maybe.Maybe InvoiceDiscount'Object'), -- | promotion_code: The promotion code applied to create this discount. invoiceDiscount'PromotionCode :: (GHC.Maybe.Maybe InvoiceDiscount'PromotionCode'Variants), -- | start: Date that the coupon was applied. 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'Subscription :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount' where toJSON obj = Data.Aeson.Types.Internal.object ("checkout_session" Data.Aeson.Types.ToJSON..= invoiceDiscount'CheckoutSession obj : "coupon" Data.Aeson.Types.ToJSON..= invoiceDiscount'Coupon obj : "customer" Data.Aeson.Types.ToJSON..= invoiceDiscount'Customer obj : "end" Data.Aeson.Types.ToJSON..= invoiceDiscount'End obj : "id" Data.Aeson.Types.ToJSON..= invoiceDiscount'Id obj : "invoice" Data.Aeson.Types.ToJSON..= invoiceDiscount'Invoice obj : "invoice_item" Data.Aeson.Types.ToJSON..= invoiceDiscount'InvoiceItem obj : "object" Data.Aeson.Types.ToJSON..= invoiceDiscount'Object obj : "promotion_code" Data.Aeson.Types.ToJSON..= invoiceDiscount'PromotionCode obj : "start" Data.Aeson.Types.ToJSON..= invoiceDiscount'Start obj : "subscription" Data.Aeson.Types.ToJSON..= invoiceDiscount'Subscription obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("checkout_session" Data.Aeson.Types.ToJSON..= invoiceDiscount'CheckoutSession obj) GHC.Base.<> (("coupon" Data.Aeson.Types.ToJSON..= invoiceDiscount'Coupon obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= invoiceDiscount'Customer obj) GHC.Base.<> (("end" Data.Aeson.Types.ToJSON..= invoiceDiscount'End obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= invoiceDiscount'Id obj) GHC.Base.<> (("invoice" Data.Aeson.Types.ToJSON..= invoiceDiscount'Invoice obj) GHC.Base.<> (("invoice_item" Data.Aeson.Types.ToJSON..= invoiceDiscount'InvoiceItem obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= invoiceDiscount'Object obj) GHC.Base.<> (("promotion_code" Data.Aeson.Types.ToJSON..= invoiceDiscount'PromotionCode obj) GHC.Base.<> (("start" Data.Aeson.Types.ToJSON..= invoiceDiscount'Start obj) GHC.Base.<> ("subscription" Data.Aeson.Types.ToJSON..= invoiceDiscount'Subscription obj))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceDiscount'" (\obj -> ((((((((((GHC.Base.pure InvoiceDiscount' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "checkout_session")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "coupon")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "end")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "invoice_item")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "promotion_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "start")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "subscription")) -- | Create a new 'InvoiceDiscount'' with all required fields. mkInvoiceDiscount' :: InvoiceDiscount' mkInvoiceDiscount' = InvoiceDiscount' { invoiceDiscount'CheckoutSession = GHC.Maybe.Nothing, invoiceDiscount'Coupon = GHC.Maybe.Nothing, invoiceDiscount'Customer = GHC.Maybe.Nothing, invoiceDiscount'End = GHC.Maybe.Nothing, invoiceDiscount'Id = GHC.Maybe.Nothing, invoiceDiscount'Invoice = GHC.Maybe.Nothing, invoiceDiscount'InvoiceItem = GHC.Maybe.Nothing, invoiceDiscount'Object = GHC.Maybe.Nothing, invoiceDiscount'PromotionCode = GHC.Maybe.Nothing, invoiceDiscount'Start = GHC.Maybe.Nothing, invoiceDiscount'Subscription = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount'Customer'Variants where toJSON (InvoiceDiscount'Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDiscount'Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDiscount'Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount'Customer'Variants where parseJSON val = case (InvoiceDiscount'Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDiscount'Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDiscount'Customer'DeletedCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @components.schemas.invoice.properties.discount.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data InvoiceDiscount'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. InvoiceDiscount'Object'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. InvoiceDiscount'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"discount"@ InvoiceDiscount'Object'EnumDiscount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount'Object' where toJSON (InvoiceDiscount'Object'Other val) = val toJSON (InvoiceDiscount'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceDiscount'Object'EnumDiscount) = "discount" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "discount" -> InvoiceDiscount'Object'EnumDiscount | GHC.Base.otherwise -> InvoiceDiscount'Object'Other val ) -- | 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscount'PromotionCode'Variants where toJSON (InvoiceDiscount'PromotionCode'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDiscount'PromotionCode'PromotionCode a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscount'PromotionCode'Variants where parseJSON val = case (InvoiceDiscount'PromotionCode'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDiscount'PromotionCode'PromotionCode Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceDiscounts'Variants where toJSON (InvoiceDiscounts'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDiscounts'Discount a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceDiscounts'DeletedDiscount a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceDiscounts'Variants where parseJSON val = case (InvoiceDiscounts'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDiscounts'Discount Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceDiscounts'DeletedDiscount Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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'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'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'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'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'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'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'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'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'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'SetupIntent :: (GHC.Maybe.Maybe SetupIntent), -- | source: The source object for errors returned on a request involving a 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'Type :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Type') } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError' where toJSON obj = Data.Aeson.Types.Internal.object ("charge" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Charge obj : "code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Code obj : "decline_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'DeclineCode obj : "doc_url" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'DocUrl obj : "message" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Message obj : "param" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Param obj : "payment_intent" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentIntent obj : "payment_method" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentMethod obj : "payment_method_type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentMethodType obj : "setup_intent" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'SetupIntent obj : "source" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source obj : "type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Type obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("charge" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Charge obj) GHC.Base.<> (("code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Code obj) GHC.Base.<> (("decline_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'DeclineCode obj) GHC.Base.<> (("doc_url" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'DocUrl obj) GHC.Base.<> (("message" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Message obj) GHC.Base.<> (("param" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Param obj) GHC.Base.<> (("payment_intent" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentIntent obj) GHC.Base.<> (("payment_method" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentMethod obj) GHC.Base.<> (("payment_method_type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'PaymentMethodType obj) GHC.Base.<> (("setup_intent" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'SetupIntent obj) GHC.Base.<> (("source" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Type obj)))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLastFinalizationError'" (\obj -> (((((((((((GHC.Base.pure InvoiceLastFinalizationError' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "charge")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "decline_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "doc_url")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "message")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "param")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_intent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "payment_method_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "setup_intent")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "source")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) -- | Create a new 'InvoiceLastFinalizationError'' with all required fields. mkInvoiceLastFinalizationError' :: InvoiceLastFinalizationError' mkInvoiceLastFinalizationError' = InvoiceLastFinalizationError' { invoiceLastFinalizationError'Charge = GHC.Maybe.Nothing, invoiceLastFinalizationError'Code = GHC.Maybe.Nothing, invoiceLastFinalizationError'DeclineCode = GHC.Maybe.Nothing, invoiceLastFinalizationError'DocUrl = GHC.Maybe.Nothing, invoiceLastFinalizationError'Message = GHC.Maybe.Nothing, invoiceLastFinalizationError'Param = GHC.Maybe.Nothing, invoiceLastFinalizationError'PaymentIntent = GHC.Maybe.Nothing, invoiceLastFinalizationError'PaymentMethod = GHC.Maybe.Nothing, invoiceLastFinalizationError'PaymentMethodType = GHC.Maybe.Nothing, invoiceLastFinalizationError'SetupIntent = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source = GHC.Maybe.Nothing, invoiceLastFinalizationError'Type = 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'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'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'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ach_credit_transfer invoiceLastFinalizationError'Source'AchCreditTransfer :: (GHC.Maybe.Maybe SourceTypeAchCreditTransfer), -- | ach_debit invoiceLastFinalizationError'Source'AchDebit :: (GHC.Maybe.Maybe SourceTypeAchDebit), -- | acss_debit invoiceLastFinalizationError'Source'AcssDebit :: (GHC.Maybe.Maybe SourceTypeAcssDebit), -- | address_city: City\/District\/Suburb\/Town\/Village. -- -- Constraints: -- -- * Maximum length of 5000 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'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'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'AddressLine1Check :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_line2: Address line 2 (Apartment\/Suite\/Unit\/Building). -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'AddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_state: State\/County\/Province\/Region. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'AddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | address_zip: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 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'AddressZipCheck :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | alipay 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'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | au_becs_debit 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'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([InvoiceLastFinalizationError'Source'AvailablePayoutMethods'])), -- | bancontact 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'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'Brand :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | card invoiceLastFinalizationError'Source'Card :: (GHC.Maybe.Maybe SourceTypeCard), -- | card_present 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'ClientSecret :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | code_verification: 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'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'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'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The ID of the customer that the bank account is associated with. 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'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'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'DynamicLast4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | eps invoiceLastFinalizationError'Source'Eps :: (GHC.Maybe.Maybe SourceTypeEps), -- | exp_month: Two-digit number representing the card\'s expiration month. invoiceLastFinalizationError'Source'ExpMonth :: (GHC.Maybe.Maybe GHC.Types.Int), -- | exp_year: Four-digit number representing the card\'s expiration year. 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'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'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'Funding :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | giropay invoiceLastFinalizationError'Source'Giropay :: (GHC.Maybe.Maybe SourceTypeGiropay), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | ideal invoiceLastFinalizationError'Source'Ideal :: (GHC.Maybe.Maybe SourceTypeIdeal), -- | klarna invoiceLastFinalizationError'Source'Klarna :: (GHC.Maybe.Maybe SourceTypeKlarna), -- | last4: The last four digits of the bank account number. -- -- Constraints: -- -- * Maximum length of 5000 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'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'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | multibanco invoiceLastFinalizationError'Source'Multibanco :: (GHC.Maybe.Maybe SourceTypeMultibanco), -- | name: Cardholder name. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | object: String representing the object\'s type. Objects of the same type share the same value. invoiceLastFinalizationError'Source'Object :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Object'), -- | owner: Information about the owner of the payment instrument that may be used or required by particular source types. invoiceLastFinalizationError'Source'Owner :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Owner'), -- | p24 invoiceLastFinalizationError'Source'P24 :: (GHC.Maybe.Maybe SourceTypeP24), -- | receiver: 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'Recipient :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Recipient'Variants), -- | redirect: invoiceLastFinalizationError'Source'Redirect :: (GHC.Maybe.Maybe SourceRedirectFlow), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | sepa_debit invoiceLastFinalizationError'Source'SepaDebit :: (GHC.Maybe.Maybe SourceTypeSepaDebit), -- | sofort invoiceLastFinalizationError'Source'Sofort :: (GHC.Maybe.Maybe SourceTypeSofort), -- | source_order: 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'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'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | three_d_secure 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'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'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'Usage :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | wechat invoiceLastFinalizationError'Source'Wechat :: (GHC.Maybe.Maybe SourceTypeWechat) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source' where toJSON obj = Data.Aeson.Types.Internal.object ("account" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Account obj : "account_holder_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AccountHolderType obj : "ach_credit_transfer" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AchCreditTransfer obj : "ach_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AchDebit obj : "acss_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AcssDebit obj : "address_city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressCity obj : "address_country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressCountry obj : "address_line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine1 obj : "address_line1_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine1Check obj : "address_line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine2 obj : "address_state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressState obj : "address_zip" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressZip obj : "address_zip_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressZipCheck obj : "alipay" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Alipay obj : "amount" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Amount obj : "au_becs_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AuBecsDebit obj : "available_payout_methods" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AvailablePayoutMethods obj : "bancontact" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Bancontact obj : "bank_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'BankName obj : "brand" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Brand obj : "card" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Card obj : "card_present" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CardPresent obj : "client_secret" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ClientSecret obj : "code_verification" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CodeVerification obj : "country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Country obj : "created" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Created obj : "currency" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Currency obj : "customer" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Customer obj : "cvc_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CvcCheck obj : "default_for_currency" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'DefaultForCurrency obj : "dynamic_last4" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'DynamicLast4 obj : "eps" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Eps obj : "exp_month" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ExpMonth obj : "exp_year" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ExpYear obj : "fingerprint" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Fingerprint obj : "flow" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Flow obj : "funding" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Funding obj : "giropay" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Giropay obj : "id" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Id obj : "ideal" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Ideal obj : "klarna" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Klarna obj : "last4" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Last4 obj : "livemode" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Livemode obj : "metadata" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Metadata obj : "multibanco" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Multibanco obj : "name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Name obj : "object" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Object obj : "owner" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner obj : "p24" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'P24 obj : "receiver" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Receiver obj : "recipient" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Recipient obj : "redirect" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Redirect obj : "routing_number" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'RoutingNumber obj : "sepa_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'SepaDebit obj : "sofort" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Sofort obj : "source_order" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'SourceOrder obj : "statement_descriptor" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'StatementDescriptor obj : "status" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Status obj : "three_d_secure" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ThreeDSecure obj : "tokenization_method" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'TokenizationMethod obj : "type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Type obj : "usage" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Usage obj : "wechat" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Wechat obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Account obj) GHC.Base.<> (("account_holder_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AccountHolderType obj) GHC.Base.<> (("ach_credit_transfer" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AchCreditTransfer obj) GHC.Base.<> (("ach_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AchDebit obj) GHC.Base.<> (("acss_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AcssDebit obj) GHC.Base.<> (("address_city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressCity obj) GHC.Base.<> (("address_country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressCountry obj) GHC.Base.<> (("address_line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine1 obj) GHC.Base.<> (("address_line1_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine1Check obj) GHC.Base.<> (("address_line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressLine2 obj) GHC.Base.<> (("address_state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressState obj) GHC.Base.<> (("address_zip" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressZip obj) GHC.Base.<> (("address_zip_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AddressZipCheck obj) GHC.Base.<> (("alipay" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Alipay obj) GHC.Base.<> (("amount" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Amount obj) GHC.Base.<> (("au_becs_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AuBecsDebit obj) GHC.Base.<> (("available_payout_methods" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'AvailablePayoutMethods obj) GHC.Base.<> (("bancontact" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Bancontact obj) GHC.Base.<> (("bank_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'BankName obj) GHC.Base.<> (("brand" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Brand obj) GHC.Base.<> (("card" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Card obj) GHC.Base.<> (("card_present" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CardPresent obj) GHC.Base.<> (("client_secret" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ClientSecret obj) GHC.Base.<> (("code_verification" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CodeVerification obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Country obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Created obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Currency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Customer obj) GHC.Base.<> (("cvc_check" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'CvcCheck obj) GHC.Base.<> (("default_for_currency" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'DefaultForCurrency obj) GHC.Base.<> (("dynamic_last4" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'DynamicLast4 obj) GHC.Base.<> (("eps" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Eps obj) GHC.Base.<> (("exp_month" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ExpMonth obj) GHC.Base.<> (("exp_year" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ExpYear obj) GHC.Base.<> (("fingerprint" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Fingerprint obj) GHC.Base.<> (("flow" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Flow obj) GHC.Base.<> (("funding" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Funding obj) GHC.Base.<> (("giropay" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Giropay obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Id obj) GHC.Base.<> (("ideal" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Ideal obj) GHC.Base.<> (("klarna" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Klarna obj) GHC.Base.<> (("last4" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Last4 obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Livemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Metadata obj) GHC.Base.<> (("multibanco" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Multibanco obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Name obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Object obj) GHC.Base.<> (("owner" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner obj) GHC.Base.<> (("p24" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'P24 obj) GHC.Base.<> (("receiver" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Receiver obj) GHC.Base.<> (("recipient" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Recipient obj) GHC.Base.<> (("redirect" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Redirect obj) GHC.Base.<> (("routing_number" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'RoutingNumber obj) GHC.Base.<> (("sepa_debit" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'SepaDebit obj) GHC.Base.<> (("sofort" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Sofort obj) GHC.Base.<> (("source_order" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'SourceOrder obj) GHC.Base.<> (("statement_descriptor" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'StatementDescriptor obj) GHC.Base.<> (("status" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Status obj) GHC.Base.<> (("three_d_secure" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'ThreeDSecure obj) GHC.Base.<> (("tokenization_method" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'TokenizationMethod obj) GHC.Base.<> (("type" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Type obj) GHC.Base.<> (("usage" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Usage obj) GHC.Base.<> ("wechat" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Wechat obj)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLastFinalizationError'Source'" (\obj -> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((GHC.Base.pure InvoiceLastFinalizationError'Source' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_credit_transfer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ach_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "acss_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line1_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_state")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address_zip_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "alipay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "au_becs_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "available_payout_methods")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bancontact")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "brand")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "card_present")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "client_secret")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "code_verification")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cvc_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_for_currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "dynamic_last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "eps")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_month")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "exp_year")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "fingerprint")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "flow")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "funding")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "giropay")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "ideal")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "klarna")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "multibanco")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "owner")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "p24")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "receiver")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "recipient")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "redirect")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "routing_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sepa_debit")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "sofort")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "source_order")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "statement_descriptor")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "status")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "three_d_secure")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "tokenization_method")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "usage")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "wechat")) -- | Create a new 'InvoiceLastFinalizationError'Source'' with all required fields. mkInvoiceLastFinalizationError'Source' :: InvoiceLastFinalizationError'Source' mkInvoiceLastFinalizationError'Source' = InvoiceLastFinalizationError'Source' { invoiceLastFinalizationError'Source'Account = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AccountHolderName = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AccountHolderType = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AchCreditTransfer = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AchDebit = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AcssDebit = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressCity = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressCountry = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressLine1 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressLine1Check = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressLine2 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressState = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressZip = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AddressZipCheck = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Alipay = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Amount = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AuBecsDebit = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'AvailablePayoutMethods = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Bancontact = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'BankName = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Brand = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Card = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'CardPresent = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'ClientSecret = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'CodeVerification = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Country = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Created = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Currency = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Customer = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'CvcCheck = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'DefaultForCurrency = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'DynamicLast4 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Eps = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'ExpMonth = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'ExpYear = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Fingerprint = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Flow = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Funding = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Giropay = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Id = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Ideal = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Klarna = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Last4 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Livemode = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Metadata = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Multibanco = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Name = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Object = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'P24 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Receiver = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Recipient = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Redirect = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'RoutingNumber = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'SepaDebit = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Sofort = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'SourceOrder = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'StatementDescriptor = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Status = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'ThreeDSecure = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'TokenizationMethod = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Type = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Usage = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Wechat = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Account'Variants where toJSON (InvoiceLastFinalizationError'Source'Account'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceLastFinalizationError'Source'Account'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Account'Variants where parseJSON val = case (InvoiceLastFinalizationError'Source'Account'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceLastFinalizationError'Source'Account'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'AvailablePayoutMethods' where toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Other val) = val toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumInstant) = "instant" toJSON (InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'AvailablePayoutMethods' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumInstant | val GHC.Classes.== "standard" -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'EnumStandard | GHC.Base.otherwise -> InvoiceLastFinalizationError'Source'AvailablePayoutMethods'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Customer'Variants where toJSON (InvoiceLastFinalizationError'Source'Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceLastFinalizationError'Source'Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceLastFinalizationError'Source'Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Customer'Variants where parseJSON val = case (InvoiceLastFinalizationError'Source'Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceLastFinalizationError'Source'Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceLastFinalizationError'Source'Customer'DeletedCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @components.schemas.invoice.properties.last_finalization_error.anyOf.properties.source.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data InvoiceLastFinalizationError'Source'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. InvoiceLastFinalizationError'Source'Object'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'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"bank_account"@ InvoiceLastFinalizationError'Source'Object'EnumBankAccount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Object' where toJSON (InvoiceLastFinalizationError'Source'Object'Other val) = val toJSON (InvoiceLastFinalizationError'Source'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceLastFinalizationError'Source'Object'EnumBankAccount) = "bank_account" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "bank_account" -> InvoiceLastFinalizationError'Source'Object'EnumBankAccount | GHC.Base.otherwise -> InvoiceLastFinalizationError'Source'Object'Other val ) -- | 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'Address :: (GHC.Maybe.Maybe InvoiceLastFinalizationError'Source'Owner'Address'), -- | email: Owner\'s email address. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLastFinalizationError'Source'Owner'Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | name: Owner\'s full name. -- -- Constraints: -- -- * Maximum length of 5000 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'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'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'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'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'VerifiedPhone :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner' where toJSON obj = Data.Aeson.Types.Internal.object ("address" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address obj : "email" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Email obj : "name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Name obj : "phone" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Phone obj : "verified_address" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress obj : "verified_email" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedEmail obj : "verified_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedName obj : "verified_phone" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedPhone obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Email obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Name obj) GHC.Base.<> (("phone" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Phone obj) GHC.Base.<> (("verified_address" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress obj) GHC.Base.<> (("verified_email" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedEmail obj) GHC.Base.<> (("verified_name" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedName obj) GHC.Base.<> ("verified_phone" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedPhone obj)))))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLastFinalizationError'Source'Owner'" (\obj -> (((((((GHC.Base.pure InvoiceLastFinalizationError'Source'Owner' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "phone")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_address")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "verified_phone")) -- | Create a new 'InvoiceLastFinalizationError'Source'Owner'' with all required fields. mkInvoiceLastFinalizationError'Source'Owner' :: InvoiceLastFinalizationError'Source'Owner' mkInvoiceLastFinalizationError'Source'Owner' = InvoiceLastFinalizationError'Source'Owner' { invoiceLastFinalizationError'Source'Owner'Address = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Email = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Name = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Phone = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedEmail = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedName = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedPhone = 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'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'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'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'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 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'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner'Address' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'City obj : "country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Country obj : "line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'Address'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner'Address' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLastFinalizationError'Source'Owner'Address'" (\obj -> (((((GHC.Base.pure InvoiceLastFinalizationError'Source'Owner'Address' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "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' { invoiceLastFinalizationError'Source'Owner'Address'City = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Address'Country = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Address'Line1 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Address'Line2 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Address'PostalCode = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'Address'State = 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'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'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'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'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | postal_code: ZIP or postal code. -- -- Constraints: -- -- * Maximum length of 5000 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'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' where toJSON obj = Data.Aeson.Types.Internal.object ("city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City obj : "country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country obj : "line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 obj : "line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 obj : "postal_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode obj : "state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("city" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country obj) GHC.Base.<> (("line1" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 obj) GHC.Base.<> (("line2" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 obj) GHC.Base.<> (("postal_code" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode obj) GHC.Base.<> ("state" Data.Aeson.Types.ToJSON..= invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State obj)))))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLastFinalizationError'Source'Owner'VerifiedAddress'" (\obj -> (((((GHC.Base.pure InvoiceLastFinalizationError'Source'Owner'VerifiedAddress' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "city")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line1")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "line2")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "postal_code")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "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' { invoiceLastFinalizationError'Source'Owner'VerifiedAddress'City = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Country = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line1 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress'Line2 = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress'PostalCode = GHC.Maybe.Nothing, invoiceLastFinalizationError'Source'Owner'VerifiedAddress'State = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Recipient'Variants where toJSON (InvoiceLastFinalizationError'Source'Recipient'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceLastFinalizationError'Source'Recipient'Recipient a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Recipient'Variants where parseJSON val = case (InvoiceLastFinalizationError'Source'Recipient'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceLastFinalizationError'Source'Recipient'Recipient Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Source'Type' where toJSON (InvoiceLastFinalizationError'Source'Type'Other val) = val toJSON (InvoiceLastFinalizationError'Source'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceLastFinalizationError'Source'Type'EnumAchCreditTransfer) = "ach_credit_transfer" toJSON (InvoiceLastFinalizationError'Source'Type'EnumAchDebit) = "ach_debit" toJSON (InvoiceLastFinalizationError'Source'Type'EnumAcssDebit) = "acss_debit" toJSON (InvoiceLastFinalizationError'Source'Type'EnumAlipay) = "alipay" toJSON (InvoiceLastFinalizationError'Source'Type'EnumAuBecsDebit) = "au_becs_debit" toJSON (InvoiceLastFinalizationError'Source'Type'EnumBancontact) = "bancontact" toJSON (InvoiceLastFinalizationError'Source'Type'EnumCard) = "card" toJSON (InvoiceLastFinalizationError'Source'Type'EnumCardPresent) = "card_present" toJSON (InvoiceLastFinalizationError'Source'Type'EnumEps) = "eps" toJSON (InvoiceLastFinalizationError'Source'Type'EnumGiropay) = "giropay" toJSON (InvoiceLastFinalizationError'Source'Type'EnumIdeal) = "ideal" toJSON (InvoiceLastFinalizationError'Source'Type'EnumKlarna) = "klarna" toJSON (InvoiceLastFinalizationError'Source'Type'EnumMultibanco) = "multibanco" toJSON (InvoiceLastFinalizationError'Source'Type'EnumP24) = "p24" toJSON (InvoiceLastFinalizationError'Source'Type'EnumSepaDebit) = "sepa_debit" toJSON (InvoiceLastFinalizationError'Source'Type'EnumSofort) = "sofort" toJSON (InvoiceLastFinalizationError'Source'Type'EnumThreeDSecure) = "three_d_secure" toJSON (InvoiceLastFinalizationError'Source'Type'EnumWechat) = "wechat" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Source'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "ach_credit_transfer" -> InvoiceLastFinalizationError'Source'Type'EnumAchCreditTransfer | val GHC.Classes.== "ach_debit" -> InvoiceLastFinalizationError'Source'Type'EnumAchDebit | val GHC.Classes.== "acss_debit" -> InvoiceLastFinalizationError'Source'Type'EnumAcssDebit | val GHC.Classes.== "alipay" -> InvoiceLastFinalizationError'Source'Type'EnumAlipay | val GHC.Classes.== "au_becs_debit" -> InvoiceLastFinalizationError'Source'Type'EnumAuBecsDebit | val GHC.Classes.== "bancontact" -> InvoiceLastFinalizationError'Source'Type'EnumBancontact | val GHC.Classes.== "card" -> InvoiceLastFinalizationError'Source'Type'EnumCard | val GHC.Classes.== "card_present" -> InvoiceLastFinalizationError'Source'Type'EnumCardPresent | val GHC.Classes.== "eps" -> InvoiceLastFinalizationError'Source'Type'EnumEps | val GHC.Classes.== "giropay" -> InvoiceLastFinalizationError'Source'Type'EnumGiropay | val GHC.Classes.== "ideal" -> InvoiceLastFinalizationError'Source'Type'EnumIdeal | val GHC.Classes.== "klarna" -> InvoiceLastFinalizationError'Source'Type'EnumKlarna | val GHC.Classes.== "multibanco" -> InvoiceLastFinalizationError'Source'Type'EnumMultibanco | val GHC.Classes.== "p24" -> InvoiceLastFinalizationError'Source'Type'EnumP24 | val GHC.Classes.== "sepa_debit" -> InvoiceLastFinalizationError'Source'Type'EnumSepaDebit | val GHC.Classes.== "sofort" -> InvoiceLastFinalizationError'Source'Type'EnumSofort | val GHC.Classes.== "three_d_secure" -> InvoiceLastFinalizationError'Source'Type'EnumThreeDSecure | val GHC.Classes.== "wechat" -> InvoiceLastFinalizationError'Source'Type'EnumWechat | GHC.Base.otherwise -> InvoiceLastFinalizationError'Source'Type'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLastFinalizationError'Type' where toJSON (InvoiceLastFinalizationError'Type'Other val) = val toJSON (InvoiceLastFinalizationError'Type'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceLastFinalizationError'Type'EnumApiConnectionError) = "api_connection_error" toJSON (InvoiceLastFinalizationError'Type'EnumApiError) = "api_error" toJSON (InvoiceLastFinalizationError'Type'EnumAuthenticationError) = "authentication_error" toJSON (InvoiceLastFinalizationError'Type'EnumCardError) = "card_error" toJSON (InvoiceLastFinalizationError'Type'EnumIdempotencyError) = "idempotency_error" toJSON (InvoiceLastFinalizationError'Type'EnumInvalidRequestError) = "invalid_request_error" toJSON (InvoiceLastFinalizationError'Type'EnumRateLimitError) = "rate_limit_error" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLastFinalizationError'Type' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "api_connection_error" -> InvoiceLastFinalizationError'Type'EnumApiConnectionError | val GHC.Classes.== "api_error" -> InvoiceLastFinalizationError'Type'EnumApiError | val GHC.Classes.== "authentication_error" -> InvoiceLastFinalizationError'Type'EnumAuthenticationError | val GHC.Classes.== "card_error" -> InvoiceLastFinalizationError'Type'EnumCardError | val GHC.Classes.== "idempotency_error" -> InvoiceLastFinalizationError'Type'EnumIdempotencyError | val GHC.Classes.== "invalid_request_error" -> InvoiceLastFinalizationError'Type'EnumInvalidRequestError | val GHC.Classes.== "rate_limit_error" -> InvoiceLastFinalizationError'Type'EnumRateLimitError | GHC.Base.otherwise -> InvoiceLastFinalizationError'Type'Other 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'Data :: ([LineItem]), -- | has_more: True if this list has another page of items after this one that can be fetched. invoiceLines'HasMore :: GHC.Types.Bool, -- | url: The URL where this list can be accessed. -- -- Constraints: -- -- * Maximum length of 5000 invoiceLines'Url :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceLines' where toJSON obj = Data.Aeson.Types.Internal.object ("data" Data.Aeson.Types.ToJSON..= invoiceLines'Data obj : "has_more" Data.Aeson.Types.ToJSON..= invoiceLines'HasMore obj : "url" Data.Aeson.Types.ToJSON..= invoiceLines'Url obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("data" Data.Aeson.Types.ToJSON..= invoiceLines'Data obj) GHC.Base.<> (("has_more" Data.Aeson.Types.ToJSON..= invoiceLines'HasMore obj) GHC.Base.<> (("url" Data.Aeson.Types.ToJSON..= invoiceLines'Url obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list")))) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceLines' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceLines'" (\obj -> ((GHC.Base.pure InvoiceLines' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "has_more")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "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' invoiceLines'Data invoiceLines'HasMore invoiceLines'Url = InvoiceLines' { invoiceLines'Data = invoiceLines'Data, invoiceLines'HasMore = invoiceLines'HasMore, invoiceLines'Url = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceOnBehalfOf'Variants where toJSON (InvoiceOnBehalfOf'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceOnBehalfOf'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceOnBehalfOf'Variants where parseJSON val = case (InvoiceOnBehalfOf'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceOnBehalfOf'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoicePaymentIntent'Variants where toJSON (InvoicePaymentIntent'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoicePaymentIntent'PaymentIntent a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoicePaymentIntent'Variants where parseJSON val = case (InvoicePaymentIntent'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoicePaymentIntent'PaymentIntent Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceStatus' where toJSON (InvoiceStatus'Other val) = val toJSON (InvoiceStatus'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (InvoiceStatus'EnumDeleted) = "deleted" toJSON (InvoiceStatus'EnumDraft) = "draft" toJSON (InvoiceStatus'EnumOpen) = "open" toJSON (InvoiceStatus'EnumPaid) = "paid" toJSON (InvoiceStatus'EnumUncollectible) = "uncollectible" toJSON (InvoiceStatus'EnumVoid) = "void" instance Data.Aeson.Types.FromJSON.FromJSON InvoiceStatus' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "deleted" -> InvoiceStatus'EnumDeleted | val GHC.Classes.== "draft" -> InvoiceStatus'EnumDraft | val GHC.Classes.== "open" -> InvoiceStatus'EnumOpen | val GHC.Classes.== "paid" -> InvoiceStatus'EnumPaid | val GHC.Classes.== "uncollectible" -> InvoiceStatus'EnumUncollectible | val GHC.Classes.== "void" -> InvoiceStatus'EnumVoid | GHC.Base.otherwise -> InvoiceStatus'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceSubscription'Variants where toJSON (InvoiceSubscription'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceSubscription'Subscription a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceSubscription'Variants where parseJSON val = case (InvoiceSubscription'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceSubscription'Subscription Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail 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'Amount :: (GHC.Maybe.Maybe GHC.Types.Int), -- | destination: The account where funds from the payment will be transferred to upon payment success. invoiceTransferData'Destination :: (GHC.Maybe.Maybe InvoiceTransferData'Destination'Variants) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceTransferData' where toJSON obj = Data.Aeson.Types.Internal.object ("amount" Data.Aeson.Types.ToJSON..= invoiceTransferData'Amount obj : "destination" Data.Aeson.Types.ToJSON..= invoiceTransferData'Destination obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("amount" Data.Aeson.Types.ToJSON..= invoiceTransferData'Amount obj) GHC.Base.<> ("destination" Data.Aeson.Types.ToJSON..= invoiceTransferData'Destination obj)) instance Data.Aeson.Types.FromJSON.FromJSON InvoiceTransferData' where parseJSON = Data.Aeson.Types.FromJSON.withObject "InvoiceTransferData'" (\obj -> (GHC.Base.pure InvoiceTransferData' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "amount")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "destination")) -- | Create a new 'InvoiceTransferData'' with all required fields. mkInvoiceTransferData' :: InvoiceTransferData' mkInvoiceTransferData' = InvoiceTransferData' { invoiceTransferData'Amount = GHC.Maybe.Nothing, invoiceTransferData'Destination = 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON InvoiceTransferData'Destination'Variants where toJSON (InvoiceTransferData'Destination'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (InvoiceTransferData'Destination'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON InvoiceTransferData'Destination'Variants where parseJSON val = case (InvoiceTransferData'Destination'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((InvoiceTransferData'Destination'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a