Sha256: ac44b11bb60ed816106e45bc1389f545ae9dd202a45055aff29ecc5c8166ba3d

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

# coding: utf-8

module ONIX
  class Price
    include ROXML

    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"
    xml_accessor :price_per, :from => "PricePer", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
    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 :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"

    def initialize
      self.discounts_coded = []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onix-0.9.2 lib/onix/price.rb