Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
:: (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
PostChargesRequestBody | |
|
Instances
Eq PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges | |
Show PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges showsPrec :: Int -> PostChargesRequestBody -> ShowS # show :: PostChargesRequestBody -> String # showList :: [PostChargesRequestBody] -> ShowS # | |
ToJSON PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges toJSON :: PostChargesRequestBody -> Value # toEncoding :: PostChargesRequestBody -> Encoding # toJSONList :: [PostChargesRequestBody] -> Value # | |
FromJSON PostChargesRequestBody Source # | |
Defined in StripeAPI.Operations.PostCharges |
data PostChargesRequestBodyCard'OneOf2 Source #
Defines the data type for the schema postChargesRequestBodyCard'OneOf2
data PostChargesRequestBodyCard'OneOf2Metadata' Source #
Defines the data type for the schema postChargesRequestBodyCard'OneOf2Metadata'
data PostChargesRequestBodyCard'OneOf2Object' Source #
Defines the enum schema postChargesRequestBodyCard'OneOf2Object'
PostChargesRequestBodyCard'OneOf2Object'EnumOther Value | |
PostChargesRequestBodyCard'OneOf2Object'EnumTyped String | |
PostChargesRequestBodyCard'OneOf2Object'EnumStringCard |
data PostChargesRequestBodyCard'Variants Source #
Define the one-of schema postChargesRequestBodyCard'
A token, like the ones returned by Stripe.js.
PostChargesRequestBodyCard'String String | |
PostChargesRequestBodyCard'PostChargesRequestBodyCard'OneOf2 PostChargesRequestBodyCard'OneOf2 |
Instances
Eq PostChargesRequestBodyCard'Variants Source # | |
Show PostChargesRequestBodyCard'Variants Source # | |
Defined in StripeAPI.Operations.PostCharges | |
Generic PostChargesRequestBodyCard'Variants Source # | |
ToJSON PostChargesRequestBodyCard'Variants Source # | |
FromJSON PostChargesRequestBodyCard'Variants Source # | |
type Rep PostChargesRequestBodyCard'Variants Source # | |
Defined in StripeAPI.Operations.PostCharges type Rep PostChargesRequestBodyCard'Variants = D1 (MetaData "PostChargesRequestBodyCard'Variants" "StripeAPI.Operations.PostCharges" "stripeapi-0.1.0.0-A3hJyYFbMZN6w4qjBpK6b6" False) (C1 (MetaCons "PostChargesRequestBodyCard'String" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "PostChargesRequestBodyCard'PostChargesRequestBodyCard'OneOf2" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostChargesRequestBodyCard'OneOf2))) |
data PostChargesRequestBodyDestination'OneOf2 Source #
Defines the data type for the schema postChargesRequestBodyDestination'OneOf2
PostChargesRequestBodyDestination'OneOf2 | |
|
data PostChargesRequestBodyDestination'Variants Source #
Define the one-of schema postChargesRequestBodyDestination'
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`.
data PostChargesRequestBodyShipping' Source #
Defines the data type for the schema postChargesRequestBodyShipping'
Shipping information for the charge. Helps prevent fraud on charges for physical goods.
PostChargesRequestBodyShipping' | |
|
data PostChargesRequestBodyShipping'Address' Source #
Defines the data type for the schema postChargesRequestBodyShipping'Address'
PostChargesRequestBodyShipping'Address' | |
|
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.
PostChargesRequestBodyTransferData' | |
|
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.
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 (==) :: PostChargesResponse -> PostChargesResponse -> Bool # (/=) :: PostChargesResponse -> PostChargesResponse -> Bool # | |
Show PostChargesResponse Source # | |
Defined in StripeAPI.Operations.PostCharges showsPrec :: Int -> PostChargesResponse -> ShowS # show :: PostChargesResponse -> String # showList :: [PostChargesResponse] -> ShowS # |