Class: Sendregning::Line

Inherits:
Object
  • Object
show all
Defined in:
lib/sendregning/line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(new_attributes = {}) ⇒ Line

Returns a new instance of Line.



25
26
27
# File 'lib/sendregning/line.rb', line 25

def initialize(new_attributes = {})
  self.attributes = new_attributes
end

Instance Attribute Details

#descObject

Description. String, max length: 75



12
13
14
# File 'lib/sendregning/line.rb', line 12

def desc
  @desc
end

#discountObject

Discount in percentage as decimal. Optional, defaults to 0



18
19
20
# File 'lib/sendregning/line.rb', line 18

def discount
  @discount
end

#itemNoObject

Returns the value of attribute itemNo.



23
24
25
# File 'lib/sendregning/line.rb', line 23

def itemNo
  @itemNo
end

#lineTaxAmountObject

Returns the value of attribute lineTaxAmount.



23
24
25
# File 'lib/sendregning/line.rb', line 23

def lineTaxAmount
  @lineTaxAmount
end

#lineTotalObject

Returns the value of attribute lineTotal.



23
24
25
# File 'lib/sendregning/line.rb', line 23

def lineTotal
  @lineTotal
end

#prodCodeObject

Product code. String, max length: 9



9
10
11
# File 'lib/sendregning/line.rb', line 9

def prodCode
  @prodCode
end

#qtyObject

Quantity, as decimal. Example: ‘7,5’



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

def qty
  @qty
end

#taxObject

Tax rate. Valid rates are: ‘0’, ‘8’, ‘13’ and ‘25’. Default: ‘25’



21
22
23
# File 'lib/sendregning/line.rb', line 21

def tax
  @tax
end

#unitPriceObject

Price per unit in decimal. Example: ‘250,00’



15
16
17
# File 'lib/sendregning/line.rb', line 15

def unitPrice
  @unitPrice
end

Instance Method Details

#to_xml(options = {}) ⇒ Object

Renders line to XML



30
31
32
# File 'lib/sendregning/line.rb', line 30

def to_xml(options = {})
  LineSerializer.build(self, options)
end