Class: Clerk::Models::Components::CommerceSubscriptionItemDiscountsProration
- Inherits:
-
Object
- Object
- Clerk::Models::Components::CommerceSubscriptionItemDiscountsProration
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/commercesubscriptionitem_discounts_proration.rb
Overview
Proration details from passed subscription time
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(amount:, cycle_days_passed:, cycle_days_total:, cycle_passed_percent:) ⇒ CommerceSubscriptionItemDiscountsProration
constructor
A new instance of CommerceSubscriptionItemDiscountsProration.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(amount:, cycle_days_passed:, cycle_days_total:, cycle_passed_percent:) ⇒ CommerceSubscriptionItemDiscountsProration
Returns a new instance of CommerceSubscriptionItemDiscountsProration.
25 26 27 28 29 30 |
# File 'lib/clerk/models/components/commercesubscriptionitem_discounts_proration.rb', line 25 def initialize(amount:, cycle_days_passed:, cycle_days_total:, cycle_passed_percent:) @amount = amount @cycle_days_passed = cycle_days_passed @cycle_days_total = cycle_days_total @cycle_passed_percent = cycle_passed_percent end |
Instance Method Details
#==(other) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/clerk/models/components/commercesubscriptionitem_discounts_proration.rb', line 33 def ==(other) return false unless other.is_a? self.class return false unless @amount == other.amount return false unless @cycle_days_passed == other.cycle_days_passed return false unless @cycle_days_total == other.cycle_days_total return false unless @cycle_passed_percent == other.cycle_passed_percent true end |