Class: Moov::Models::Components::Adjustment

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/adjustment.rb

Overview

An adjustment to a wallet.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(adjustment_id:, wallet_id:, amount:, created_on:) ⇒ Adjustment

Returns a new instance of Adjustment.



26
27
28
29
30
31
# File 'lib/moov/models/components/adjustment.rb', line 26

def initialize(adjustment_id:, wallet_id:, amount:, created_on:)
  @adjustment_id = adjustment_id
  @wallet_id = wallet_id
  @amount = amount
  @created_on = created_on
end

Instance Method Details

#==(other) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/moov/models/components/adjustment.rb', line 34

def ==(other)
  return false unless other.is_a? self.class
  return false unless @adjustment_id == other.adjustment_id
  return false unless @wallet_id == other.wallet_id
  return false unless @amount == other.amount
  return false unless @created_on == other.created_on
  true
end