Class: Stripe::V2::Billing::RateCards::RateCreateParams::Tier

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#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.



33
34
35
36
37
38
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 33

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 with at most 12 decimal places.



23
24
25
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 23

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 with at most 12 decimal places.



26
27
28
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 26

def unit_amount
  @unit_amount
end

#up_to_decimalObject

Up to and including this quantity will be contained in the tier. Only one of ‘up_to_decimal` and `up_to_inf` may be set.



29
30
31
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 29

def up_to_decimal
  @up_to_decimal
end

#up_to_infObject

No upper bound to this tier. Only one of ‘up_to_decimal` and `up_to_inf` may be set.



31
32
33
# File 'lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb', line 31

def up_to_inf
  @up_to_inf
end