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