Class: Moov::Models::Components::WalletTransaction
- Inherits:
-
Object
- Object
- Moov::Models::Components::WalletTransaction
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/wallettransaction.rb
Overview
A transaction that funds or deducts from the wallet.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(wallet_id:, transaction_id:, transaction_type:, source_type:, source_id:, status:, memo:, created_on:, currency:, gross_amount:, gross_amount_decimal:, fee:, fee_decimal:, net_amount:, net_amount_decimal:, completed_on: nil, fee_i_ds: nil, available_balance: nil, available_balance_decimal: nil, sweep_id: nil) ⇒ WalletTransaction
constructor
A new instance of WalletTransaction.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(wallet_id:, transaction_id:, transaction_type:, source_type:, source_id:, status:, memo:, created_on:, currency:, gross_amount:, gross_amount_decimal:, fee:, fee_decimal:, net_amount:, net_amount_decimal:, completed_on: nil, fee_i_ds: nil, available_balance: nil, available_balance_decimal: nil, sweep_id: nil) ⇒ WalletTransaction
Returns a new instance of WalletTransaction.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/moov/models/components/wallettransaction.rb', line 58 def initialize(wallet_id:, transaction_id:, transaction_type:, source_type:, source_id:, status:, memo:, created_on:, currency:, gross_amount:, gross_amount_decimal:, fee:, fee_decimal:, net_amount:, net_amount_decimal:, completed_on: nil, fee_i_ds: nil, available_balance: nil, available_balance_decimal: nil, sweep_id: nil) @wallet_id = wallet_id @transaction_id = transaction_id @transaction_type = transaction_type @source_type = source_type @source_id = source_id @status = status @memo = memo @created_on = created_on @currency = currency @gross_amount = gross_amount @gross_amount_decimal = gross_amount_decimal @fee = fee @fee_decimal = fee_decimal @net_amount = net_amount @net_amount_decimal = net_amount_decimal @completed_on = completed_on @fee_i_ds = fee_i_ds @available_balance = available_balance @available_balance_decimal = available_balance_decimal @sweep_id = sweep_id end |
Instance Method Details
#==(other) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/moov/models/components/wallettransaction.rb', line 82 def ==(other) return false unless other.is_a? self.class return false unless @wallet_id == other.wallet_id return false unless @transaction_id == other.transaction_id return false unless @transaction_type == other.transaction_type return false unless @source_type == other.source_type return false unless @source_id == other.source_id return false unless @status == other.status return false unless @memo == other.memo return false unless @created_on == other.created_on return false unless @currency == other.currency return false unless @gross_amount == other.gross_amount return false unless @gross_amount_decimal == other.gross_amount_decimal return false unless @fee == other.fee return false unless @fee_decimal == other.fee_decimal return false unless @net_amount == other.net_amount return false unless @net_amount_decimal == other.net_amount_decimal return false unless @completed_on == other.completed_on return false unless @fee_i_ds == other.fee_i_ds return false unless @available_balance == other.available_balance return false unless @available_balance_decimal == other.available_balance_decimal return false unless @sweep_id == other.sweep_id true end |