Class: Datanorm::Lines::V5::Price

Inherits:
Object
  • Object
show all
Defined in:
lib/datanorm/lines/v5/price.rb

Overview

A price represents one price for one product.

Examples:

P;100033152;1;1;28000;06;;;;;;;;
P;VSP-983-B;1;1;3410;BMT;

Instance Method Summary collapse

Instance Method Details

#centsObject



21
22
23
# File 'lib/datanorm/lines/v5/price.rb', line 21

def cents
  columns[4].to_i
end

#idObject



17
18
19
# File 'lib/datanorm/lines/v5/price.rb', line 17

def id
  encode columns[2]
end

#to_sObject



13
14
15
# File 'lib/datanorm/lines/v5/price.rb', line 13

def to_s
  "<Price id=#{id.inspect} #{discounts.join(' | ')}>"
end