Module: AccountComponent::Controls::Commands::Withdraw

Defined in:
lib/account_component/controls/commands/withdraw.rb

Class Method Summary collapse

Class Method Details

.example(id: nil, account_id: nil, amount: nil) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/account_component/controls/commands/withdraw.rb', line 5

def self.example(id: nil, account_id: nil, amount: nil)
  id ||= ID.example
   ||= Account.id
  amount ||= Money.example

  withdraw = AccountComponent::Messages::Commands::Withdraw.build

  withdraw.withdrawal_id = id
  withdraw. = 
  withdraw.amount = amount
  withdraw.time = Controls::Time::Effective.example

  withdraw..global_position = Position.example

  withdraw
end