Class: Stripe::V2::Billing::ContractCreateParams::PricingOverride::OverwritePrice::Tier

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/contract_create_params.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf: nil) ⇒ Tier

Returns a new instance of Tier.



655
656
657
658
659
660
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 655

def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf: nil)
  @flat_amount = flat_amount
  @unit_amount = unit_amount
  @up_to_decimal = up_to_decimal
  @up_to_inf = up_to_inf
end

Instance Attribute Details

#flat_amountObject

Price for the entire tier, represented as a decimal string in minor currency units.



647
648
649
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 647

def flat_amount
  @flat_amount
end

#unit_amountObject

Per-unit price for units included in this tier, represented as a decimal string in minor currency units.



649
650
651
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 649

def unit_amount
  @unit_amount
end

#up_to_decimalObject

Up to and including this quantity will be contained in the tier.



651
652
653
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 651

def up_to_decimal
  @up_to_decimal
end

#up_to_infObject

No upper bound to this tier.



653
654
655
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 653

def up_to_inf
  @up_to_inf
end

Class Method Details

.field_encodingsObject



662
663
664
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 662

def self.field_encodings
  @field_encodings = { up_to_decimal: :decimal_string }
end