Class: Stripe::V2::Billing::RateCards::RateCreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::RateCards::RateCreateParams
- Defined in:
- lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb
Defined Under Namespace
Classes: CustomPricingUnitAmount, Tier, TransformQuantity
Instance Attribute Summary collapse
-
#custom_pricing_unit_amount ⇒ Object
The custom pricing unit that this rate binds to.
-
#metadata ⇒ Object
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#metered_item ⇒ Object
The Metered Item that this rate binds to.
-
#tiering_mode ⇒ Object
Defines whether the tiered price should be graduated or volume-based.
-
#tiers ⇒ Object
Each element represents a pricing tier.
-
#transform_quantity ⇒ Object
Apply a transformation to the reported usage or set quantity before computing the amount billed.
-
#unit_amount ⇒ Object
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places.
Instance Method Summary collapse
-
#initialize(custom_pricing_unit_amount: nil, metadata: nil, metered_item: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil) ⇒ RateCreateParams
constructor
A new instance of RateCreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(custom_pricing_unit_amount: nil, metadata: nil, metered_item: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil) ⇒ RateCreateParams
Returns a new instance of RateCreateParams.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 70 def initialize( custom_pricing_unit_amount: nil, metadata: nil, metered_item: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil ) @custom_pricing_unit_amount = custom_pricing_unit_amount @metadata = @metered_item = metered_item @tiering_mode = tiering_mode @tiers = tiers @transform_quantity = transform_quantity @unit_amount = unit_amount end |
Instance Attribute Details
#custom_pricing_unit_amount ⇒ Object
The custom pricing unit that this rate binds to.
53 54 55 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 53 def custom_pricing_unit_amount @custom_pricing_unit_amount end |
#metadata ⇒ Object
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
55 56 57 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 55 def @metadata end |
#metered_item ⇒ Object
The Metered Item that this rate binds to.
57 58 59 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 57 def metered_item @metered_item end |
#tiering_mode ⇒ Object
Defines whether the tiered 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, the pricing changes as the quantity grows into new tiers. Can only be set if ‘tiers` is set.
61 62 63 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 61 def tiering_mode @tiering_mode end |
#tiers ⇒ Object
Each element represents a pricing tier. Cannot be set if ‘unit_amount` is provided.
63 64 65 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 63 def tiers @tiers end |
#transform_quantity ⇒ Object
Apply a transformation to the reported usage or set quantity before computing the amount billed.
65 66 67 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 65 def transform_quantity @transform_quantity end |
#unit_amount ⇒ Object
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. Cannot be set if ‘tiers` is provided.
68 69 70 |
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 68 def unit_amount @unit_amount end |