Class: ONIX::ONIX21::Price
Instance Method Summary
collapse
Methods inherited from SubsetDSL
get_class, ref_to_short, short_to_ref
Methods inherited from SubsetDSL
_ancestor_registered_scopes, _ancestors_registered_elements, ancestor_registered_scopes, ancestors_registered_elements, element, elements, get_class, #initialize, #parse, ref_to_short, registered_elements, registered_scopes, scope, short_to_ref, #unsupported
Methods inherited from Subset
parse, #parse, tag_match, #tag_match, #unsupported
Instance Method Details
#amount ⇒ Object
161
162
163
|
# File 'lib/onix/onix21.rb', line 161
def amount
@price_amount
end
|
#currency ⇒ Object
165
166
167
|
# File 'lib/onix/onix21.rb', line 165
def currency
@currency_code
end
|
#from_date ⇒ Object
181
182
183
184
185
|
# File 'lib/onix/onix21.rb', line 181
def from_date
if @price_effective_from
Date.strptime(@price_effective_from,"%Y%m%d")
end
end
|
#including_tax? ⇒ Boolean
173
174
175
176
177
178
179
|
# File 'lib/onix/onix21.rb', line 173
def including_tax?
if @price_type_code.human =~/IncludingTax/
true
else
false
end
end
|
#qualifier ⇒ Object
169
170
171
|
# File 'lib/onix/onix21.rb', line 169
def qualifier
@price_qualifier
end
|
#tax ⇒ Object
197
198
199
|
# File 'lib/onix/onix21.rb', line 197
def tax
nil
end
|
#territory ⇒ Object
193
194
195
|
# File 'lib/onix/onix21.rb', line 193
def territory
Territory.new(@country_codes)
end
|
#until_date ⇒ Object
187
188
189
190
191
|
# File 'lib/onix/onix21.rb', line 187
def until_date
if @price_effective_until
Date.strptime(@price_effective_until,"%Y%m%d")
end
end
|