Class: Stripe::PriceService::CreateParams::CurrencyOptions
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PriceService::CreateParams::CurrencyOptions
- Defined in:
- lib/stripe/services/price_service.rb
Defined Under Namespace
Classes: CustomUnitAmount, Tier
Instance Attribute Summary collapse
-
#custom_unit_amount ⇒ Object
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
-
#tax_behavior ⇒ Object
Only required if a [default tax behavior](stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings.
-
#tiers ⇒ Object
Each element represents a pricing tier.
-
#unit_amount ⇒ Object
A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
-
#unit_amount_decimal ⇒ Object
Same as ‘unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places.
Instance Method Summary collapse
-
#initialize(custom_unit_amount: nil, tax_behavior: nil, tiers: nil, unit_amount: nil, unit_amount_decimal: nil) ⇒ CurrencyOptions
constructor
A new instance of CurrencyOptions.
Methods inherited from RequestParams
Constructor Details
#initialize(custom_unit_amount: nil, tax_behavior: nil, tiers: nil, unit_amount: nil, unit_amount_decimal: nil) ⇒ CurrencyOptions
Returns a new instance of CurrencyOptions.
146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/stripe/services/price_service.rb', line 146 def initialize( custom_unit_amount: nil, tax_behavior: nil, tiers: nil, unit_amount: nil, unit_amount_decimal: nil ) @custom_unit_amount = custom_unit_amount @tax_behavior = tax_behavior @tiers = tiers @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end |
Instance Attribute Details
#custom_unit_amount ⇒ Object
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
136 137 138 |
# File 'lib/stripe/services/price_service.rb', line 136 def custom_unit_amount @custom_unit_amount end |
#tax_behavior ⇒ Object
Only required if a [default tax behavior](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.
138 139 140 |
# File 'lib/stripe/services/price_service.rb', line 138 def tax_behavior @tax_behavior end |
#tiers ⇒ Object
Each element represents a pricing tier. This parameter requires ‘billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
140 141 142 |
# File 'lib/stripe/services/price_service.rb', line 140 def tiers @tiers end |
#unit_amount ⇒ Object
A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
142 143 144 |
# File 'lib/stripe/services/price_service.rb', line 142 def unit_amount @unit_amount end |
#unit_amount_decimal ⇒ Object
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.
144 145 146 |
# File 'lib/stripe/services/price_service.rb', line 144 def unit_amount_decimal @unit_amount_decimal end |