Safe Haskell | None |
---|---|
Language | Haskell2010 |
StripeAPI.Operations.PostCharges
Description
Contains the different functions to run the operation postCharges
Synopsis
- postCharges :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostChargesRequestBody -> m (Either HttpException (Response PostChargesResponse))
- postChargesRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostChargesRequestBody -> m (Either HttpException (Response ByteString))
- postChargesM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostChargesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostChargesResponse))
- postChargesRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostChargesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString))
- data PostChargesRequestBody = PostChargesRequestBody {
- postChargesRequestBodyAmount :: Maybe Integer
- postChargesRequestBodyApplicationFee :: Maybe Integer
- postChargesRequestBodyApplicationFeeAmount :: Maybe Integer
- postChargesRequestBodyCapture :: Maybe Bool
- postChargesRequestBodyCard :: Maybe PostChargesRequestBodyCard'Variants
- postChargesRequestBodyCurrency :: Maybe String
- postChargesRequestBodyCustomer :: Maybe String
- postChargesRequestBodyDescription :: Maybe String
- postChargesRequestBodyDestination :: Maybe PostChargesRequestBodyDestination'Variants
- postChargesRequestBodyExpand :: Maybe ([] String)
- postChargesRequestBodyMetadata :: Maybe PostChargesRequestBodyMetadata'
- postChargesRequestBodyOnBehalfOf :: Maybe String
- postChargesRequestBodyReceiptEmail :: Maybe String
- postChargesRequestBodyShipping :: Maybe PostChargesRequestBodyShipping'
- postChargesRequestBodySource :: Maybe String
- postChargesRequestBodyStatementDescriptor :: Maybe String
- postChargesRequestBodyStatementDescriptorSuffix :: Maybe String
- postChargesRequestBodyTransferData :: Maybe PostChargesRequestBodyTransferData'
- postChargesRequestBodyTransferGroup :: Maybe String
- data PostChargesRequestBodyCard'OneOf2 = PostChargesRequestBodyCard'OneOf2 {
- postChargesRequestBodyCard'OneOf2AddressCity :: Maybe String
- postChargesRequestBodyCard'OneOf2AddressCountry :: Maybe String
- postChargesRequestBodyCard'OneOf2AddressLine1 :: Maybe String
- postChargesRequestBodyCard'OneOf2AddressLine2 :: Maybe String
- postChargesRequestBodyCard'OneOf2AddressState :: Maybe String
- postChargesRequestBodyCard'OneOf2AddressZip :: Maybe String
- postChargesRequestBodyCard'OneOf2Cvc :: Maybe String
- postChargesRequestBodyCard'OneOf2ExpMonth :: Integer
- postChargesRequestBodyCard'OneOf2ExpYear :: Integer
- postChargesRequestBodyCard'OneOf2Metadata :: Maybe PostChargesRequestBodyCard'OneOf2Metadata'
- postChargesRequestBodyCard'OneOf2Name :: Maybe String
- postChargesRequestBodyCard'OneOf2Number :: String
- postChargesRequestBodyCard'OneOf2Object :: Maybe PostChargesRequestBodyCard'OneOf2Object'
- data PostChargesRequestBodyCard'OneOf2Metadata' = PostChargesRequestBodyCard'OneOf2Metadata' {
- data PostChargesRequestBodyCard'OneOf2Object'
- data PostChargesRequestBodyCard'Variants
- data PostChargesRequestBodyDestination'OneOf2 = PostChargesRequestBodyDestination'OneOf2 {}
- data PostChargesRequestBodyDestination'Variants
- data PostChargesRequestBodyMetadata' = PostChargesRequestBodyMetadata' {
- data PostChargesRequestBodyShipping' = PostChargesRequestBodyShipping' {}
- data PostChargesRequestBodyShipping'Address' = PostChargesRequestBodyShipping'Address' {
- postChargesRequestBodyShipping'Address'City :: Maybe String
- postChargesRequestBodyShipping'Address'Country :: Maybe String
- postChargesRequestBodyShipping'Address'Line1 :: String
- postChargesRequestBodyShipping'Address'Line2 :: Maybe String
- postChargesRequestBodyShipping'Address'PostalCode :: Maybe String
- postChargesRequestBodyShipping'Address'State :: Maybe String
- data PostChargesRequestBodyTransferData' = PostChargesRequestBodyTransferData' {}
- data PostChargesResponse
Documentation
Arguments
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> PostChargesRequestBody | The request body to send |
-> m (Either HttpException (Response PostChargesResponse)) | Monad containing the result of the operation |
POST /v1/charges
<p>To charge a credit card or other payment source, you create a <code>Charge</code> object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).</p>
postChargesRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostChargesRequestBody -> m (Either HttpException (Response ByteString)) Source #
POST /v1/charges
The same as postCharges
but returns the raw ByteString
postChargesM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostChargesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostChargesResponse)) Source #
POST /v1/charges
Monadic version of postCharges
(use with runWithConfiguration
)
postChargesRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => PostChargesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response ByteString)) Source #
POST /v1/charges
Monadic version of postChargesRaw
(use with runWithConfiguration
)
data PostChargesRequestBody Source #
Defines the data type for the schema postChargesRequestBody
Constructors
PostChargesRequestBody | |
Fields
|
Instances
Eq PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges Methods (==) :: PostChargesRequestBody -> PostChargesRequestBody -> Bool # (/=) :: PostChargesRequestBody -> PostChargesRequestBody -> Bool # | |
Show PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges Methods showsPrec :: Int -> PostChargesRequestBody -> ShowS # show :: PostChargesRequestBody -> String # showList :: [PostChargesRequestBody] -> ShowS # | |
ToJSON PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges Methods toJSON :: PostChargesRequestBody -> Value # toEncoding :: PostChargesRequestBody -> Encoding # toJSONList :: [PostChargesRequestBody] -> Value # | |
FromJSON PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges Methods parseJSON :: Value -> Parser PostChargesRequestBody # parseJSONList :: Value -> Parser [PostChargesRequestBody] # |
data PostChargesRequestBodyCard'OneOf2 Source #
Defines the data type for the schema postChargesRequestBodyCard'OneOf2
Constructors
Instances
data PostChargesRequestBodyCard'OneOf2Metadata' Source #
Defines the data type for the schema postChargesRequestBodyCard'OneOf2Metadata'
Constructors
PostChargesRequestBodyCard'OneOf2Metadata' | |
Instances
data PostChargesRequestBodyCard'OneOf2Object' Source #
Defines the enum schema postChargesRequestBodyCard'OneOf2Object'
Constructors
PostChargesRequestBodyCard'OneOf2Object'EnumOther Value | |
PostChargesRequestBodyCard'OneOf2Object'EnumTyped String | |
PostChargesRequestBodyCard'OneOf2Object'EnumStringCard |
Instances
data PostChargesRequestBodyCard'Variants Source #
Define the one-of schema postChargesRequestBodyCard'
A token, like the ones returned by Stripe.js.
Constructors
PostChargesRequestBodyCard'String String | |
PostChargesRequestBodyCard'PostChargesRequestBodyCard'OneOf2 PostChargesRequestBodyCard'OneOf2 |
Instances
data PostChargesRequestBodyDestination'OneOf2 Source #
Defines the data type for the schema postChargesRequestBodyDestination'OneOf2
Constructors
PostChargesRequestBodyDestination'OneOf2 | |
Fields
|
Instances
data PostChargesRequestBodyDestination'Variants Source #
Define the one-of schema postChargesRequestBodyDestination'
Constructors
PostChargesRequestBodyDestination'String String | |
PostChargesRequestBodyDestination'PostChargesRequestBodyDestination'OneOf2 PostChargesRequestBodyDestination'OneOf2 |
Instances
data PostChargesRequestBodyMetadata' Source #
Defines the data type for the schema postChargesRequestBodyMetadata'
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`.
Constructors
PostChargesRequestBodyMetadata' | |
Instances
data PostChargesRequestBodyShipping' Source #
Defines the data type for the schema postChargesRequestBodyShipping'
Shipping information for the charge. Helps prevent fraud on charges for physical goods.
Constructors
PostChargesRequestBodyShipping' | |
Fields
|
Instances
data PostChargesRequestBodyShipping'Address' Source #
Defines the data type for the schema postChargesRequestBodyShipping'Address'
Constructors
PostChargesRequestBodyShipping'Address' | |
Fields
|
Instances
data PostChargesRequestBodyTransferData' Source #
Defines the data type for the schema postChargesRequestBodyTransfer_data'
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
Constructors
PostChargesRequestBodyTransferData' | |
Fields
|
Instances
data PostChargesResponse Source #
Represents a response of the operation postCharges
.
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), PostChargesResponseError
is used.
Constructors
PostChargesResponseError String | Means either no matching case available or a parse error |
PostChargesResponse200 Charge | Successful response. |
PostChargesResponseDefault Error | Error response. |
Instances
Eq PostChargesResponse Source # | |
Defined in StripeAPI.Operations.PostCharges Methods (==) :: PostChargesResponse -> PostChargesResponse -> Bool # (/=) :: PostChargesResponse -> PostChargesResponse -> Bool # | |
Show PostChargesResponse Source # | |
Defined in StripeAPI.Operations.PostCharges Methods showsPrec :: Int -> PostChargesResponse -> ShowS # show :: PostChargesResponse -> String # showList :: [PostChargesResponse] -> ShowS # |