stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostInvoices

Description

Contains the different functions to run the operation postInvoices

Synopsis

Documentation

postInvoices Source #

Arguments

:: forall m. MonadHTTP m 
=> PostInvoicesRequestBody

The request body to send

-> ClientT m (Response PostInvoicesResponse)

Monadic computation which returns the result of the operation

POST /v1/invoices

<p>This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you <a href="#finalize_invoice">finalize</a> the invoice, which allows you to <a href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a> the invoice to your customers.</p>

data PostInvoicesRequestBody Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema in the specification.

Constructors

PostInvoicesRequestBody 

Fields

data PostInvoicesRequestBodyAccountTaxIds'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.account_tax_ids.anyOf in the specification.

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.

data PostInvoicesRequestBodyAutomaticTax' Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.automatic_tax in the specification.

Settings for automatic tax lookup for this invoice.

data PostInvoicesRequestBodyCollectionMethod' Source #

Defines the enum schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.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. Defaults to `charge_automatically`.

Constructors

PostInvoicesRequestBodyCollectionMethod'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostInvoicesRequestBodyCollectionMethod'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostInvoicesRequestBodyCollectionMethod'EnumChargeAutomatically

Represents the JSON value "charge_automatically"

PostInvoicesRequestBodyCollectionMethod'EnumSendInvoice

Represents the JSON value "send_invoice"

data PostInvoicesRequestBodyCustomFields'OneOf1 Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.custom_fields.anyOf.items in the specification.

Constructors

PostInvoicesRequestBodyCustomFields'OneOf1 

Fields

data PostInvoicesRequestBodyCustomFields'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.custom_fields.anyOf in the specification.

A list of up to 4 custom fields to be displayed on the invoice.

data PostInvoicesRequestBodyDiscounts'OneOf1 Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.discounts.anyOf.items in the specification.

Constructors

PostInvoicesRequestBodyDiscounts'OneOf1 

Fields

data PostInvoicesRequestBodyDiscounts'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.discounts.anyOf in the specification.

The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.

data PostInvoicesRequestBodyMetadata'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.metadata.anyOf in the specification.

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

data PostInvoicesRequestBodyPaymentSettings' Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings in the specification.

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions' Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' Source #

Defines the enum schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf.properties.preferred_language in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'OneOf1PreferredLanguage' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.bancontact.anyOf in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Bancontact'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' Source #

Defines the enum schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf.properties.request_three_d_secure in the specification.

Constructors

PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAny

Represents the JSON value "any"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure'EnumAutomatic

Represents the JSON value "automatic"

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'OneOf1RequestThreeDSecure' Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_options.properties.card.anyOf in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodOptions'Card'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Source #

Defines the enum schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_types.anyOf.items in the specification.

Constructors

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchCreditTransfer

Represents the JSON value "ach_credit_transfer"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAchDebit

Represents the JSON value "ach_debit"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumAuBecsDebit

Represents the JSON value "au_becs_debit"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBacsDebit

Represents the JSON value "bacs_debit"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumBancontact

Represents the JSON value "bancontact"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumCard

Represents the JSON value "card"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumFpx

Represents the JSON value "fpx"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumGiropay

Represents the JSON value "giropay"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumIdeal

Represents the JSON value "ideal"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSepaDebit

Represents the JSON value "sepa_debit"

PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1EnumSofort

Represents the JSON value "sofort"

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'Variants Source #

Defines the oneOf schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.payment_settings.properties.payment_method_types.anyOf in the specification.

Instances

Instances details
Eq PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

Show PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

ToJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

FromJSON PostInvoicesRequestBodyPaymentSettings'PaymentMethodTypes'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostInvoices

data PostInvoicesRequestBodyTransferData' Source #

Defines the object schema located at paths./v1/invoices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.transfer_data in the specification.

If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.

data PostInvoicesResponse Source #

Represents a response of the operation postInvoices.

The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), PostInvoicesResponseError is used.

Constructors

PostInvoicesResponseError String

Means either no matching case available or a parse error

PostInvoicesResponse200 Invoice

Successful response.

PostInvoicesResponseDefault Error

Error response.