Sha256: a85cededeb7fdc80dbda6bdb8ef48cd97e45b87aa514346401c40f4e8088cdf4

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 Bytes

Contents

module MWS
  module Orders
    module Parser
      class ShippingAddress < Model
        value :name do
          text_at_xpath('Name')
        end

        value :address_lines do
          1.upto(3).map { |i| text_at_xpath("AddressLine#{i}") }.compact
        end

        value :city do
          text_at_xpath('City')
        end

        value :state_or_region do
          text_at_xpath('StateOrRegion')
        end

        value :postal_code do
          text_at_xpath('PostalCode')
        end

        value :country_code do
          text_at_xpath('CountryCode')
        end

        value :phone do
          text_at_xpath('Phone')
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mws-orders-0.0.2 lib/mws/orders/parsers/shipping_address.rb
mws-orders-0.0.1 lib/mws/orders/parsers/shipping_address.rb