Class: StackOne::Models::Shared::JournalLine

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/shared/journalline.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(account_id: nil, account_type: nil, amount: nil, currency_code: nil, description: nil, exchange_rate: nil, id: nil, tax_amount: nil, tax_rate_percentage: nil) ⇒ JournalLine

Returns a new instance of JournalLine.



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/stack_one/models/shared/journalline.rb', line 35

def initialize(account_id: nil, account_type: nil, amount: nil, currency_code: nil, description: nil, exchange_rate: nil, id: nil, tax_amount: nil, tax_rate_percentage: nil)
  @account_id = 
  @account_type = 
  @amount = amount
  @currency_code = currency_code
  @description = description
  @exchange_rate = exchange_rate
  @id = id
  @tax_amount = tax_amount
  @tax_rate_percentage = tax_rate_percentage
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/stack_one/models/shared/journalline.rb', line 48

def ==(other)
  return false unless other.is_a? self.class
  return false unless @account_id == other.
  return false unless @account_type == other.
  return false unless @amount == other.amount
  return false unless @currency_code == other.currency_code
  return false unless @description == other.description
  return false unless @exchange_rate == other.exchange_rate
  return false unless @id == other.id
  return false unless @tax_amount == other.tax_amount
  return false unless @tax_rate_percentage == other.tax_rate_percentage
  true
end