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