Class: ONIX::Tax
Instance Attribute Summary
Attributes included from Attributes
Shortcuts collapse
-
#amount ⇒ Float
shortcut for #tax_amount.
-
#rate_code ⇒ TaxRateCode
shortcut for #tax_rate_code.
-
#rate_percent ⇒ Float
shortcut for #tax_rate_percent.
Low level collapse
- #price_part_descriptions ⇒ Array<String>
- #product_identifiers ⇒ Array<ProductIdentifier>
- #tax_amount ⇒ Float
- #tax_rate_code ⇒ TaxRateCode
- #tax_rate_percent ⇒ Float
- #tax_type ⇒ TaxType
- #taxable_amount ⇒ Float
Methods inherited from SubsetDSL
element, elements, #get_class, get_class, inherited, #initialize, n, #parse, ref_to_short, register_elements, register_scopes, #register_subset_array, registered_elements, #registered_elements, registered_scopes, scope, short_to_ref
Methods inherited from Subset
parse, #parse, #tag_match, #unsupported
Methods included from Attributes
attribute_class, #parse_attributes, #serialized_attributes
Constructor Details
This class inherits a constructor from ONIX::SubsetDSL
Instance Method Details
#amount ⇒ Float
shortcut for #tax_amount
13 14 15 16 17 18 |
# File 'lib/onix/tax.rb', line 13 element "TaxAmount", :float, { :shortcut => :amount, :parse_lambda => lambda { |v| (v * 100).round }, :serialize_lambda => lambda { |v| format("%.2f", v / 100.0) }, :cardinality => 0..1 } |
#price_part_descriptions ⇒ Array<String>
4 |
# File 'lib/onix/tax.rb', line 4 elements "PricePartDescription", :text, :cardinality => 0..n |
#product_identifiers ⇒ Array<ProductIdentifier>
3 |
# File 'lib/onix/tax.rb', line 3 elements "ProductIdentifier", :subset, :cardinality => 0..n |
#rate_code ⇒ TaxRateCode
shortcut for #tax_rate_code
6 |
# File 'lib/onix/tax.rb', line 6 element "TaxRateCode", :subset, :shortcut => :rate_code, :cardinality => 0..1 |
#rate_percent ⇒ Float
shortcut for #tax_rate_percent
7 |
# File 'lib/onix/tax.rb', line 7 element "TaxRatePercent", :float, :shortcut => :rate_percent, :cardinality => 0..1 |
#tax_amount ⇒ Float
13 14 15 16 17 18 |
# File 'lib/onix/tax.rb', line 13 element "TaxAmount", :float, { :shortcut => :amount, :parse_lambda => lambda { |v| (v * 100).round }, :serialize_lambda => lambda { |v| format("%.2f", v / 100.0) }, :cardinality => 0..1 } |
#tax_rate_code ⇒ TaxRateCode
6 |
# File 'lib/onix/tax.rb', line 6 element "TaxRateCode", :subset, :shortcut => :rate_code, :cardinality => 0..1 |
#tax_rate_percent ⇒ Float
7 |
# File 'lib/onix/tax.rb', line 7 element "TaxRatePercent", :float, :shortcut => :rate_percent, :cardinality => 0..1 |
#tax_type ⇒ TaxType
5 |
# File 'lib/onix/tax.rb', line 5 element "TaxType", :subset, :cardinality => 0..1 |
#taxable_amount ⇒ Float
8 9 10 11 12 |
# File 'lib/onix/tax.rb', line 8 element "TaxableAmount", :float, { :parse_lambda => lambda { |v| (v * 100).round }, :serialize_lambda => lambda { |v| format("%.2f", v / 100.0) }, :cardinality => 0..1 } |