Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix the ordering of elements within the Price composite

  • Loading branch information...
commit 3f4f18d8a131fac92bad04b9cd5710e9bb425af6 1 parent d5e4857
James Healy authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  data/product.xml
  2. +1 −1  lib/onix/price.rb
2  data/product.xml
View
@@ -65,11 +65,11 @@
</Stock>
<PackQuantity>12</PackQuantity>
<Price>
+ <PriceTypeCode>02</PriceTypeCode>
<DiscountCoded>
<DiscountCodeType>02</DiscountCodeType>
<DiscountCode>123</DiscountCode>
</DiscountCoded>
- <PriceTypeCode>02</PriceTypeCode>
<PriceAmount>59.95</PriceAmount>
</Price>
</SupplyDetail>
2  lib/onix/price.rb
View
@@ -6,7 +6,6 @@ class Price
xml_name "Price"
- xml_accessor :discounts_coded, :from => "DiscountCoded", :as => [ONIX::DiscountCoded]
xml_accessor :price_type_code, :from => "PriceTypeCode", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
xml_accessor :price_type_qualifier, :from => "PriceQualifier", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
xml_accessor :price_type_description, :from => "PriceTypeDescription"
@@ -14,6 +13,7 @@ class Price
xml_accessor :minimum_order_qty, :from => "MinimumOrderQuantity", :as => Fixnum
xml_accessor :class_of_trade, :from => "ClassOfTrade"
xml_accessor :bic_discount_group_code, :from => "BICDiscountGroupCode"
+ xml_accessor :discounts_coded, :from => "DiscountCoded", :as => [ONIX::DiscountCoded]
xml_accessor :price_status, :from => "PriceStatus", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
xml_accessor :price_amount, :from => "PriceAmount", :as => BigDecimal, :to_xml => ONIX::Formatters.decimal
xml_accessor :currency_code, :from => "CurrencyCode"
Please sign in to comment.
Something went wrong with that request. Please try again.