Sha256: 163581ee903bc7b2e249af29a033644af04d3ba1fd205ef394df23519ad0f4b0

Contents?: true

Size: 677 Bytes

Versions: 1

Compression:

Stored size: 677 Bytes

Contents

require 'mws/orders/entity'

module MWS
  module Orders
    class ShippingAddress < Entity
      attribute(:name) do
        text_at_xpath('Name')
      end

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

      attribute(:city) do
        text_at_xpath('City')
      end

      attribute(:state_or_region) do
        text_at_xpath('StateOrRegion')
      end

      attribute(:postal_code) do
        text_at_xpath('PostalCode')
      end

      attribute(:country_code) do
        text_at_xpath('CountryCode')
      end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mws-orders-0.2.2 lib/mws/orders/shipping_address.rb