Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation getCreditNotesPreview
Synopsis
- getCreditNotesPreview :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> m (Either HttpException (Response GetCreditNotesPreviewResponse))
- getCreditNotesPreviewRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> m (Either HttpException (Response ByteString))
- getCreditNotesPreviewM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response GetCreditNotesPreviewResponse))
- getCreditNotesPreviewRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data GetCreditNotesPreviewRequestBody = GetCreditNotesPreviewRequestBody {
- data GetCreditNotesPreviewResponse
Documentation
getCreditNotesPreview Source #
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> Maybe Integer | amount: The integer amount in **%s** representing the total amount of the credit note. |
-> Maybe Integer | credit_amount: The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. |
-> Maybe String | expand: Specifies which fields in the response should be expanded. |
-> String | invoice: ID of the invoice. | Constraints: Maximum length of 5000 |
-> Maybe String | lines: Line items that make up the credit note. |
-> Maybe String | memo: The credit note's memo appears on the credit note PDF. | Constraints: Maximum length of 5000 |
-> Maybe String | metadata: 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`. |
-> Maybe Integer | out_of_band_amount: The integer amount in **%s** representing the amount that is credited outside of Stripe. |
-> Maybe String | reason: Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
-> Maybe String | refund: ID of an existing refund to link this credit note to. |
-> Maybe Integer | refund_amount: The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. |
-> GetCreditNotesPreviewRequestBody | The request body to send |
-> m (Either HttpException (Response GetCreditNotesPreviewResponse)) | Monad containing the result of the operation |
GET /v1/credit_notes/preview
<p>Get a preview of a credit note without creating it.</p>
getCreditNotesPreviewRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> m (Either HttpException (Response ByteString)) Source #
GET /v1/credit_notes/preview
The same as getCreditNotesPreview
but returns the raw ByteString
getCreditNotesPreviewM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response GetCreditNotesPreviewResponse)) Source #
GET /v1/credit_notes/preview
Monadic version of getCreditNotesPreview
(use with runWithConfiguration
)
getCreditNotesPreviewRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe Integer -> Maybe Integer -> Maybe String -> String -> Maybe String -> Maybe String -> Maybe String -> Maybe Integer -> Maybe String -> Maybe String -> Maybe Integer -> GetCreditNotesPreviewRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
GET /v1/credit_notes/preview
Monadic version of getCreditNotesPreviewRaw
(use with runWithConfiguration
)
data GetCreditNotesPreviewRequestBody Source #
Defines the data type for the schema getCreditNotesPreviewRequestBody
data GetCreditNotesPreviewResponse Source #
Represents a response of the operation getCreditNotesPreview
.
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), GetCreditNotesPreviewResponseError
is used.
GetCreditNotesPreviewResponseError String | Means either no matching case available or a parse error |
GetCreditNotesPreviewResponse200 CreditNote | Successful response. |
GetCreditNotesPreviewResponseDefault Error | Error response. |