Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the types generated from the schema Price
Synopsis
- data Price = Price {
- priceActive :: Bool
- priceBillingScheme :: PriceBillingScheme'
- priceCreated :: Int
- priceCurrency :: Text
- priceId :: Text
- priceLivemode :: Bool
- priceLookupKey :: Maybe Text
- priceMetadata :: Object
- priceNickname :: Maybe Text
- priceProduct :: PriceProduct'Variants
- priceRecurring :: Maybe PriceRecurring'
- priceTaxBehavior :: Maybe PriceTaxBehavior'
- priceTiers :: Maybe [PriceTier]
- priceTiersMode :: Maybe PriceTiersMode'
- priceTransformQuantity :: Maybe PriceTransformQuantity'
- priceType :: PriceType'
- priceUnitAmount :: Maybe Int
- priceUnitAmountDecimal :: Maybe Text
- mkPrice :: Bool -> PriceBillingScheme' -> Int -> Text -> Text -> Bool -> Object -> PriceProduct'Variants -> PriceType' -> Price
- data PriceBillingScheme'
- data PriceProduct'Variants
- data PriceRecurring' = PriceRecurring' {}
- mkPriceRecurring' :: PriceRecurring'
- data PriceRecurring'AggregateUsage'
- data PriceRecurring'Interval'
- data PriceRecurring'UsageType'
- data PriceTaxBehavior'
- data PriceTiersMode'
- data PriceTransformQuantity' = PriceTransformQuantity' {}
- mkPriceTransformQuantity' :: PriceTransformQuantity'
- data PriceTransformQuantity'Round'
- data PriceType'
Documentation
Defines the object schema located at components.schemas.price
in the specification.
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
Price | |
|
:: Bool | |
-> PriceBillingScheme' | |
-> Int | |
-> Text | |
-> Text | |
-> Bool | |
-> Object | |
-> PriceProduct'Variants | |
-> PriceType' | |
-> Price |
Create a new Price
with all required fields.
data PriceBillingScheme' Source #
Defines the enum schema located at components.schemas.price.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.
PriceBillingScheme'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceBillingScheme'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceBillingScheme'EnumPerUnit | Represents the JSON value |
PriceBillingScheme'EnumTiered | Represents the JSON value |
Instances
Eq PriceBillingScheme' Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceBillingScheme' -> PriceBillingScheme' -> Bool # (/=) :: PriceBillingScheme' -> PriceBillingScheme' -> Bool # | |
Show PriceBillingScheme' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceBillingScheme' -> ShowS # show :: PriceBillingScheme' -> String # showList :: [PriceBillingScheme'] -> ShowS # | |
ToJSON PriceBillingScheme' Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceBillingScheme' -> Value # toEncoding :: PriceBillingScheme' -> Encoding # toJSONList :: [PriceBillingScheme'] -> Value # toEncodingList :: [PriceBillingScheme'] -> Encoding # | |
FromJSON PriceBillingScheme' Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceBillingScheme' # parseJSONList :: Value -> Parser [PriceBillingScheme'] # |
data PriceProduct'Variants Source #
Defines the oneOf schema located at components.schemas.price.properties.product.anyOf
in the specification.
The ID of the product this price is associated with.
Instances
Eq PriceProduct'Variants Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceProduct'Variants -> PriceProduct'Variants -> Bool # (/=) :: PriceProduct'Variants -> PriceProduct'Variants -> Bool # | |
Show PriceProduct'Variants Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceProduct'Variants -> ShowS # show :: PriceProduct'Variants -> String # showList :: [PriceProduct'Variants] -> ShowS # | |
ToJSON PriceProduct'Variants Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceProduct'Variants -> Value # toEncoding :: PriceProduct'Variants -> Encoding # toJSONList :: [PriceProduct'Variants] -> Value # toEncodingList :: [PriceProduct'Variants] -> Encoding # | |
FromJSON PriceProduct'Variants Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceProduct'Variants # parseJSONList :: Value -> Parser [PriceProduct'Variants] # |
data PriceRecurring' Source #
Defines the object schema located at components.schemas.price.properties.recurring.anyOf
in the specification.
The recurring components of a price such as \`interval\` and \`usage_type\`.
PriceRecurring' | |
|
Instances
Eq PriceRecurring' Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceRecurring' -> PriceRecurring' -> Bool # (/=) :: PriceRecurring' -> PriceRecurring' -> Bool # | |
Show PriceRecurring' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceRecurring' -> ShowS # show :: PriceRecurring' -> String # showList :: [PriceRecurring'] -> ShowS # | |
ToJSON PriceRecurring' Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceRecurring' -> Value # toEncoding :: PriceRecurring' -> Encoding # toJSONList :: [PriceRecurring'] -> Value # toEncodingList :: [PriceRecurring'] -> Encoding # | |
FromJSON PriceRecurring' Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceRecurring' # parseJSONList :: Value -> Parser [PriceRecurring'] # |
mkPriceRecurring' :: PriceRecurring' Source #
Create a new PriceRecurring'
with all required fields.
data PriceRecurring'AggregateUsage' Source #
Defines the enum schema located at components.schemas.price.properties.recurring.anyOf.properties.aggregate_usage
in the specification.
Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
PriceRecurring'AggregateUsage'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceRecurring'AggregateUsage'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceRecurring'AggregateUsage'EnumLastDuringPeriod | Represents the JSON value |
PriceRecurring'AggregateUsage'EnumLastEver | Represents the JSON value |
PriceRecurring'AggregateUsage'EnumMax | Represents the JSON value |
PriceRecurring'AggregateUsage'EnumSum | Represents the JSON value |
data PriceRecurring'Interval' Source #
Defines the enum schema located at components.schemas.price.properties.recurring.anyOf.properties.interval
in the specification.
The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
PriceRecurring'Interval'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceRecurring'Interval'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceRecurring'Interval'EnumDay | Represents the JSON value |
PriceRecurring'Interval'EnumMonth | Represents the JSON value |
PriceRecurring'Interval'EnumWeek | Represents the JSON value |
PriceRecurring'Interval'EnumYear | Represents the JSON value |
Instances
Eq PriceRecurring'Interval' Source # | |
Defined in StripeAPI.Types.Price | |
Show PriceRecurring'Interval' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceRecurring'Interval' -> ShowS # show :: PriceRecurring'Interval' -> String # showList :: [PriceRecurring'Interval'] -> ShowS # | |
ToJSON PriceRecurring'Interval' Source # | |
Defined in StripeAPI.Types.Price | |
FromJSON PriceRecurring'Interval' Source # | |
Defined in StripeAPI.Types.Price |
data PriceRecurring'UsageType' Source #
Defines the enum schema located at components.schemas.price.properties.recurring.anyOf.properties.usage_type
in the specification.
Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
PriceRecurring'UsageType'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceRecurring'UsageType'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceRecurring'UsageType'EnumLicensed | Represents the JSON value |
PriceRecurring'UsageType'EnumMetered | Represents the JSON value |
Instances
Eq PriceRecurring'UsageType' Source # | |
Defined in StripeAPI.Types.Price | |
Show PriceRecurring'UsageType' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceRecurring'UsageType' -> ShowS # show :: PriceRecurring'UsageType' -> String # showList :: [PriceRecurring'UsageType'] -> ShowS # | |
ToJSON PriceRecurring'UsageType' Source # | |
Defined in StripeAPI.Types.Price | |
FromJSON PriceRecurring'UsageType' Source # | |
Defined in StripeAPI.Types.Price |
data PriceTaxBehavior' Source #
Defines the enum schema located at components.schemas.price.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.
PriceTaxBehavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceTaxBehavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceTaxBehavior'EnumExclusive | Represents the JSON value |
PriceTaxBehavior'EnumInclusive | Represents the JSON value |
PriceTaxBehavior'EnumUnspecified | Represents the JSON value |
Instances
Eq PriceTaxBehavior' Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceTaxBehavior' -> PriceTaxBehavior' -> Bool # (/=) :: PriceTaxBehavior' -> PriceTaxBehavior' -> Bool # | |
Show PriceTaxBehavior' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceTaxBehavior' -> ShowS # show :: PriceTaxBehavior' -> String # showList :: [PriceTaxBehavior'] -> ShowS # | |
ToJSON PriceTaxBehavior' Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceTaxBehavior' -> Value # toEncoding :: PriceTaxBehavior' -> Encoding # toJSONList :: [PriceTaxBehavior'] -> Value # toEncodingList :: [PriceTaxBehavior'] -> Encoding # | |
FromJSON PriceTaxBehavior' Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceTaxBehavior' # parseJSONList :: Value -> Parser [PriceTaxBehavior'] # |
data PriceTiersMode' Source #
Defines the enum schema located at components.schemas.price.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 change as the quantity grows.
PriceTiersMode'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceTiersMode'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceTiersMode'EnumGraduated | Represents the JSON value |
PriceTiersMode'EnumVolume | Represents the JSON value |
Instances
Eq PriceTiersMode' Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceTiersMode' -> PriceTiersMode' -> Bool # (/=) :: PriceTiersMode' -> PriceTiersMode' -> Bool # | |
Show PriceTiersMode' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceTiersMode' -> ShowS # show :: PriceTiersMode' -> String # showList :: [PriceTiersMode'] -> ShowS # | |
ToJSON PriceTiersMode' Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceTiersMode' -> Value # toEncoding :: PriceTiersMode' -> Encoding # toJSONList :: [PriceTiersMode'] -> Value # toEncodingList :: [PriceTiersMode'] -> Encoding # | |
FromJSON PriceTiersMode' Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceTiersMode' # parseJSONList :: Value -> Parser [PriceTiersMode'] # |
data PriceTransformQuantity' Source #
Defines the object schema located at components.schemas.price.properties.transform_quantity.anyOf
in the specification.
Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with \`tiers\`.
PriceTransformQuantity' | |
|
Instances
Eq PriceTransformQuantity' Source # | |
Defined in StripeAPI.Types.Price | |
Show PriceTransformQuantity' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceTransformQuantity' -> ShowS # show :: PriceTransformQuantity' -> String # showList :: [PriceTransformQuantity'] -> ShowS # | |
ToJSON PriceTransformQuantity' Source # | |
Defined in StripeAPI.Types.Price | |
FromJSON PriceTransformQuantity' Source # | |
Defined in StripeAPI.Types.Price |
mkPriceTransformQuantity' :: PriceTransformQuantity' Source #
Create a new PriceTransformQuantity'
with all required fields.
data PriceTransformQuantity'Round' Source #
Defines the enum schema located at components.schemas.price.properties.transform_quantity.anyOf.properties.round
in the specification.
After division, either round the result `up` or `down`.
PriceTransformQuantity'Round'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceTransformQuantity'Round'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceTransformQuantity'Round'EnumDown | Represents the JSON value |
PriceTransformQuantity'Round'EnumUp | Represents the JSON value |
Instances
data PriceType' Source #
Defines the enum schema located at components.schemas.price.properties.type
in the specification.
One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
PriceType'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
PriceType'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
PriceType'EnumOneTime | Represents the JSON value |
PriceType'EnumRecurring | Represents the JSON value |
Instances
Eq PriceType' Source # | |
Defined in StripeAPI.Types.Price (==) :: PriceType' -> PriceType' -> Bool # (/=) :: PriceType' -> PriceType' -> Bool # | |
Show PriceType' Source # | |
Defined in StripeAPI.Types.Price showsPrec :: Int -> PriceType' -> ShowS # show :: PriceType' -> String # showList :: [PriceType'] -> ShowS # | |
ToJSON PriceType' Source # | |
Defined in StripeAPI.Types.Price toJSON :: PriceType' -> Value # toEncoding :: PriceType' -> Encoding # toJSONList :: [PriceType'] -> Value # toEncodingList :: [PriceType'] -> Encoding # | |
FromJSON PriceType' Source # | |
Defined in StripeAPI.Types.Price parseJSON :: Value -> Parser PriceType' # parseJSONList :: Value -> Parser [PriceType'] # |