Module: AccountComponent::Controls::Account

Defined in:
lib/account_component/controls/account.rb

Defined Under Namespace

Modules: Balance, Closed, New, Open, Sequence

Class Method Summary collapse

Class Method Details

.balanceObject



26
27
28
# File 'lib/account_component/controls/account.rb', line 26

def self.balance
  Money.example
end

.example(balance: nil, sequence: nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/account_component/controls/account.rb', line 4

def self.example(balance: nil, sequence: nil)
  balance ||= self.balance

   = AccountComponent::Account.build

  .id = id
  .balance = balance
  .opened_time = Time::Effective::Raw.example

  .sequence = sequence unless sequence.nil?

  
end

.idObject



18
19
20
# File 'lib/account_component/controls/account.rb', line 18

def self.id
  ID.example(increment: id_increment)
end

.id_incrementObject



22
23
24
# File 'lib/account_component/controls/account.rb', line 22

def self.id_increment
  11
end