class Stripe::PricesApi
- Stripe::PricesApi
- Reference
- Object
Defined in:
stripe/api/prices_api.crConstant Summary
-
GET_PRICES_MAX_LENGTH_FOR_ENDING_BEFORE =
5000
-
GET_PRICES_MAX_LENGTH_FOR_PRODUCT =
5000
-
GET_PRICES_MAX_LENGTH_FOR_STARTING_AFTER =
5000
-
GET_PRICES_PRICE_MAX_LENGTH_FOR_PRICE =
5000
-
GET_PRICES_SEARCH_MAX_LENGTH_FOR_PAGE =
5000
-
GET_PRICES_SEARCH_MAX_LENGTH_FOR_QUERY =
5000
-
GET_PRICES_VALID_VALUES_FOR__TYPE =
String.static_array("one_time", "recurring")
-
POST_PRICES_MAX_LENGTH_FOR_LOOKUP_KEY =
200
-
POST_PRICES_MAX_LENGTH_FOR_NICKNAME =
5000
-
POST_PRICES_MAX_LENGTH_FOR_PRODUCT =
5000
-
POST_PRICES_PRICE_MAX_LENGTH_FOR_LOOKUP_KEY =
200
-
POST_PRICES_PRICE_MAX_LENGTH_FOR_NICKNAME =
5000
-
POST_PRICES_PRICE_MAX_LENGTH_FOR_PRICE =
5000
-
POST_PRICES_PRICE_VALID_VALUES_FOR_TAX_BEHAVIOR =
String.static_array("exclusive", "inclusive", "unspecified")
-
POST_PRICES_VALID_VALUES_FOR_BILLING_SCHEME =
String.static_array("per_unit", "tiered")
-
POST_PRICES_VALID_VALUES_FOR_TAX_BEHAVIOR =
String.static_array("exclusive", "inclusive", "unspecified")
-
POST_PRICES_VALID_VALUES_FOR_TIERS_MODE =
String.static_array("graduated", "volume")
Constructors
Instance Method Summary
- #api_client : ApiClient
- #api_client=(api_client : ApiClient)
-
#build_api_request_for_get_prices(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, currency : String | Nil = nil, product : String | Nil = nil, _type : String | Nil = nil, active : Bool | Nil = nil, recurring : Stripe::AllPricesRecurringParams | Nil = nil, lookup_keys : Array(Array(String)) | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_get_prices_price(*, price : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_get_prices_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_prices(*, currency : String | Nil = nil, active : Bool | Nil = nil, billing_scheme : String | Nil = nil, currency_options : Hash(String, Stripe::CurrencyOption) | Nil = nil, custom_unit_amount : Stripe::CustomUnitAmount | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, nickname : String | Nil = nil, product : String | Nil = nil, product_data : Stripe::InlineProductParams | Nil = nil, recurring : Stripe::Recurring | Nil = nil, tax_behavior : String | Nil = nil, tiers : Array(Stripe::Tier) | Nil = nil, tiers_mode : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil, transform_quantity : Stripe::TransformUsageParam | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_prices_price(*, price : String | Nil = nil, active : Bool | Nil = nil, currency_options : Stripe::PostPricesPriceRequestCurrencyOptions | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, nickname : String | Nil = nil, tax_behavior : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil) : Crest::Request
@return Crest::Request
- #client_side_validation?(*args, **options)
- #client_side_validation?(*args, **options, &)
- #debugging?(*args, **options)
- #debugging?(*args, **options, &)
-
#get_prices(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, currency : String | Nil = nil, product : String | Nil = nil, _type : String | Nil = nil, active : Bool | Nil = nil, recurring : Stripe::AllPricesRecurringParams | Nil = nil, lookup_keys : Array(Array(String)) | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::PriceList
Returns a list of your active prices, excluding inline prices.
-
#get_prices(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, currency : String | Nil = nil, product : String | Nil = nil, _type : String | Nil = nil, active : Bool | Nil = nil, recurring : Stripe::AllPricesRecurringParams | Nil = nil, lookup_keys : Array(Array(String)) | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Returns a list of your active prices, excluding <a href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
-
#get_prices_price(*, price : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Price
Retrieves the price with the given ID.
@required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. -
#get_prices_price(*, price : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Retrieves the price with the given ID.</p> @required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
-
#get_prices_price_with_http_info(*, price : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Price, Int32, Hash(String, Array(String) | String))
<p>Retrieves the price with the given ID.</p> @required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
-
#get_prices_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::SearchResult
Search for prices you’ve previously created using Stripe’s Search Query Language.
-
#get_prices_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
-
#get_prices_search_with_http_info(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::SearchResult, Int32, Hash(String, Array(String) | String))
<p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
-
#get_prices_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, limit : Int64 | Nil = nil, currency : String | Nil = nil, product : String | Nil = nil, _type : String | Nil = nil, active : Bool | Nil = nil, recurring : Stripe::AllPricesRecurringParams | Nil = nil, lookup_keys : Array(Array(String)) | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::PriceList, Int32, Hash(String, Array(String) | String))
<p>Returns a list of your active prices, excluding <a href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
-
#post_prices(*, currency : String | Nil = nil, active : Bool | Nil = nil, billing_scheme : String | Nil = nil, currency_options : Hash(String, Stripe::CurrencyOption) | Nil = nil, custom_unit_amount : Stripe::CustomUnitAmount | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, nickname : String | Nil = nil, product : String | Nil = nil, product_data : Stripe::InlineProductParams | Nil = nil, recurring : Stripe::Recurring | Nil = nil, tax_behavior : String | Nil = nil, tiers : Array(Stripe::Tier) | Nil = nil, tiers_mode : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil, transform_quantity : Stripe::TransformUsageParam | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Stripe::Price
Creates a new price for an existing product.
-
#post_prices(*, currency : String | Nil = nil, active : Bool | Nil = nil, billing_scheme : String | Nil = nil, currency_options : Hash(String, Stripe::CurrencyOption) | Nil = nil, custom_unit_amount : Stripe::CustomUnitAmount | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, nickname : String | Nil = nil, product : String | Nil = nil, product_data : Stripe::InlineProductParams | Nil = nil, recurring : Stripe::Recurring | Nil = nil, tax_behavior : String | Nil = nil, tiers : Array(Stripe::Tier) | Nil = nil, tiers_mode : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil, transform_quantity : Stripe::TransformUsageParam | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Creates a new price for an existing product.
-
#post_prices_price(*, price : String | Nil = nil, active : Bool | Nil = nil, currency_options : Stripe::PostPricesPriceRequestCurrencyOptions | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, nickname : String | Nil = nil, tax_behavior : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil) : Stripe::Price
Updates the specified price by setting the values of the parameters passed.
-
#post_prices_price(*, price : String | Nil = nil, active : Bool | Nil = nil, currency_options : Stripe::PostPricesPriceRequestCurrencyOptions | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, nickname : String | Nil = nil, tax_behavior : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Updates the specified price by setting the values of the parameters passed.
-
#post_prices_price_with_http_info(*, price : String | Nil = nil, active : Bool | Nil = nil, currency_options : Stripe::PostPricesPriceRequestCurrencyOptions | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, nickname : String | Nil = nil, tax_behavior : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil) : Tuple(Stripe::Price, Int32, Hash(String, Array(String) | String))
<p>Updates the specified price by setting the values of the parameters passed.
-
#post_prices_with_http_info(*, currency : String | Nil = nil, active : Bool | Nil = nil, billing_scheme : String | Nil = nil, currency_options : Hash(String, Stripe::CurrencyOption) | Nil = nil, custom_unit_amount : Stripe::CustomUnitAmount | Nil = nil, expand : Array(String) | Nil = nil, lookup_key : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, nickname : String | Nil = nil, product : String | Nil = nil, product_data : Stripe::InlineProductParams | Nil = nil, recurring : Stripe::Recurring | Nil = nil, tax_behavior : String | Nil = nil, tiers : Array(Stripe::Tier) | Nil = nil, tiers_mode : String | Nil = nil, transfer_lookup_key : Bool | Nil = nil, transform_quantity : Stripe::TransformUsageParam | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Tuple(Stripe::Price, Int32, Hash(String, Array(String) | String))
<p>Creates a new price for an existing product.
Constructor Detail
Instance Method Detail
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active
to false.
<p>Returns a list of your active prices, excluding <a href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>. For the list of inactive prices, set <code>active</code> to false.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar
, your subsequent call can include ending_before=obj_bar
in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo
, your subsequent call can include starting_after=obj_foo
in order to fetch the next page of the list.
@optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created
field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param currency [String?] Only return prices for the given currency.
@optional @param product [String?] Only return prices for the given product.
@optional @param _type [String?] Only return prices of type recurring
or one_time
.
@optional @param active [Bool?] Only return prices that are active or inactive (e.g., pass false
to list all inactive prices).
@optional @param recurring [Stripe::AllPricesRecurringParams?] Only return prices with these recurring fields.
@optional @param lookup_keys [Array(Array(String))?] Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
Retrieves the price with the given ID.
@required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Price]<p>Retrieves the price with the given ID.</p> @required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>Retrieves the price with the given ID.</p> @required @param price [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Price, Integer, Hash)] Stripe::Price, response status code and response headers
Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
@required @param query [String?] The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). @optional @param page [String?] A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::SearchResult]<p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p> @required @param query [String?] The search query string. See search query language and the list of supported query fields for prices. @optional @param page [String?] A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p> @required @param query [String?] The search query string. See search query language and the list of supported query fields for prices. @optional @param page [String?] A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::SearchResult, Integer, Hash)] Stripe::SearchResult, response status code and response headers
<p>Returns a list of your active prices, excluding <a href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>. For the list of inactive prices, set <code>active</code> to false.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar
, your subsequent call can include ending_before=obj_bar
in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo
, your subsequent call can include starting_after=obj_foo
in order to fetch the next page of the list.
@optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created
field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param currency [String?] Only return prices for the given currency.
@optional @param product [String?] Only return prices for the given product.
@optional @param _type [String?] Only return prices of type recurring
or one_time
.
@optional @param active [Bool?] Only return prices that are active or inactive (e.g., pass false
to list all inactive prices).
@optional @param recurring [Stripe::AllPricesRecurringParams?] Only return prices with these recurring fields.
@optional @param lookup_keys [Array(Array(String))?] Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::PriceList, Integer, Hash)] Stripe::PriceList, response status code and response headers
Creates a new price for an existing product. The price can be recurring or one-time.
@required @param currency [String?] Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to `true`. @optional @param billing_scheme [String?] 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. @optional @param currency_options [Hash(String, Stripe::CurrencyOption)?] @optional @param custom_unit_amount [Stripe::CustomUnitAmount?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. @optional @param metadata [Hash(String, String)?] @optional @param nickname [String?] A brief description of the price, hidden from customers. @optional @param product [String?] The ID of the product that this price will belong to. @optional @param product_data [Stripe::InlineProductParams?] @optional @param recurring [Stripe::Recurring?] @optional @param tax_behavior [String?] Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. 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. @optional @param tiers [Array(Stripe::Tier)?] Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. @optional @param tiers_mode [String?] 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. @optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. @optional @param transform_quantity [Stripe::TransformUsageParam?] @optional @param unit_amount [Int32?] A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. @optional @param unit_amount_decimal [BigDecimal?] Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. @return [Stripe::Price]<p>Creates a new price for an existing product. The price can be recurring or one-time.</p>
@required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to true
.
@optional @param billing_scheme [String?] 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.
@optional @param currency_options [Hash(String, Stripe::CurrencyOption)?]
@optional @param custom_unit_amount [Stripe::CustomUnitAmount?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
@optional @param metadata [Hash(String, String)?]
@optional @param nickname [String?] A brief description of the price, hidden from customers.
@optional @param product [String?] The ID of the product that this price will belong to.
@optional @param product_data [Stripe::InlineProductParams?]
@optional @param recurring [Stripe::Recurring?]
@optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. 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.
@optional @param tiers [Array(Stripe::Tier)?] Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
@optional @param tiers_mode [String?] 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.
@optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
@optional @param transform_quantity [Stripe::TransformUsageParam?]
@optional @param unit_amount [Int32?] A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of unit_amount
, unit_amount_decimal
, or custom_unit_amount
is required, unless billing_scheme=tiered
.
@optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount
, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount
and unit_amount_decimal
can be set.
@return nil
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
@required @param price [String?] @optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to `true`. @optional @param currency_options [Stripe::PostPricesPriceRequestCurrencyOptions?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param nickname [String?] A brief description of the price, hidden from customers. @optional @param tax_behavior [String?] Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. 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. @optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. @return [Stripe::Price]<p>Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.</p>
@required @param price [String?]
@optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to true
.
@optional @param currency_options [Stripe::PostPricesPriceRequestCurrencyOptions?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param nickname [String?] A brief description of the price, hidden from customers.
@optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. 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.
@optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
@return nil
<p>Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.</p>
@required @param price [String?]
@optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to true
.
@optional @param currency_options [Stripe::PostPricesPriceRequestCurrencyOptions?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param nickname [String?] A brief description of the price, hidden from customers.
@optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. 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.
@optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
@return [Tuple(Stripe::Price, Integer, Hash)] Stripe::Price, response status code and response headers
<p>Creates a new price for an existing product. The price can be recurring or one-time.</p>
@required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param active [Bool?] Whether the price can be used for new purchases. Defaults to true
.
@optional @param billing_scheme [String?] 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.
@optional @param currency_options [Hash(String, Stripe::CurrencyOption)?]
@optional @param custom_unit_amount [Stripe::CustomUnitAmount?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param lookup_key [String?] A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
@optional @param metadata [Hash(String, String)?]
@optional @param nickname [String?] A brief description of the price, hidden from customers.
@optional @param product [String?] The ID of the product that this price will belong to.
@optional @param product_data [Stripe::InlineProductParams?]
@optional @param recurring [Stripe::Recurring?]
@optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. 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.
@optional @param tiers [Array(Stripe::Tier)?] Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
@optional @param tiers_mode [String?] 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.
@optional @param transfer_lookup_key [Bool?] If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
@optional @param transform_quantity [Stripe::TransformUsageParam?]
@optional @param unit_amount [Int32?] A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of unit_amount
, unit_amount_decimal
, or custom_unit_amount
is required, unless billing_scheme=tiered
.
@optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount
, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount
and unit_amount_decimal
can be set.
@return [Tuple(Stripe::Price, Integer, Hash)] Stripe::Price, response status code and response headers