Class: Stripe::Plans::BillingTier
- Inherits:
-
Object
- Object
- Stripe::Plans::BillingTier
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/stripe/billing_tier.rb
Instance Attribute Summary collapse
-
#flat_amount ⇒ Object
Returns the value of attribute flat_amount.
-
#unit_amount ⇒ Object
Returns the value of attribute unit_amount.
-
#up_to ⇒ Object
Returns the value of attribute up_to.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ BillingTier
constructor
A new instance of BillingTier.
- #to_h ⇒ Object
Constructor Details
#initialize(attrs) ⇒ BillingTier
Returns a new instance of BillingTier.
18 19 20 21 22 |
# File 'lib/stripe/billing_tier.rb', line 18 def initialize(attrs) @up_to = attrs[:up_to] @flat_amount = attrs[:flat_amount] @unit_amount = attrs[:unit_amount] end |
Instance Attribute Details
#flat_amount ⇒ Object
Returns the value of attribute flat_amount.
16 17 18 |
# File 'lib/stripe/billing_tier.rb', line 16 def flat_amount @flat_amount end |
#unit_amount ⇒ Object
Returns the value of attribute unit_amount.
16 17 18 |
# File 'lib/stripe/billing_tier.rb', line 16 def unit_amount @unit_amount end |
#up_to ⇒ Object
Returns the value of attribute up_to.
16 17 18 |
# File 'lib/stripe/billing_tier.rb', line 16 def up_to @up_to end |
Instance Method Details
#to_h ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/stripe/billing_tier.rb', line 24 def to_h { up_to: up_to, flat_amount: flat_amount, unit_amount: unit_amount }.compact end |