Class: Twinfield::SalesInvoice::VatLine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vatcode:, vatvalue:, performancetype:, performancedate:, vatname:) ⇒ VatLine

Returns a new instance of VatLine.



24
25
26
27
28
29
30
# File 'lib/twinfield/sales_invoice.rb', line 24

def initialize(vatcode:, vatvalue:, performancetype:, performancedate:, vatname:)
  @vatcode = vatcode
  @vatvalue = vatvalue
  @performancetype = performancetype
  @performancedate = performancedate
  @vatname = vatname
end

Instance Attribute Details

#invoiceObject

Returns the value of attribute invoice.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def invoice
  @invoice
end

#performancedateObject

Returns the value of attribute performancedate.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def performancedate
  @performancedate
end

#performancetypeObject

Returns the value of attribute performancetype.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def performancetype
  @performancetype
end

#vatcodeObject

Returns the value of attribute vatcode.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def vatcode
  @vatcode
end

#vatnameObject

Returns the value of attribute vatname.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def vatname
  @vatname
end

#vatvalueObject

Returns the value of attribute vatvalue.



22
23
24
# File 'lib/twinfield/sales_invoice.rb', line 22

def vatvalue
  @vatvalue
end

Instance Method Details

#to_hObject



32
33
34
35
36
37
38
39
40
# File 'lib/twinfield/sales_invoice.rb', line 32

def to_h
  {
    vatcode: vatcode,
    vatvalue: vatvalue,
    performancetype: performancetype,
    performancedate: performancedate,
    vatname: vatname
  }
end