amazon-mws-plus 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.project +12 -0
- data/Gemfile +13 -0
- data/README.markdown +30 -0
- data/Rakefile +50 -0
- data/amazon-mws-plus.gemspec +23 -0
- data/amazon-mws.tmproj +27 -0
- data/examples/xml/cancel_feed_submissions.xml +16 -0
- data/examples/xml/cancel_fulfillment_order.xml +6 -0
- data/examples/xml/cancel_report_requests.xml +18 -0
- data/examples/xml/create_fulfillment_order.xml +6 -0
- data/examples/xml/error.xml +10 -0
- data/examples/xml/get_feed_submission_count.xml +10 -0
- data/examples/xml/get_feed_submission_list.xml +18 -0
- data/examples/xml/get_feed_submission_list_by_next_token.xml +16 -0
- data/examples/xml/get_feed_submission_result.xml +30 -0
- data/examples/xml/get_fulfillment_order.xml +113 -0
- data/examples/xml/get_fulfillment_preview.xml +148 -0
- data/examples/xml/get_matching_product.xml +115 -0
- data/examples/xml/get_matching_product_for_id.xml +119 -0
- data/examples/xml/get_report.xml +237 -0
- data/examples/xml/get_report_count.xml +9 -0
- data/examples/xml/get_report_list.xml +17 -0
- data/examples/xml/get_report_request_count.xml +8 -0
- data/examples/xml/get_report_request_list.xml +120 -0
- data/examples/xml/get_report_request_list_by_next_token.xml +20 -0
- data/examples/xml/get_report_schedule_count.xml +10 -0
- data/examples/xml/get_report_schedule_list.xml +15 -0
- data/examples/xml/get_report_schedule_list_by_next_token.xml +15 -0
- data/examples/xml/list_all_fulfillment_orders.xml +69 -0
- data/examples/xml/list_all_fulfillment_orders_by_next_token.xml +61 -0
- data/examples/xml/manage_report_schedule.xml +14 -0
- data/examples/xml/orders_request.xml +39 -0
- data/examples/xml/request_order_items.xml +51 -0
- data/examples/xml/request_order_items_by_next_token.xml +51 -0
- data/examples/xml/request_orders.xml +43 -0
- data/examples/xml/request_orders_by_next_token.xml +69 -0
- data/examples/xml/request_report.xml +17 -0
- data/examples/xml/submit_feed.xml +14 -0
- data/examples/xml/update_report_acknowledgements.xml +18 -0
- data/examples/xsd/Inventory.xsd +49 -0
- data/examples/xsd/Item.xsd +285 -0
- data/examples/xsd/Listings.xsd +32 -0
- data/examples/xsd/OrderAcknowledgement.xsd +55 -0
- data/examples/xsd/OrderAdjustment.xsd +94 -0
- data/examples/xsd/OrderFulfillment.xsd +57 -0
- data/examples/xsd/Override.xsd +48 -0
- data/examples/xsd/Price.xsd +59 -0
- data/examples/xsd/ProcessingReport.xsd +87 -0
- data/examples/xsd/Product.xsd +220 -0
- data/examples/xsd/Product/AutoAccessory.xsd +807 -0
- data/examples/xsd/Product/Beauty.xsd +114 -0
- data/examples/xsd/Product/CE.xsd +544 -0
- data/examples/xsd/Product/CameraPhoto.xsd +2410 -0
- data/examples/xsd/Product/FoodAndBeverages.xsd +270 -0
- data/examples/xsd/Product/Gourmet.xsd +85 -0
- data/examples/xsd/Product/Health.xsd +189 -0
- data/examples/xsd/Product/Home.xsd +654 -0
- data/examples/xsd/Product/Jewelry.xsd +603 -0
- data/examples/xsd/Product/Miscellaneous.xsd +157 -0
- data/examples/xsd/Product/MusicalInstruments.xsd +853 -0
- data/examples/xsd/Product/Office.xsd +550 -0
- data/examples/xsd/Product/PetSupplies.xsd +40 -0
- data/examples/xsd/Product/ProductClothing.xsd +197 -0
- data/examples/xsd/Product/SWVG.xsd +238 -0
- data/examples/xsd/Product/Sports.xsd +308 -0
- data/examples/xsd/Product/TiresAndWheels.xsd +159 -0
- data/examples/xsd/Product/Tools.xsd +62 -0
- data/examples/xsd/Product/ToysBaby.xsd +241 -0
- data/examples/xsd/Product/Wireless.xsd +77 -0
- data/examples/xsd/ProductImage.xsd +39 -0
- data/examples/xsd/Relationship.xsd +47 -0
- data/examples/xsd/SettlementReport.xsd +158 -0
- data/examples/xsd/amzn-base.xsd +1600 -0
- data/examples/xsd/amzn-envelope.xsd +98 -0
- data/examples/xsd/amzn-header.xsd +45 -0
- data/lib/amazon-mws.rb +6 -0
- data/lib/amazon/mws.rb +69 -0
- data/lib/amazon/mws/authentication.rb +10 -0
- data/lib/amazon/mws/authentication/query_string.rb +36 -0
- data/lib/amazon/mws/authentication/signature.rb +43 -0
- data/lib/amazon/mws/base.rb +74 -0
- data/lib/amazon/mws/connection.rb +107 -0
- data/lib/amazon/mws/connection/management.rb +95 -0
- data/lib/amazon/mws/connection/request_builder.rb +67 -0
- data/lib/amazon/mws/exceptions.rb +55 -0
- data/lib/amazon/mws/lib/extensions.rb +178 -0
- data/lib/amazon/mws/lib/memoizable.rb +10 -0
- data/lib/amazon/mws/request/feed.rb +276 -0
- data/lib/amazon/mws/request/feed_builder.rb +83 -0
- data/lib/amazon/mws/request/fulfillment.rb +50 -0
- data/lib/amazon/mws/request/orders.rb +107 -0
- data/lib/amazon/mws/request/products.rb +38 -0
- data/lib/amazon/mws/request/report.rb +330 -0
- data/lib/amazon/mws/response.rb +43 -0
- data/lib/amazon/mws/response/feed/cancel_feed_submissions_response.rb +15 -0
- data/lib/amazon/mws/response/feed/get_feed_submission_count_response.rb +13 -0
- data/lib/amazon/mws/response/feed/get_feed_submission_list_by_next_token_response.rb +17 -0
- data/lib/amazon/mws/response/feed/get_feed_submission_list_response.rb +16 -0
- data/lib/amazon/mws/response/feed/get_feed_submission_result_response.rb +54 -0
- data/lib/amazon/mws/response/feed/models/feed_submission.rb +16 -0
- data/lib/amazon/mws/response/feed/submit_feed_response.rb +15 -0
- data/lib/amazon/mws/response/fulfillment_order/cancel_fulfillment_order_response.rb +11 -0
- data/lib/amazon/mws/response/fulfillment_order/create_fulfillment_order_response.rb +12 -0
- data/lib/amazon/mws/response/fulfillment_order/get_fulfillment_order_response.rb +19 -0
- data/lib/amazon/mws/response/fulfillment_order/list_all_fulfillment_orders_by_next_token_response.rb +16 -0
- data/lib/amazon/mws/response/fulfillment_order/list_all_fulfillment_orders_response.rb +15 -0
- data/lib/amazon/mws/response/fulfillment_order/models/fulfillment_address.rb +18 -0
- data/lib/amazon/mws/response/fulfillment_order/models/fulfillment_order.rb +24 -0
- data/lib/amazon/mws/response/fulfillment_order/models/fulfillment_order_item.rb +20 -0
- data/lib/amazon/mws/response/fulfillment_order/models/fulfillment_shipment.rb +18 -0
- data/lib/amazon/mws/response/fulfillment_order/models/fulfillment_shipment_item.rb +14 -0
- data/lib/amazon/mws/response/order/models/order.rb +43 -0
- data/lib/amazon/mws/response/order/models/order_item.rb +48 -0
- data/lib/amazon/mws/response/order/models/promotion_id.rb +9 -0
- data/lib/amazon/mws/response/order/request_get_order_response.rb +15 -0
- data/lib/amazon/mws/response/order/request_order_items_response.rb +25 -0
- data/lib/amazon/mws/response/order/request_orders_response.rb +28 -0
- data/lib/amazon/mws/response/product/get_matching_proudct.rb +31 -0
- data/lib/amazon/mws/response/product/models/product.rb +36 -0
- data/lib/amazon/mws/response/report/cancel_report_requests_response.rb +16 -0
- data/lib/amazon/mws/response/report/get_report_count_response.rb +13 -0
- data/lib/amazon/mws/response/report/get_report_list_response.rb +17 -0
- data/lib/amazon/mws/response/report/get_report_request_count_response.rb +13 -0
- data/lib/amazon/mws/response/report/get_report_request_list_by_next_token_response.rb +17 -0
- data/lib/amazon/mws/response/report/get_report_request_list_response.rb +17 -0
- data/lib/amazon/mws/response/report/get_report_schedule_count_response.rb +13 -0
- data/lib/amazon/mws/response/report/get_report_schedule_list_by_next_token_response.rb +17 -0
- data/lib/amazon/mws/response/report/get_report_schedule_list_response.rb +17 -0
- data/lib/amazon/mws/response/report/manage_report_schedule_response.rb +16 -0
- data/lib/amazon/mws/response/report/models/report_info.rb +16 -0
- data/lib/amazon/mws/response/report/models/report_request.rb +20 -0
- data/lib/amazon/mws/response/report/models/report_schedule.rb +13 -0
- data/lib/amazon/mws/response/report/request_report_response.rb +15 -0
- data/lib/amazon/mws/response/report/update_reports_acknowledgements_response.rb +16 -0
- data/lib/amazon/mws/response/response.rb +43 -0
- data/lib/amazon/mws/response/response_error.rb +21 -0
- data/test/connection_test.rb +14 -0
- data/test/feed_builder_test.rb +74 -0
- data/test/feed_test.rb +144 -0
- data/test/fulfillment_order.rb +49 -0
- data/test/orders_test.rb +78 -0
- data/test/products_test.rb +28 -0
- data/test/query_string_test.rb +18 -0
- data/test/report_test.rb +88 -0
- data/test/response_test.rb +172 -0
- data/test/signature_test.rb +32 -0
- data/test/test_config.yml +6 -0
- data/test/test_helper.rb +33 -0
- metadata +335 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class Response
|
5
|
+
include ROXML
|
6
|
+
xml_convention :camelcase
|
7
|
+
|
8
|
+
# This is the factoryish method that is called!, not new
|
9
|
+
def self.format(response)
|
10
|
+
if response.content_type =~ /xml/ || response.body =~ /<?xml/
|
11
|
+
parse_xml(response)
|
12
|
+
else
|
13
|
+
response.body
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.parse_xml(response)
|
18
|
+
if [Net::HTTPClientError, Net::HTTPServerError].any? {|error| response.is_a? error }
|
19
|
+
return ResponseError.from_xml(response.body)
|
20
|
+
else
|
21
|
+
return self.from_xml(response.body)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def accessors
|
26
|
+
roxml_references.map {|r| r.accessor}
|
27
|
+
end
|
28
|
+
|
29
|
+
# render a ROXML object as a normal hash, eliminating the @ and some unneeded admin fields
|
30
|
+
def as_hash
|
31
|
+
obj_hash = {}
|
32
|
+
self.instance_variables.each do |v|
|
33
|
+
m = v.to_s.sub('@','')
|
34
|
+
if m != 'roxml_references' && m!= 'promotion_ids'
|
35
|
+
obj_hash[m.to_sym] = self.instance_variable_get(v)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
obj_hash
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative 'models/feed_submission'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class CancelFeedSubmissionsResponse < Response
|
7
|
+
xml_name "CancelFeedSubmissionsResponse"
|
8
|
+
result = "CancelFeedSubmissionsResult"
|
9
|
+
|
10
|
+
xml_reader :count, :in => result, :as => Integer
|
11
|
+
xml_reader :feed_submissions, :as => [FeedSubmission], :in => result
|
12
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class GetFeedSubmissionCountResponse < Response
|
5
|
+
xml_name "GetFeedSubmissionCountResponse"
|
6
|
+
result = "GetFeedSubmissionCountResult"
|
7
|
+
|
8
|
+
xml_reader :count, :in => result, :as => Integer
|
9
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require_relative 'models/feed_submission'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class GetFeedSubmissionListByNextTokenResponse < Response
|
7
|
+
xml_name "GetFeedSubmissionListByNextTokenResponse"
|
8
|
+
result = "GetFeedSubmissionListByNextTokenResult"
|
9
|
+
|
10
|
+
xml_reader :has_next?, :in => result
|
11
|
+
xml_reader :next_token, :in => result
|
12
|
+
xml_reader :feed_submissions, :as => [FeedSubmission], :in => result
|
13
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'models/feed_submission'
|
2
|
+
module Amazon
|
3
|
+
module MWS
|
4
|
+
|
5
|
+
class GetFeedSubmissionListResponse < Response
|
6
|
+
xml_name "GetFeedSubmissionListResponse"
|
7
|
+
result = "GetFeedSubmissionListResult"
|
8
|
+
|
9
|
+
xml_reader :has_next?, :in => result
|
10
|
+
xml_reader :next_token, :in => result
|
11
|
+
xml_reader :feed_submissions, :as => [FeedSubmission], :in => result
|
12
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class GetFeedSubmissionResultResponse < Response
|
5
|
+
class Header < Response
|
6
|
+
xml_reader :document_version, :as => Float
|
7
|
+
xml_reader :merchant_id, :from => "MerchantIdentifier"
|
8
|
+
end
|
9
|
+
|
10
|
+
class ProcessingSummary < Response
|
11
|
+
xml_name "ProcessingSummary"
|
12
|
+
|
13
|
+
xml_reader :messages_processed, :as => Integer
|
14
|
+
xml_reader :messages_successful, :as => Integer
|
15
|
+
xml_reader :messages_with_error, :as => Integer
|
16
|
+
xml_reader :messages_with_warning, :as => Integer
|
17
|
+
end
|
18
|
+
|
19
|
+
class Result < Response
|
20
|
+
xml_name "Result"
|
21
|
+
|
22
|
+
xml_reader :message_id, :from => "MessageID", :as => Integer
|
23
|
+
xml_reader :result_code
|
24
|
+
xml_reader :message_code, :from => "ResultMessageCode"
|
25
|
+
xml_reader :description, :from => "ResultDescription"
|
26
|
+
xml_reader :sku, :from => "SKU", :in => "AdditionalInfo"
|
27
|
+
end
|
28
|
+
|
29
|
+
class Message < Response
|
30
|
+
xml_name "Message"
|
31
|
+
|
32
|
+
xml_reader :id, :from => "MessageID", :as => Integer
|
33
|
+
xml_reader :document_transaction_id, :from => "DocumentTransactionID", :in => "ProcessingReport"
|
34
|
+
xml_reader :status_code, :in => "ProcessingReport"
|
35
|
+
xml_reader :processing_summary, :as => ProcessingSummary, :in => "ProcessingReport"
|
36
|
+
xml_reader :results, :as => [Result], :in => "ProcessingReport"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class GetFeedSubmissionResultResponse
|
41
|
+
xml_name "AmazonEnvelope"
|
42
|
+
|
43
|
+
xml_reader :header, :as => Header
|
44
|
+
# flattened header
|
45
|
+
xml_reader :document_version, :as => Float, :in => "Header"
|
46
|
+
xml_reader :merchant_id, :from => "MerchantIdentifier", :in => "Header"
|
47
|
+
|
48
|
+
xml_reader :message_type
|
49
|
+
xml_reader :message, :as => Message
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class FeedSubmission < Response
|
5
|
+
xml_name "FeedSubmissionInfo"
|
6
|
+
|
7
|
+
xml_reader :id, :from => "FeedSubmissionId"
|
8
|
+
xml_reader :feed_type
|
9
|
+
xml_reader :submitted_date, :as => Time
|
10
|
+
xml_reader :started_processing_date, :as => Time
|
11
|
+
xml_reader :completed_processing_date, :as => Time
|
12
|
+
xml_reader :feed_processing_status
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative 'models/feed_submission'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class SubmitFeedResponse < Response
|
7
|
+
xml_name "SubmitFeedResponse"
|
8
|
+
result = "SubmitFeedResult"
|
9
|
+
|
10
|
+
xml_reader :feed_submission, :as => FeedSubmission, :in => result
|
11
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'models/fulfillment_order'
|
2
|
+
require_relative 'models/fulfillment_order_item'
|
3
|
+
require_relative 'models/fulfillment_shipment'
|
4
|
+
|
5
|
+
module Amazon
|
6
|
+
module MWS
|
7
|
+
|
8
|
+
class GetFulfillmentOrderResponse < Response
|
9
|
+
xml_name 'GetFulfillmentOrderResponse'
|
10
|
+
result = 'GetFulfillmentOrderResult'
|
11
|
+
namespace = 'xmlns:'
|
12
|
+
|
13
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
14
|
+
xml_reader :fulfillment_order, :as => FulfillmentOrder, :in => result
|
15
|
+
xml_reader :fulfillment_order_items, :as => [FulFillmentOrderItem], :in => namespace + result + "/" + namespace + "FulfillmentOrderItem", :from => "member"
|
16
|
+
xml_reader :fulfillment_shipments, :as => [FulfillmentShipment], :in => namespace + result + "/" + namespace + "FulfillmentShipment", :from => "member"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/amazon/mws/response/fulfillment_order/list_all_fulfillment_orders_by_next_token_response.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'models/fulfillment_order'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class ListAllFulfillmentOrdersByNextTokenResponse < Response
|
7
|
+
xml_name 'ListAllFulfillmentOrdersByNextTokenResponse'
|
8
|
+
result = 'ListAllFulfillmentOrdersByNextTokenResult'
|
9
|
+
namespace = 'xmlns:'
|
10
|
+
|
11
|
+
xml_reader :next_token
|
12
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
13
|
+
xml_reader :fulfillment_orders, :as => [ FulfillmentOrder ], :in => 'xmlns:ListAllFulfillmentOrdersByNextTokenResult/xmlns:FulfillmentOrders', :from => "member"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative 'models/fulfillment_order'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class ListAllFulfillmentOrdersResponse < Response
|
7
|
+
xml_name 'ListAllFulfillmentOrdersResponse'
|
8
|
+
result = 'ListAllFulfillmentOrdersResult'
|
9
|
+
namespace = 'xmlns:'
|
10
|
+
|
11
|
+
xml_reader :request_id, :in => "ResponseMetadata"
|
12
|
+
xml_reader :fulfillment_orders, :as => [ FulfillmentOrder ], :in => 'xmlns:ListAllFulfillmentOrdersResult/xmlns:FulfillmentOrders', :from => "member"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class FulfillmentAddress < Response
|
5
|
+
xml_reader :name
|
6
|
+
xml_reader :line1
|
7
|
+
xml_reader :line2
|
8
|
+
xml_reader :line3
|
9
|
+
xml_reader :district_or_county
|
10
|
+
xml_reader :city
|
11
|
+
xml_reader :state_or_province_code
|
12
|
+
xml_reader :country_code
|
13
|
+
xml_reader :postal_code
|
14
|
+
xml_reader :phone_number
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'fulfillment_address'
|
2
|
+
|
3
|
+
module Amazon
|
4
|
+
module MWS
|
5
|
+
|
6
|
+
class FulfillmentOrder < Response
|
7
|
+
xml_name "FulfillmentOrder"
|
8
|
+
|
9
|
+
xml_reader :seller_fulfillment_order_id
|
10
|
+
xml_reader :displayable_order_id
|
11
|
+
xml_reader :displayable_order_date_time, :as => DateTime
|
12
|
+
xml_reader :displayable_order_comment
|
13
|
+
xml_reader :shipping_speed_category
|
14
|
+
xml_reader :destination_address, :as => FulfillmentAddress
|
15
|
+
xml_reader :fulfillment_policy
|
16
|
+
xml_reader :fulfillment_method
|
17
|
+
xml_reader :received_date_time, :as => DateTime
|
18
|
+
xml_reader :fulfillment_order_status
|
19
|
+
xml_reader :statusupdated_date_time, :as => DateTime
|
20
|
+
xml_reader :notification_email_list, :from => "member", :as => [], :in => "xmlns:NotificationEmailList"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class FulFillmentOrderItem < Response
|
5
|
+
xml_name 'member'
|
6
|
+
|
7
|
+
xml_reader :seller_sku, :from => "SellerSKU"
|
8
|
+
xml_reader :gift_message
|
9
|
+
xml_reader :seller_fulfillment_order_item_id
|
10
|
+
xml_reader :estimated_ship_date_time, :as => DateTime
|
11
|
+
xml_reader :displayable_comment
|
12
|
+
xml_reader :order_item_disposition
|
13
|
+
xml_reader :unfulfillable_quantity, :as => Integer
|
14
|
+
xml_reader :cancelled_quantity
|
15
|
+
xml_reader :quantity,:as => Integer
|
16
|
+
xml_reader :estimated_arrival_date_time, :as => DateTime
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative 'fulfillment_shipment_item'
|
2
|
+
module Amazon
|
3
|
+
module MWS
|
4
|
+
|
5
|
+
class FulfillmentShipment < Response
|
6
|
+
xml_name 'member'
|
7
|
+
|
8
|
+
xml_reader :amazon_shipment_id
|
9
|
+
xml_reader :fulfillment_center_id
|
10
|
+
xml_reader :fulfillment_shipment_status
|
11
|
+
xml_reader :shipping_date_time, :as => DateTime
|
12
|
+
xml_reader :estimated_arrival_date_time, :as => DateTime
|
13
|
+
xml_reader :fulfillment_shipment_items, :as => [FulfillmentShipmentItem], :in => "xmlns:FulfillmentShipmentItem", :from => "member"
|
14
|
+
xml_reader :fulfillment_shipment_package
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class FulfillmentShipmentItem < Response
|
5
|
+
xml_name 'member'
|
6
|
+
|
7
|
+
xml_reader :seller_sku, :from => 'SellerSKU'
|
8
|
+
xml_reader :seller_fulfillment_order_item_id
|
9
|
+
xml_reader :quantity
|
10
|
+
xml_reader :package_number
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Amazon
|
2
|
+
module MWS
|
3
|
+
|
4
|
+
class Order < Response
|
5
|
+
|
6
|
+
xml_name "Order"
|
7
|
+
|
8
|
+
xml_reader :amazon_order_id
|
9
|
+
xml_reader :seller_order_id
|
10
|
+
xml_reader :purchase_date, :as => DateTime
|
11
|
+
xml_reader :last_update_date, :as => DateTime
|
12
|
+
xml_reader :order_status
|
13
|
+
xml_reader :fulfillment_channel
|
14
|
+
xml_reader :sales_channel
|
15
|
+
xml_reader :order_channel
|
16
|
+
xml_reader :ship_service_level
|
17
|
+
|
18
|
+
xml_reader :amount, :in => "xmlns:OrderTotal", :as => Float
|
19
|
+
xml_reader :currency_code, :in => "xmlns:OrderTotal"
|
20
|
+
|
21
|
+
xml_reader :name, :in => "xmlns:ShippingAddress"
|
22
|
+
xml_reader :address_line_1, :in => "xmlns:ShippingAddress"
|
23
|
+
xml_reader :address_line_2, :in => "xmlns:ShippingAddress"
|
24
|
+
xml_reader :address_line_3, :in => "xmlns:ShippingAddress"
|
25
|
+
xml_reader :city, :in => "xmlns:ShippingAddress"
|
26
|
+
xml_reader :county, :in => "xmlns:ShippingAddress"
|
27
|
+
xml_reader :district, :in => "xmlns:ShippingAddress"
|
28
|
+
xml_reader :state_or_region, :in => "xmlns:ShippingAddress"
|
29
|
+
xml_reader :postal_code, :in => "xmlns:ShippingAddress"
|
30
|
+
xml_reader :country_code, :in => "xmlns:ShippingAddress"
|
31
|
+
xml_reader :phone, :in => "xmlns:ShippingAddress"
|
32
|
+
|
33
|
+
xml_reader :number_of_items_shipped, :as => Integer
|
34
|
+
xml_reader :number_of_items_unshipped, :as => Integer
|
35
|
+
xml_reader :marketplace_id
|
36
|
+
xml_reader :buyer_name
|
37
|
+
xml_reader :buyer_email
|
38
|
+
xml_reader :shipment_service_level_category
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative 'promotion_id'
|
2
|
+
module Amazon
|
3
|
+
module MWS
|
4
|
+
|
5
|
+
class OrderItem < Response
|
6
|
+
|
7
|
+
xml_name "OrderItem"
|
8
|
+
|
9
|
+
xml_reader :asin, :from => "ASIN"
|
10
|
+
xml_reader :amazon_order_item_id, :from => "OrderItemId"
|
11
|
+
xml_reader :seller_sku, :from => "SellerSKU"
|
12
|
+
xml_reader :title
|
13
|
+
xml_reader :quantity_ordered, :as => Integer
|
14
|
+
xml_reader :quantity_shipped, :as => Integer
|
15
|
+
|
16
|
+
xml_reader :item_price, :from => :amount, :in => "xmlns:ItemPrice", :as => Float
|
17
|
+
xml_reader :item_price_currency, :from => :currency_code, :in => "xmlns:ItemPrice"
|
18
|
+
|
19
|
+
xml_reader :shipping_price, :from => :amount, :in => "xmlns:ShippingPrice", :as => Float
|
20
|
+
xml_reader :shipping_price_currency, :from => :currency_code, :in => "xmlns:ShippingPrice"
|
21
|
+
|
22
|
+
xml_reader :gift_price, :from => :amount, :in => "xmlns:GiftWrapPrice", :as => Float
|
23
|
+
xml_reader :gift_price_currency, :from => :currency_code, :in => "xmlns:GiftWrapPrice"
|
24
|
+
|
25
|
+
xml_reader :item_tax, :from => :amount, :in => "xmlns:ItemTax", :as => Float
|
26
|
+
xml_reader :item_tax_currency, :from => :currency_code, :in => "xmlns:ItemTax"
|
27
|
+
|
28
|
+
xml_reader :shipping_tax, :from => :amount, :in => "xmlns:ShippingTax", :as => Float
|
29
|
+
xml_reader :shipping_tax_currency, :from => :currency_code, :in => "xmlns:ShippingTax"
|
30
|
+
|
31
|
+
xml_reader :gift_tax, :from => :amount, :in => "xmlns:GiftWrapTax", :as => Float
|
32
|
+
xml_reader :gift_tax_currency, :from => :currency_code, :in => "xmlns:GiftWrapTax"
|
33
|
+
|
34
|
+
xml_reader :shipping_discount, :from => :amount, :in => "xmlns:ShippingDiscount", :as => Float
|
35
|
+
xml_reader :shipping_discount_currency, :from => :currency_code, :in => "xmlns:ShippingDiscount"
|
36
|
+
|
37
|
+
xml_reader :promotion_discount, :from => :amount, :in => "xmlns:PromotionDiscount", :as => Float
|
38
|
+
xml_reader :promotion_discount_currency, :from => :currency_code, :in => "xmlns:PromotionDiscount"
|
39
|
+
|
40
|
+
xml_reader :gift_wrap_level
|
41
|
+
xml_reader :gift_message_text
|
42
|
+
|
43
|
+
xml_reader :promotion_ids, :as => [PromotionId], :in => "xmlns:PromotionIds"
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|