Class: Clerk::Models::Components::NextInvoiceAmount

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/next_invoice_amount.rb

Overview

Amount for the next payment.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(amount:, amount_formatted:, currency:, currency_symbol:) ⇒ NextInvoiceAmount

Returns a new instance of NextInvoiceAmount.



25
26
27
28
29
30
# File 'lib/clerk/models/components/next_invoice_amount.rb', line 25

def initialize(amount:, amount_formatted:, currency:, currency_symbol:)
  @amount = amount
  @amount_formatted = amount_formatted
  @currency = currency
  @currency_symbol = currency_symbol
end

Instance Method Details

#==(other) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/clerk/models/components/next_invoice_amount.rb', line 33

def ==(other)
  return false unless other.is_a? self.class
  return false unless @amount == other.amount
  return false unless @amount_formatted == other.amount_formatted
  return false unless @currency == other.currency
  return false unless @currency_symbol == other.currency_symbol
  true
end