Class: Clerk::Models::Components::BillingPaymentAttemptTotals
- Inherits:
-
Object
- Object
- Clerk::Models::Components::BillingPaymentAttemptTotals
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/billingpaymentattempt_totals.rb
Overview
Totals breakdown for this payment attempt.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(subtotal:, base_fee:, tax_total:, grand_total:, per_unit_totals: nil, credits: nil, discounts: nil) ⇒ BillingPaymentAttemptTotals
constructor
A new instance of BillingPaymentAttemptTotals.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(subtotal:, base_fee:, tax_total:, grand_total:, per_unit_totals: nil, credits: nil, discounts: nil) ⇒ BillingPaymentAttemptTotals
Returns a new instance of BillingPaymentAttemptTotals.
31 32 33 34 35 36 37 38 39 |
# File 'lib/clerk/models/components/billingpaymentattempt_totals.rb', line 31 def initialize(subtotal:, base_fee:, tax_total:, grand_total:, per_unit_totals: nil, credits: nil, discounts: nil) @subtotal = subtotal @base_fee = base_fee @tax_total = tax_total @grand_total = grand_total @per_unit_totals = per_unit_totals @credits = credits @discounts = discounts end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/clerk/models/components/billingpaymentattempt_totals.rb', line 42 def ==(other) return false unless other.is_a? self.class return false unless @subtotal == other.subtotal return false unless @base_fee == other.base_fee return false unless @tax_total == other.tax_total return false unless @grand_total == other.grand_total return false unless @per_unit_totals == other.per_unit_totals return false unless @credits == other.credits return false unless @discounts == other.discounts true end |