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.



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

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

Instance Attribute Details

#descObject

Description. String, max length: 75



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

def desc
  @desc
end

#discountObject

Discount in percentage as decimal. Optional, defaults to 0



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

def discount
  @discount
end

#itemNoObject

Returns the value of attribute itemNo.



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

def itemNo
  @itemNo
end

#lineTaxAmountObject

Returns the value of attribute lineTaxAmount.



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

def lineTaxAmount
  @lineTaxAmount
end

#lineTotalObject

Returns the value of attribute lineTotal.



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

def lineTotal
  @lineTotal
end

#prodCodeObject

Product code. String, max length: 9



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

def prodCode
  @prodCode
end

#qtyObject

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



4
5
6
# File 'lib/sendregning/line.rb', line 4

def qty
  @qty
end

#taxObject

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



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

def tax
  @tax
end

#unitPriceObject

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



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

def unitPrice
  @unitPrice
end

Instance Method Details

#to_xml(options = {}) ⇒ Object

Renders line to XML



28
29
30
# File 'lib/sendregning/line.rb', line 28

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