lib/mws/orders/order.rb in mws-orders-0.2.1 vs lib/mws/orders/order.rb in mws-orders-0.2.2
- old
+ new
@@ -1,116 +1,114 @@
-require "mws/orders/entity"
-require "mws/orders/shipping_address"
-require "mws/orders/payment_execution_detail"
+require 'mws/orders/entity'
+require 'mws/orders/shipping_address'
+require 'mws/orders/payment_execution_detail'
module MWS
module Orders
class Order < Entity
attribute(:amazon_order_id) do
- text_at_xpath("AmazonOrderId")
+ text_at_xpath('AmazonOrderId')
end
attribute(:seller_order_id) do
- text_at_xpath("SellerOrderId")
+ text_at_xpath('SellerOrderId')
end
attribute(:purchased_at) do
- time_at_xpath("PurchaseDate")
+ time_at_xpath('PurchaseDate')
end
attribute(:last_updated_at) do
- time_at_xpath("LastUpdateDate")
+ time_at_xpath('LastUpdateDate')
end
attribute(:status) do
- text_at_xpath("OrderStatus")
+ text_at_xpath('OrderStatus')
end
attribute(:fulfillment_channel) do
- text_at_xpath("FulfillmentChannel")
+ text_at_xpath('FulfillmentChannel')
end
attribute(:sales_channel) do
- text_at_xpath("SalesChannel")
+ text_at_xpath('SalesChannel')
end
attribute(:order_channel) do
- text_at_xpath("OrderChannel")
+ text_at_xpath('OrderChannel')
end
attribute(:ship_service_level) do
- text_at_xpath("ShipServiceLevel")
+ text_at_xpath('ShipServiceLevel')
end
attribute(:shipping_address) do
- if node = xpath("ShippingAddress").first
- ShippingAddress.new(node)
- end
+ node = xpath('ShippingAddress').first
+ ShippingAddress.new(node) if node
end
attribute(:total) do
- money_at_xpath("OrderTotal")
+ money_at_xpath('OrderTotal')
end
attribute(:number_of_items_shipped) do
- integer_at_xpath("NumberOfItemsShipped")
+ integer_at_xpath('NumberOfItemsShipped')
end
attribute(:number_of_items_unshipped) do
- integer_at_xpath("NumberOfItemsUnshipped")
+ integer_at_xpath('NumberOfItemsUnshipped')
end
attribute(:payment_execution_detail) do
- if node = xpath("PaymentExecutionDetail").first
- PaymentExecutionDetail.new(node)
- end
+ node = xpath('PaymentExecutionDetail').first
+ PaymentExecutionDetail.new(node) if node
end
attribute(:payment_method) do
- text_at_xpath("PaymentMethod")
+ text_at_xpath('PaymentMethod')
end
attribute(:marketplace_id) do
- text_at_xpath("MarketplaceId")
+ text_at_xpath('MarketplaceId')
end
attribute(:buyer_name) do
- text_at_xpath("BuyerName")
+ text_at_xpath('BuyerName')
end
attribute(:buyer_email) do
- text_at_xpath("BuyerEmail")
+ text_at_xpath('BuyerEmail')
end
attribute(:shipment_service_level_category) do
- text_at_xpath("ShipmentServiceLevelCategory")
+ text_at_xpath('ShipmentServiceLevelCategory')
end
attribute(:cba_displayable_shipping_label) do
- text_at_xpath("CbaDisplayableShippingLabel")
+ text_at_xpath('CbaDisplayableShippingLabel')
end
attribute(:shipped_by_amazon_tfm) do
- text_at_xpath("ShippedByAmazonTFM")
+ text_at_xpath('ShippedByAmazonTFM')
end
attribute(:tfm_shipment_status) do
- text_at_xpath("TFMShipmentStatus")
+ text_at_xpath('TFMShipmentStatus')
end
attribute(:type) do
- text_at_xpath("OrderType")
+ text_at_xpath('OrderType')
end
attribute(:earliest_shipped_at) do
- time_at_xpath("EarliestShipDate")
+ time_at_xpath('EarliestShipDate')
end
attribute(:latest_shipped_at) do
- time_at_xpath("LatestShipDate")
+ time_at_xpath('LatestShipDate')
end
- attribute(:latest_delivery_date) do
+ attribute(:latest_delivered_at) do
time_at_xpath('LatestDeliveryDate')
end
end
end
end