Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postCreditNotes
Synopsis
- postCreditNotes :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostCreditNotesRequestBody -> m (Either HttpException (Response PostCreditNotesResponse))
- postCreditNotesRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostCreditNotesRequestBody -> m (Either HttpException (Response ByteString))
- postCreditNotesM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostCreditNotesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostCreditNotesResponse))
- postCreditNotesRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostCreditNotesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostCreditNotesRequestBody = PostCreditNotesRequestBody {
- postCreditNotesRequestBodyAmount :: Maybe Integer
- postCreditNotesRequestBodyCreditAmount :: Maybe Integer
- postCreditNotesRequestBodyExpand :: Maybe ([] String)
- postCreditNotesRequestBodyInvoice :: String
- postCreditNotesRequestBodyLines :: Maybe ([] PostCreditNotesRequestBodyLines')
- postCreditNotesRequestBodyMemo :: Maybe String
- postCreditNotesRequestBodyMetadata :: Maybe PostCreditNotesRequestBodyMetadata'
- postCreditNotesRequestBodyOutOfBandAmount :: Maybe Integer
- postCreditNotesRequestBodyReason :: Maybe PostCreditNotesRequestBodyReason'
- postCreditNotesRequestBodyRefund :: Maybe String
- postCreditNotesRequestBodyRefundAmount :: Maybe Integer
- data PostCreditNotesRequestBodyLines' = PostCreditNotesRequestBodyLines' {
- postCreditNotesRequestBodyLines'Amount :: Maybe Integer
- postCreditNotesRequestBodyLines'Description :: Maybe String
- postCreditNotesRequestBodyLines'InvoiceLineItem :: Maybe String
- postCreditNotesRequestBodyLines'Quantity :: Maybe Integer
- postCreditNotesRequestBodyLines'TaxRates :: Maybe PostCreditNotesRequestBodyLines'TaxRates'Variants
- postCreditNotesRequestBodyLines'Type :: PostCreditNotesRequestBodyLines'Type'
- postCreditNotesRequestBodyLines'UnitAmount :: Maybe Integer
- postCreditNotesRequestBodyLines'UnitAmountDecimal :: Maybe String
- data PostCreditNotesRequestBodyLines'TaxRates'OneOf1
- data PostCreditNotesRequestBodyLines'TaxRates'Variants
- data PostCreditNotesRequestBodyLines'Type'
- data PostCreditNotesRequestBodyMetadata' = PostCreditNotesRequestBodyMetadata' {
- data PostCreditNotesRequestBodyReason'
- = PostCreditNotesRequestBodyReason'EnumOther Value
- | PostCreditNotesRequestBodyReason'EnumTyped String
- | PostCreditNotesRequestBodyReason'EnumStringDuplicate
- | PostCreditNotesRequestBodyReason'EnumStringFraudulent
- | PostCreditNotesRequestBodyReason'EnumStringOrderChange
- | PostCreditNotesRequestBodyReason'EnumStringProductUnsatisfactory
- data PostCreditNotesResponse
Documentation
:: (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
postCreditNotesM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostCreditNotesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostCreditNotesResponse)) Source #
POST /v1/credit_notes
Monadic version of postCreditNotes
(use with runWithConfiguration
)
postCreditNotesRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostCreditNotesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/credit_notes
Monadic version of postCreditNotesRaw
(use with runWithConfiguration
)
data PostCreditNotesRequestBody Source #
Defines the data type for the schema postCreditNotesRequestBody
PostCreditNotesRequestBody | |
|
Instances
data PostCreditNotesRequestBodyLines' Source #
Defines the data type for the schema postCreditNotesRequestBodyLines'
PostCreditNotesRequestBodyLines' | |
|
data PostCreditNotesRequestBodyLines'TaxRates'OneOf1 Source #
Defines the enum schema postCreditNotesRequestBodyLines'Tax_rates'OneOf1
PostCreditNotesRequestBodyLines'TaxRates'OneOf1EnumOther Value | |
PostCreditNotesRequestBodyLines'TaxRates'OneOf1EnumTyped String | |
PostCreditNotesRequestBodyLines'TaxRates'OneOf1EnumString_ |
Instances
data PostCreditNotesRequestBodyLines'TaxRates'Variants Source #
Define the one-of schema postCreditNotesRequestBodyLines'Tax_rates'
Instances
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.
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 # |