Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postCreditNotes
Synopsis
- postCreditNotes :: forall m. MonadHTTP m => PostCreditNotesRequestBody -> ClientT m (Response PostCreditNotesResponse)
- data PostCreditNotesRequestBody = PostCreditNotesRequestBody {
- postCreditNotesRequestBodyAmount :: Maybe Int
- postCreditNotesRequestBodyCreditAmount :: Maybe Int
- postCreditNotesRequestBodyExpand :: Maybe [Text]
- postCreditNotesRequestBodyInvoice :: Text
- postCreditNotesRequestBodyLines :: Maybe [PostCreditNotesRequestBodyLines']
- postCreditNotesRequestBodyMemo :: Maybe Text
- postCreditNotesRequestBodyMetadata :: Maybe Object
- postCreditNotesRequestBodyOutOfBandAmount :: Maybe Int
- postCreditNotesRequestBodyReason :: Maybe PostCreditNotesRequestBodyReason'
- postCreditNotesRequestBodyRefund :: Maybe Text
- postCreditNotesRequestBodyRefundAmount :: Maybe Int
- mkPostCreditNotesRequestBody :: Text -> PostCreditNotesRequestBody
- data PostCreditNotesRequestBodyLines' = PostCreditNotesRequestBodyLines' {
- postCreditNotesRequestBodyLines'Amount :: Maybe Int
- postCreditNotesRequestBodyLines'Description :: Maybe Text
- postCreditNotesRequestBodyLines'InvoiceLineItem :: Maybe Text
- postCreditNotesRequestBodyLines'Quantity :: Maybe Int
- postCreditNotesRequestBodyLines'TaxRates :: Maybe PostCreditNotesRequestBodyLines'TaxRates'Variants
- postCreditNotesRequestBodyLines'Type :: PostCreditNotesRequestBodyLines'Type'
- postCreditNotesRequestBodyLines'UnitAmount :: Maybe Int
- postCreditNotesRequestBodyLines'UnitAmountDecimal :: Maybe Text
- mkPostCreditNotesRequestBodyLines' :: PostCreditNotesRequestBodyLines'Type' -> PostCreditNotesRequestBodyLines'
- data PostCreditNotesRequestBodyLines'TaxRates'Variants
- data PostCreditNotesRequestBodyLines'Type'
- data PostCreditNotesRequestBodyReason'
- data PostCreditNotesResponse
Documentation
:: forall m. MonadHTTP m | |
=> PostCreditNotesRequestBody | The request body to send |
-> ClientT m (Response PostCreditNotesResponse) | Monadic computation which returns 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>
data PostCreditNotesRequestBody Source #
Defines the object schema located at paths./v1/credit_notes.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostCreditNotesRequestBody | |
|
Instances
mkPostCreditNotesRequestBody Source #
Create a new PostCreditNotesRequestBody
with all required fields.
data PostCreditNotesRequestBodyLines' Source #
Defines the object schema located at paths./v1/credit_notes.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.lines.items
in the specification.
PostCreditNotesRequestBodyLines' | |
|
mkPostCreditNotesRequestBodyLines' Source #
Create a new PostCreditNotesRequestBodyLines'
with all required fields.
data PostCreditNotesRequestBodyLines'TaxRates'Variants Source #
Defines the oneOf schema located at paths./v1/credit_notes.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.lines.items.properties.tax_rates.anyOf
in the specification.
PostCreditNotesRequestBodyLines'TaxRates'EmptyString | Represents the JSON value |
PostCreditNotesRequestBodyLines'TaxRates'ListTText [Text] |
Instances
data PostCreditNotesRequestBodyLines'Type' Source #
Defines the enum schema located at paths./v1/credit_notes.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.lines.items.properties.type
in the specification.
PostCreditNotesRequestBodyLines'Type'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostCreditNotesRequestBodyLines'Type'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostCreditNotesRequestBodyLines'Type'EnumCustomLineItem | Represents the JSON value |
PostCreditNotesRequestBodyLines'Type'EnumInvoiceLineItem | Represents the JSON value |
data PostCreditNotesRequestBodyReason' Source #
Defines the enum schema located at paths./v1/credit_notes.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.reason
in the specification.
Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
PostCreditNotesRequestBodyReason'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostCreditNotesRequestBodyReason'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostCreditNotesRequestBodyReason'EnumDuplicate | Represents the JSON value |
PostCreditNotesRequestBodyReason'EnumFraudulent | Represents the JSON value |
PostCreditNotesRequestBodyReason'EnumOrderChange | Represents the JSON value |
PostCreditNotesRequestBodyReason'EnumProductUnsatisfactory | Represents the JSON value |
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.
PostCreditNotesResponseError String | Means either no matching case available or a parse error |
PostCreditNotesResponse200 CreditNote | Successful response. |
PostCreditNotesResponseDefault Error | Error response. |
Instances
Eq PostCreditNotesResponse Source # | |
Defined in StripeAPI.Operations.PostCreditNotes | |
Show PostCreditNotesResponse Source # | |
Defined in StripeAPI.Operations.PostCreditNotes showsPrec :: Int -> PostCreditNotesResponse -> ShowS # show :: PostCreditNotesResponse -> String # showList :: [PostCreditNotesResponse] -> ShowS # |