Class: Twinfield::SalesInvoice::Financials

Inherits:
Object
  • Object
show all
Defined in:
lib/twinfield/sales_invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, number:) ⇒ Financials

Returns a new instance of Financials.



8
9
10
11
# File 'lib/twinfield/sales_invoice.rb', line 8

def initialize(code:, number:)
  @code = code
  @number = number
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



6
7
8
# File 'lib/twinfield/sales_invoice.rb', line 6

def code
  @code
end

#numberObject

Returns the value of attribute number.



6
7
8
# File 'lib/twinfield/sales_invoice.rb', line 6

def number
  @number
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
# File 'lib/twinfield/sales_invoice.rb', line 13

def to_h
  {
    code: code,
    number: number
  }
end