Class: Stripe::V2::Billing::ContractUpdateParams::PricingOverrideAction::Add::OverwritePrice
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::ContractUpdateParams::PricingOverrideAction::Add::OverwritePrice
- Defined in:
- lib/stripe/params/v2/billing/contract_update_params.rb
Defined Under Namespace
Classes: Tier
Instance Attribute Summary collapse
-
#price ⇒ Object
The ID of the V1 price to overwrite.
-
#tiering_mode ⇒ Object
Defines whether the tiered price should be graduated or volume-based.
-
#tiers ⇒ Object
Each element represents a pricing tier.
-
#unit_amount ⇒ Object
The per-unit amount to be charged, represented as a decimal string in minor currency units.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(price: nil, tiering_mode: nil, tiers: nil, unit_amount: nil) ⇒ OverwritePrice
constructor
A new instance of OverwritePrice.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(price: nil, tiering_mode: nil, tiers: nil, unit_amount: nil) ⇒ OverwritePrice
Returns a new instance of OverwritePrice.
315 316 317 318 319 320 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 315 def initialize(price: nil, tiering_mode: nil, tiers: nil, unit_amount: nil) @price = price @tiering_mode = tiering_mode @tiers = tiers @unit_amount = unit_amount end |
Instance Attribute Details
#price ⇒ Object
The ID of the V1 price to overwrite.
307 308 309 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 307 def price @price end |
#tiering_mode ⇒ Object
Defines whether the tiered price should be graduated or volume-based.
309 310 311 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 309 def tiering_mode @tiering_mode end |
#tiers ⇒ Object
Each element represents a pricing tier.
311 312 313 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 311 def tiers @tiers end |
#unit_amount ⇒ Object
The per-unit amount to be charged, represented as a decimal string in minor currency units.
313 314 315 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 313 def unit_amount @unit_amount end |
Class Method Details
.field_encodings ⇒ Object
322 323 324 325 326 327 328 329 |
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 322 def self.field_encodings @field_encodings = { tiers: { kind: :array, element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, }, } end |