Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postPrices
Synopsis
- postPrices :: forall m. MonadHTTP m => PostPricesRequestBody -> ClientT m (Response PostPricesResponse)
- data PostPricesRequestBody = PostPricesRequestBody {
- postPricesRequestBodyActive :: Maybe Bool
- postPricesRequestBodyBillingScheme :: Maybe PostPricesRequestBodyBillingScheme'
- postPricesRequestBodyCurrency :: Text
- postPricesRequestBodyExpand :: Maybe [Text]
- postPricesRequestBodyLookupKey :: Maybe Text
- postPricesRequestBodyMetadata :: Maybe Object
- postPricesRequestBodyNickname :: Maybe Text
- postPricesRequestBodyProduct :: Maybe Text
- postPricesRequestBodyProductData :: Maybe PostPricesRequestBodyProductData'
- postPricesRequestBodyRecurring :: Maybe PostPricesRequestBodyRecurring'
- postPricesRequestBodyTaxBehavior :: Maybe PostPricesRequestBodyTaxBehavior'
- postPricesRequestBodyTiers :: Maybe [PostPricesRequestBodyTiers']
- postPricesRequestBodyTiersMode :: Maybe PostPricesRequestBodyTiersMode'
- postPricesRequestBodyTransferLookupKey :: Maybe Bool
- postPricesRequestBodyTransformQuantity :: Maybe PostPricesRequestBodyTransformQuantity'
- postPricesRequestBodyUnitAmount :: Maybe Int
- postPricesRequestBodyUnitAmountDecimal :: Maybe Text
- mkPostPricesRequestBody :: Text -> PostPricesRequestBody
- data PostPricesRequestBodyBillingScheme'
- data PostPricesRequestBodyProductData' = PostPricesRequestBodyProductData' {
- postPricesRequestBodyProductData'Active :: Maybe Bool
- postPricesRequestBodyProductData'Id :: Maybe Text
- postPricesRequestBodyProductData'Metadata :: Maybe Object
- postPricesRequestBodyProductData'Name :: Text
- postPricesRequestBodyProductData'StatementDescriptor :: Maybe Text
- postPricesRequestBodyProductData'TaxCode :: Maybe Text
- postPricesRequestBodyProductData'UnitLabel :: Maybe Text
- mkPostPricesRequestBodyProductData' :: Text -> PostPricesRequestBodyProductData'
- data PostPricesRequestBodyRecurring' = PostPricesRequestBodyRecurring' {
- postPricesRequestBodyRecurring'AggregateUsage :: Maybe PostPricesRequestBodyRecurring'AggregateUsage'
- postPricesRequestBodyRecurring'Interval :: PostPricesRequestBodyRecurring'Interval'
- postPricesRequestBodyRecurring'IntervalCount :: Maybe Int
- postPricesRequestBodyRecurring'UsageType :: Maybe PostPricesRequestBodyRecurring'UsageType'
- mkPostPricesRequestBodyRecurring' :: PostPricesRequestBodyRecurring'Interval' -> PostPricesRequestBodyRecurring'
- data PostPricesRequestBodyRecurring'AggregateUsage'
- = PostPricesRequestBodyRecurring'AggregateUsage'Other Value
- | PostPricesRequestBodyRecurring'AggregateUsage'Typed Text
- | PostPricesRequestBodyRecurring'AggregateUsage'EnumLastDuringPeriod
- | PostPricesRequestBodyRecurring'AggregateUsage'EnumLastEver
- | PostPricesRequestBodyRecurring'AggregateUsage'EnumMax
- | PostPricesRequestBodyRecurring'AggregateUsage'EnumSum
- data PostPricesRequestBodyRecurring'Interval'
- = PostPricesRequestBodyRecurring'Interval'Other Value
- | PostPricesRequestBodyRecurring'Interval'Typed Text
- | PostPricesRequestBodyRecurring'Interval'EnumDay
- | PostPricesRequestBodyRecurring'Interval'EnumMonth
- | PostPricesRequestBodyRecurring'Interval'EnumWeek
- | PostPricesRequestBodyRecurring'Interval'EnumYear
- data PostPricesRequestBodyRecurring'UsageType'
- data PostPricesRequestBodyTaxBehavior'
- data PostPricesRequestBodyTiers' = PostPricesRequestBodyTiers' {}
- mkPostPricesRequestBodyTiers' :: PostPricesRequestBodyTiers'UpTo'Variants -> PostPricesRequestBodyTiers'
- data PostPricesRequestBodyTiers'UpTo'Variants
- data PostPricesRequestBodyTiersMode'
- data PostPricesRequestBodyTransformQuantity' = PostPricesRequestBodyTransformQuantity' {}
- mkPostPricesRequestBodyTransformQuantity' :: Int -> PostPricesRequestBodyTransformQuantity'Round' -> PostPricesRequestBodyTransformQuantity'
- data PostPricesRequestBodyTransformQuantity'Round'
- data PostPricesResponse
Documentation
:: forall m. MonadHTTP m | |
=> PostPricesRequestBody | The request body to send |
-> ClientT m (Response PostPricesResponse) | Monadic computation which returns the result of the operation |
POST /v1/prices
<p>Creates a new price for an existing product. The price can be recurring or one-time.</p>
data PostPricesRequestBody Source #
Defines the object schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostPricesRequestBody | |
|
Instances
Eq PostPricesRequestBody Source # | |
Defined in StripeAPI.Operations.PostPrices (==) :: PostPricesRequestBody -> PostPricesRequestBody -> Bool # (/=) :: PostPricesRequestBody -> PostPricesRequestBody -> Bool # | |
Show PostPricesRequestBody Source # | |
Defined in StripeAPI.Operations.PostPrices showsPrec :: Int -> PostPricesRequestBody -> ShowS # show :: PostPricesRequestBody -> String # showList :: [PostPricesRequestBody] -> ShowS # | |
ToJSON PostPricesRequestBody Source # | |
Defined in StripeAPI.Operations.PostPrices toJSON :: PostPricesRequestBody -> Value # toEncoding :: PostPricesRequestBody -> Encoding # toJSONList :: [PostPricesRequestBody] -> Value # toEncodingList :: [PostPricesRequestBody] -> Encoding # | |
FromJSON PostPricesRequestBody Source # | |
Defined in StripeAPI.Operations.PostPrices parseJSON :: Value -> Parser PostPricesRequestBody # parseJSONList :: Value -> Parser [PostPricesRequestBody] # |
mkPostPricesRequestBody Source #
Create a new PostPricesRequestBody
with all required fields.
data PostPricesRequestBodyBillingScheme' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.billing_scheme
in the specification.
Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
PostPricesRequestBodyBillingScheme'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyBillingScheme'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyBillingScheme'EnumPerUnit | Represents the JSON value |
PostPricesRequestBodyBillingScheme'EnumTiered | Represents the JSON value |
data PostPricesRequestBodyProductData' Source #
Defines the object schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.product_data
in the specification.
These fields can be used to create a new product that this price will belong to.
PostPricesRequestBodyProductData' | |
|
mkPostPricesRequestBodyProductData' Source #
Create a new PostPricesRequestBodyProductData'
with all required fields.
data PostPricesRequestBodyRecurring' Source #
Defines the object schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.recurring
in the specification.
The recurring components of a price such as `interval` and `usage_type`.
mkPostPricesRequestBodyRecurring' Source #
Create a new PostPricesRequestBodyRecurring'
with all required fields.
data PostPricesRequestBodyRecurring'AggregateUsage' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.recurring.properties.aggregate_usage
in the specification.
PostPricesRequestBodyRecurring'AggregateUsage'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyRecurring'AggregateUsage'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyRecurring'AggregateUsage'EnumLastDuringPeriod | Represents the JSON value |
PostPricesRequestBodyRecurring'AggregateUsage'EnumLastEver | Represents the JSON value |
PostPricesRequestBodyRecurring'AggregateUsage'EnumMax | Represents the JSON value |
PostPricesRequestBodyRecurring'AggregateUsage'EnumSum | Represents the JSON value |
Instances
data PostPricesRequestBodyRecurring'Interval' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.recurring.properties.interval
in the specification.
PostPricesRequestBodyRecurring'Interval'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyRecurring'Interval'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyRecurring'Interval'EnumDay | Represents the JSON value |
PostPricesRequestBodyRecurring'Interval'EnumMonth | Represents the JSON value |
PostPricesRequestBodyRecurring'Interval'EnumWeek | Represents the JSON value |
PostPricesRequestBodyRecurring'Interval'EnumYear | Represents the JSON value |
data PostPricesRequestBodyRecurring'UsageType' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.recurring.properties.usage_type
in the specification.
PostPricesRequestBodyRecurring'UsageType'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyRecurring'UsageType'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyRecurring'UsageType'EnumLicensed | Represents the JSON value |
PostPricesRequestBodyRecurring'UsageType'EnumMetered | Represents the JSON value |
data PostPricesRequestBodyTaxBehavior' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.tax_behavior
in the specification.
Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
PostPricesRequestBodyTaxBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyTaxBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyTaxBehavior'EnumExclusive | Represents the JSON value |
PostPricesRequestBodyTaxBehavior'EnumInclusive | Represents the JSON value |
PostPricesRequestBodyTaxBehavior'EnumUnspecified | Represents the JSON value |
data PostPricesRequestBodyTiers' Source #
Defines the object schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.tiers.items
in the specification.
PostPricesRequestBodyTiers' | |
|
Instances
mkPostPricesRequestBodyTiers' Source #
Create a new PostPricesRequestBodyTiers'
with all required fields.
data PostPricesRequestBodyTiers'UpTo'Variants Source #
Defines the oneOf schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.tiers.items.properties.up_to.anyOf
in the specification.
PostPricesRequestBodyTiers'UpTo'Inf | Represents the JSON value |
PostPricesRequestBodyTiers'UpTo'Int Int |
data PostPricesRequestBodyTiersMode' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.tiers_mode
in the specification.
Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
PostPricesRequestBodyTiersMode'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyTiersMode'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyTiersMode'EnumGraduated | Represents the JSON value |
PostPricesRequestBodyTiersMode'EnumVolume | Represents the JSON value |
data PostPricesRequestBodyTransformQuantity' Source #
Defines the object schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.transform_quantity
in the specification.
Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
mkPostPricesRequestBodyTransformQuantity' Source #
Create a new PostPricesRequestBodyTransformQuantity'
with all required fields.
data PostPricesRequestBodyTransformQuantity'Round' Source #
Defines the enum schema located at paths./v1/prices.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.transform_quantity.properties.round
in the specification.
PostPricesRequestBodyTransformQuantity'Round'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PostPricesRequestBodyTransformQuantity'Round'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PostPricesRequestBodyTransformQuantity'Round'EnumDown | Represents the JSON value |
PostPricesRequestBodyTransformQuantity'Round'EnumUp | Represents the JSON value |
data PostPricesResponse Source #
Represents a response of the operation postPrices
.
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), PostPricesResponseError
is used.
PostPricesResponseError String | Means either no matching case available or a parse error |
PostPricesResponse200 Price | Successful response. |
PostPricesResponseDefault Error | Error response. |
Instances
Eq PostPricesResponse Source # | |
Defined in StripeAPI.Operations.PostPrices (==) :: PostPricesResponse -> PostPricesResponse -> Bool # (/=) :: PostPricesResponse -> PostPricesResponse -> Bool # | |
Show PostPricesResponse Source # | |
Defined in StripeAPI.Operations.PostPrices showsPrec :: Int -> PostPricesResponse -> ShowS # show :: PostPricesResponse -> String # showList :: [PostPricesResponse] -> ShowS # |