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 -> Maybe PostChargesRequestBody -> m (Either HttpException (Response PostChargesResponse))
- postChargesRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> Maybe PostChargesRequestBody -> m (Either HttpException (Response ByteString))
- postChargesM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe PostChargesRequestBody -> ReaderT (Configuration s) m (Either HttpException (Response PostChargesResponse))
- postChargesRawM :: forall m s. (MonadHTTP m, SecurityScheme s) => Maybe 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 Text
- postChargesRequestBodyCustomer :: Maybe Text
- postChargesRequestBodyDescription :: Maybe Text
- postChargesRequestBodyDestination :: Maybe PostChargesRequestBodyDestination'Variants
- postChargesRequestBodyExpand :: Maybe ([] Text)
- postChargesRequestBodyMetadata :: Maybe PostChargesRequestBodyMetadata'
- postChargesRequestBodyOnBehalfOf :: Maybe Text
- postChargesRequestBodyReceiptEmail :: Maybe Text
- postChargesRequestBodyShipping :: Maybe PostChargesRequestBodyShipping'
- postChargesRequestBodySource :: Maybe Text
- postChargesRequestBodyStatementDescriptor :: Maybe Text
- postChargesRequestBodyStatementDescriptorSuffix :: Maybe Text
- postChargesRequestBodyTransferData :: Maybe PostChargesRequestBodyTransferData'
- postChargesRequestBodyTransferGroup :: Maybe Text
- data PostChargesRequestBodyCard'OneOf2 = PostChargesRequestBodyCard'OneOf2 {
- postChargesRequestBodyCard'OneOf2AddressCity :: Maybe Text
- postChargesRequestBodyCard'OneOf2AddressCountry :: Maybe Text
- postChargesRequestBodyCard'OneOf2AddressLine1 :: Maybe Text
- postChargesRequestBodyCard'OneOf2AddressLine2 :: Maybe Text
- postChargesRequestBodyCard'OneOf2AddressState :: Maybe Text
- postChargesRequestBodyCard'OneOf2AddressZip :: Maybe Text
- postChargesRequestBodyCard'OneOf2Cvc :: Maybe Text
- postChargesRequestBodyCard'OneOf2ExpMonth :: Integer
- postChargesRequestBodyCard'OneOf2ExpYear :: Integer
- postChargesRequestBodyCard'OneOf2Metadata :: Maybe PostChargesRequestBodyCard'OneOf2Metadata'
- postChargesRequestBodyCard'OneOf2Name :: Maybe Text
- postChargesRequestBodyCard'OneOf2Number :: Text
- 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 Text
- postChargesRequestBodyShipping'Address'Country :: Maybe Text
- postChargesRequestBodyShipping'Address'Line1 :: Text
- postChargesRequestBodyShipping'Address'Line2 :: Maybe Text
- postChargesRequestBodyShipping'Address'PostalCode :: Maybe Text
- postChargesRequestBodyShipping'Address'State :: Maybe Text
- data PostChargesRequestBodyTransferData' = PostChargesRequestBodyTransferData' {}
- data PostChargesResponse
Documentation
:: (MonadHTTP m, SecurityScheme s) | |
=> Configuration s | The configuration to use in the request |
-> Maybe 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 -> Maybe 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) => Maybe 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) => Maybe 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 Text | |
PostChargesRequestBodyCard'OneOf2Object'EnumStringCard |
data PostChargesRequestBodyCard'Variants Source #
Define the one-of schema postChargesRequestBodyCard'
A token, like the ones returned by Stripe.js.
PostChargesRequestBodyCard'Text Text | |
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.2-D0ebvtj6l9B4TLqRwmHKaP" False) (C1 (MetaCons "PostChargesRequestBodyCard'Text" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) :+: 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'Text Text | |
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 # |