stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostPrices

Description

Contains the different functions to run the operation postPrices

Synopsis

Documentation

postPrices Source #

Arguments

:: 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.

Constructors

PostPricesRequestBody 

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.

Constructors

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 "per_unit"

PostPricesRequestBodyBillingScheme'EnumTiered

Represents the JSON value "tiered"

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.

Constructors

PostPricesRequestBodyProductData' 

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`.

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.

Constructors

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 "last_during_period"

PostPricesRequestBodyRecurring'AggregateUsage'EnumLastEver

Represents the JSON value "last_ever"

PostPricesRequestBodyRecurring'AggregateUsage'EnumMax

Represents the JSON value "max"

PostPricesRequestBodyRecurring'AggregateUsage'EnumSum

Represents the JSON value "sum"

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.

Constructors

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 "day"

PostPricesRequestBodyRecurring'Interval'EnumMonth

Represents the JSON value "month"

PostPricesRequestBodyRecurring'Interval'EnumWeek

Represents the JSON value "week"

PostPricesRequestBodyRecurring'Interval'EnumYear

Represents the JSON value "year"

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.

Constructors

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 "licensed"

PostPricesRequestBodyRecurring'UsageType'EnumMetered

Represents the JSON value "metered"

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.

Constructors

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 "exclusive"

PostPricesRequestBodyTaxBehavior'EnumInclusive

Represents the JSON value "inclusive"

PostPricesRequestBodyTaxBehavior'EnumUnspecified

Represents the JSON value "unspecified"

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.

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.

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.

Constructors

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 "graduated"

PostPricesRequestBodyTiersMode'EnumVolume

Represents the JSON value "volume"

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`.

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.

Constructors

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 "down"

PostPricesRequestBodyTransformQuantity'Round'EnumUp

Represents the JSON value "up"

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.

Constructors

PostPricesResponseError String

Means either no matching case available or a parse error

PostPricesResponse200 Price

Successful response.

PostPricesResponseDefault Error

Error response.