stripeapi-0.1.0.0: Stripe-Library

Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostCreditNotes

Description

Contains the different functions to run the operation postCreditNotes

Synopsis

Documentation

postCreditNotes Source #

Arguments

:: (MonadHTTP m, SecurityScheme s) 
=> Configuration s

The configuration to use in the request

-> PostCreditNotesRequestBody

The request body to send

-> m (Either HttpException (Response PostCreditNotesResponse))

Monad containing the result of the operation

POST /v1/credit_notes

<p>Issue a credit note to adjust the amount of a finalized invoice. For a <code>status=open</code> invoice, a credit note reduces its <code>amount_due</code>. For a <code>status=paid</code> invoice, a credit note does not affect its <code>amount_due</code>. Instead, it can result in any combination of the following:</p>

<ul> <li>Refund: create a new refund (using <code>refund_amount</code>) or link an existing refund (using <code>refund</code>).</li> <li>Customer balance credit: credit the customer’s balance (using <code>credit_amount</code>) which will be automatically applied to their next invoice when it’s finalized.</li> <li>Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using <code>out_of_band_amount</code>).</li> </ul>

<p>For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.</p>

<p>You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s <code>pre_payment_credit_notes_amount</code> or <code>post_payment_credit_notes_amount</code> depending on its <code>status</code> at the time of credit note creation.</p>

postCreditNotesRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostCreditNotesRequestBody -> m (Either HttpException (Response ByteString)) Source #

POST /v1/credit_notes

The same as postCreditNotes but returns the raw ByteString

data PostCreditNotesRequestBody Source #

Defines the data type for the schema postCreditNotesRequestBody

Constructors

PostCreditNotesRequestBody 

Fields

data PostCreditNotesRequestBodyLines' Source #

Defines the data type for the schema postCreditNotesRequestBodyLines'

data PostCreditNotesRequestBodyLines'TaxRates'OneOf1 Source #

Defines the enum schema postCreditNotesRequestBodyLines'Tax_rates'OneOf1

data PostCreditNotesRequestBodyLines'TaxRates'Variants Source #

Define the one-of schema postCreditNotesRequestBodyLines'Tax_rates'

Instances
Eq PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

Show PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

Generic PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

ToJSON PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

FromJSON PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

type Rep PostCreditNotesRequestBodyLines'TaxRates'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCreditNotes

type Rep PostCreditNotesRequestBodyLines'TaxRates'Variants = D1 (MetaData "PostCreditNotesRequestBodyLines'TaxRates'Variants" "StripeAPI.Operations.PostCreditNotes" "stripeapi-0.1.0.0-A3hJyYFbMZN6w4qjBpK6b6" False) (C1 (MetaCons "PostCreditNotesRequestBodyLines'TaxRates'PostCreditNotesRequestBodyLines'TaxRates'OneOf1" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostCreditNotesRequestBodyLines'TaxRates'OneOf1)) :+: C1 (MetaCons "PostCreditNotesRequestBodyLines'TaxRates'ListString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))

data PostCreditNotesRequestBodyLines'Type' Source #

Defines the enum schema postCreditNotesRequestBodyLines'Type'

data PostCreditNotesRequestBodyMetadata' Source #

Defines the data type for the schema postCreditNotesRequestBodyMetadata'

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 PostCreditNotesRequestBodyReason' Source #

Defines the enum schema postCreditNotesRequestBodyReason'

Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`

data PostCreditNotesResponse Source #

Represents a response of the operation postCreditNotes.

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), PostCreditNotesResponseError is used.

Constructors

PostCreditNotesResponseError String

Means either no matching case available or a parse error

PostCreditNotesResponse200 CreditNote

Successful response.

PostCreditNotesResponseDefault Error

Error response.