class Sendregning::Line
Attributes
desc[RW]
Description. String, max length: 75
discount[RW]
Discount in percentage as decimal. Optional, defaults to 0
itemNo[RW]
lineTaxAmount[RW]
lineTotal[RW]
prodCode[RW]
Product code. String, max length: 9
qty[RW]
Quantity, as decimal. Example: '7,5'
tax[RW]
Tax rate. Valid rates are: '0', '8', '13' and '25'. Default: '25'
unitPrice[RW]
Price per unit in decimal. Example: '250,00'
Public Class Methods
new(new_attributes = {})
click to toggle source
# File lib/sendregning/line.rb, line 25 def initialize(new_attributes = {}) self.attributes = new_attributes end
Public Instance Methods
to_xml(options = {})
click to toggle source
Renders line to XML
# File lib/sendregning/line.rb, line 30 def to_xml(options = {}) LineSerializer.build(self, options) end
Protected Instance Methods
attributes=(attributes = {})
click to toggle source
# File lib/sendregning/line.rb, line 36 def attributes=(attributes = {}) attributes.each do |key, value| set_method = "#{key}=".to_sym send(set_method, value) if respond_to?(set_method) end attributes end