Class: C2eCore::Drops::CashBoxDrop

Inherits:
BaseDrop
  • Object
show all
Defined in:
/build/app/mailers/c2e_core/drops/cash_box_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(cash_box) ⇒ CashBoxDrop

Returns a new instance of CashBoxDrop.



7
8
9
10
# File '/build/app/mailers/c2e_core/drops/cash_box_drop.rb', line 7

def initialize(cash_box)
  super()
  @cash_box = cash_box
end

Instance Method Details

#company_branchCompanyBranchDrop

Returns - Company branch to which cash box belongs as drop object.

Returns:



28
29
30
31
32
# File '/build/app/mailers/c2e_core/drops/cash_box_drop.rb', line 28

def company_branch
  stored_value __method__ do
    CompanyBranchDrop.new @cash_box.company_branch
  end
end

#idInteger

Returns - ID of cashbox in database.

Returns:

  • (Integer)
    • ID of cashbox in database.



13
14
15
# File '/build/app/mailers/c2e_core/drops/cash_box_drop.rb', line 13

def id
  @cash_box.id
end

#nameString

Returns - Name of cashbox. E.g.: “T20118BT40077”.

Returns:

  • (String)
    • Name of cashbox. E.g.: “T20118BT40077”.



23
24
25
# File '/build/app/mailers/c2e_core/drops/cash_box_drop.rb', line 23

def name
  @cash_box.name
end

#uuidString

Returns - Serial number of cashbox. E.g.: “T20118BT40077”.

Returns:

  • (String)
    • Serial number of cashbox. E.g.: “T20118BT40077”.



18
19
20
# File '/build/app/mailers/c2e_core/drops/cash_box_drop.rb', line 18

def uuid
  @cash_box.uuid
end