peddler 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +15 -14
  4. data/lib/mws/cart_information/client.rb +72 -0
  5. data/lib/mws/cart_information.rb +1 -69
  6. data/lib/mws/customer_information/client.rb +79 -0
  7. data/lib/mws/customer_information.rb +1 -77
  8. data/lib/mws/feeds/client.rb +112 -0
  9. data/lib/mws/feeds.rb +1 -110
  10. data/lib/mws/fulfillment_inbound_shipment/client.rb +233 -0
  11. data/lib/mws/fulfillment_inbound_shipment.rb +1 -231
  12. data/lib/mws/fulfillment_inventory/client.rb +53 -0
  13. data/lib/mws/fulfillment_inventory.rb +1 -51
  14. data/lib/mws/fulfillment_outbound_shipment/client.rb +171 -0
  15. data/lib/mws/fulfillment_outbound_shipment.rb +1 -168
  16. data/lib/mws/off_amazon_payments/client.rb +362 -0
  17. data/lib/mws/off_amazon_payments.rb +1 -360
  18. data/lib/mws/orders/client.rb +102 -0
  19. data/lib/mws/orders.rb +1 -98
  20. data/lib/mws/products/client.rb +234 -0
  21. data/lib/mws/products.rb +1 -232
  22. data/lib/mws/recommendations/client.rb +71 -0
  23. data/lib/mws/recommendations.rb +1 -66
  24. data/lib/mws/reports/client.rb +220 -0
  25. data/lib/mws/reports.rb +1 -220
  26. data/lib/mws/sellers/client.rb +42 -0
  27. data/lib/mws/sellers.rb +1 -40
  28. data/lib/mws/subscriptions/client.rb +177 -0
  29. data/lib/mws/subscriptions.rb +1 -169
  30. data/lib/mws.rb +2 -2
  31. data/lib/peddler/client.rb +3 -3
  32. data/lib/peddler/flat_file_parser.rb +3 -3
  33. data/lib/peddler/operation.rb +2 -3
  34. data/lib/peddler/structured_list.rb +1 -3
  35. data/lib/peddler/version.rb +1 -1
  36. data/lib/peddler/xml_parser.rb +1 -1
  37. data/test/integration/test_cart_information.rb +2 -2
  38. data/test/integration/test_customer_information.rb +2 -2
  39. data/test/integration/test_feeds.rb +2 -2
  40. data/test/integration/test_fulfillment_inbound_shipment.rb +2 -2
  41. data/test/integration/test_fulfillment_inventory.rb +3 -7
  42. data/test/integration/test_fulfillment_outbound_shipment.rb +2 -49
  43. data/test/integration/test_off_amazon_payments.rb +2 -2
  44. data/test/integration/test_orders.rb +2 -13
  45. data/test/integration/test_products.rb +2 -2
  46. data/test/integration/test_recommendations.rb +2 -11
  47. data/test/integration/test_reports.rb +2 -3
  48. data/test/integration/test_sellers.rb +2 -9
  49. data/test/integration/test_subscriptions.rb +2 -2
  50. data/test/integration_test_helper.rb +49 -0
  51. data/test/mws.yml +16 -0
  52. data/test/mws.yml.bak +16 -0
  53. data/test/test_helper.rb +7 -0
  54. data/test/unit/mws/test_off_amazon_payments_client.rb +9 -0
  55. data/test/unit/mws/test_products_client.rb +9 -0
  56. data/test/unit/peddler/test_client.rb +2 -2
  57. data/test/unit/peddler/test_flat_file_parser.rb +2 -2
  58. data/test/unit/peddler/test_operation.rb +2 -2
  59. data/test/unit/peddler/test_parser.rb +2 -2
  60. data/test/unit/peddler/test_structured_list.rb +2 -2
  61. data/test/unit/peddler/test_xml_parser.rb +2 -2
  62. data/test/unit/test_mws.rb +3 -3
  63. data/test/vcr_cassettes/CartInformation.yml +37 -725
  64. data/test/vcr_cassettes/CustomerInformation.yml +37 -728
  65. data/test/vcr_cassettes/Feeds.yml +100 -528
  66. data/test/vcr_cassettes/FulfillmentInboundShipment.yml +39 -728
  67. data/test/vcr_cassettes/FulfillmentInventory.yml +96 -997
  68. data/test/vcr_cassettes/FulfillmentOutboundShipment.yml +39 -725
  69. data/test/vcr_cassettes/OffAmazonPayments.yml +36 -727
  70. data/test/vcr_cassettes/Orders.yml +38 -29855
  71. data/test/vcr_cassettes/Products.yml +1300 -3871
  72. data/test/vcr_cassettes/Recommendations.yml +8934 -15590
  73. data/test/vcr_cassettes/Reports.yml +288 -1326
  74. data/test/vcr_cassettes/Sellers.yml +38 -1178
  75. data/test/vcr_cassettes/Subscriptions.yml +244 -1066
  76. metadata +27 -98
  77. data/test/helper.rb +0 -3
  78. data/test/integration_helper.rb +0 -49
  79. data/test/mws.yml.1 +0 -32
  80. data/test/mws.yml.example +0 -4
  81. data/test/unit/mws/test_off_amazon_payments.rb +0 -9
  82. data/test/unit/mws/test_products.rb +0 -9
@@ -0,0 +1,220 @@
1
+ require 'peddler/client'
2
+
3
+ module MWS
4
+ module Reports
5
+ # The Reports API lets you request reports about your inventory and orders.
6
+ class Client < ::Peddler::Client
7
+ # Creates a report request
8
+ #
9
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_RequestReport.html
10
+ # @param report_type [String]
11
+ # @param opts [Hash]
12
+ # @option opts [String, #iso8601] :start_date
13
+ # @option opts [String, #iso8601] :end_date
14
+ # @option opts [String] :report_options
15
+ # @option opts [Array<String>, String] :marketplace_id
16
+ # @return [Peddler::XMLParser]
17
+ def request_report(report_type, opts = {})
18
+ operation('RequestReport')
19
+ .add(opts.merge('ReportType' => report_type))
20
+ .structure!('MarketplaceIdList', 'Id')
21
+
22
+ run
23
+ end
24
+
25
+ # Lists report requests
26
+ #
27
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestList.html
28
+ # @param opts [Hash]
29
+ # @option opts [Array<String>, String] :report_request_id_list
30
+ # @option opts [Array<String>, String] :report_type_list
31
+ # @option opts [Array<String>, String] :report_processing_status_list
32
+ # @option opts [Integer] :max_count
33
+ # @option opts [String, #iso8601] :requested_from_date
34
+ # @option opts [String, #iso8601] :requested_to_date
35
+ # @return [Peddler::XMLParser]
36
+ def get_report_request_list(opts = {})
37
+ operation('GetReportRequestList')
38
+ .add(opts)
39
+ .structure!('ReportRequestIdList', 'Id')
40
+ .structure!('ReportTypeList', 'Type')
41
+ .structure!('ReportProcessingStatusList', 'Status')
42
+
43
+ run
44
+ end
45
+
46
+ # Lists the next page of the report requests
47
+ #
48
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestListByNextToken.html
49
+ # @param next_token [String]
50
+ # @return [Peddler::XMLParser]
51
+ def get_report_request_list_by_next_token(next_token)
52
+ operation('GetReportRequestListByNextToken')
53
+ .add('NextToken' => next_token)
54
+
55
+ run
56
+ end
57
+
58
+ # Counts requested reports
59
+ #
60
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestCount.html
61
+ # @param opts [Hash]
62
+ # @option opts [Array<String>, String] :report_type_list
63
+ # @option opts [Array<String>, String] :report_processing_status_list
64
+ # @option opts [String, #iso8601] :requested_from_date
65
+ # @option opts [String, #iso8601] :requested_to_date
66
+ # @return [Peddler::XMLParser]
67
+ def get_report_request_count(opts = {})
68
+ operation('GetReportRequestCount')
69
+ .add(opts)
70
+ .structure!('ReportTypeList', 'Type')
71
+ .structure!('ReportProcessingStatusList', 'Status')
72
+
73
+ run
74
+ end
75
+
76
+ # Cancels one or more report requests
77
+ #
78
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_CancelReportRequests.html
79
+ # @param opts [Hash]
80
+ # @option opts [Array<String>, String] :report_type_list
81
+ # @option opts [Array<String>, String] :report_processing_status_list
82
+ # @option opts [String, #iso8601] :requested_from_date
83
+ # @option opts [String, #iso8601] :requested_to_date
84
+ # @return [Peddler::XMLParser]
85
+ def cancel_report_requests(opts = {})
86
+ operation('CancelReportRequests')
87
+ .add(opts)
88
+ .structure!('ReportTypeList', 'Type')
89
+ .structure!('ReportProcessingStatusList', 'Status')
90
+
91
+ run
92
+ end
93
+
94
+ # Lists reports
95
+ #
96
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportList.html
97
+ # @param opts [Hash]
98
+ # @option opts [Integer] :max_count
99
+ # @option opts [Array<String>, String] :report_type_list
100
+ # @option opts [Boolean] :acknowledged
101
+ # @option opts [String, #iso8601] :available_from_date
102
+ # @option opts [String, #iso8601] :available_to_date
103
+ # @option opts [Array<String>, String] :report_request_id_list
104
+ # @return [Peddler::XMLParser]
105
+ def get_report_list(opts = {})
106
+ operation('GetReportList')
107
+ .add(opts)
108
+ .structure!('ReportTypeList', 'Type')
109
+ .structure!('ReportRequestIdList', 'Id')
110
+
111
+ run
112
+ end
113
+
114
+ # Lists the next page of reports
115
+ #
116
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportListByNextToken.html
117
+ # @param next_token [String]
118
+ # @return [Peddler::XMLParser]
119
+ def get_report_list_by_next_token(next_token)
120
+ operation('GetReportListByNextToken')
121
+ .add('NextToken' => next_token)
122
+
123
+ run
124
+ end
125
+
126
+ # Counts reports
127
+ #
128
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportCount.html
129
+ # @param opts [Hash]
130
+ # @option opts [Array<String>, String] :report_type_list
131
+ # @option opts [Boolean] :acknowledged
132
+ # @option opts [String, #iso8601] :available_from_date
133
+ # @option opts [String, #iso8601] :available_to_date
134
+ # @return [Peddler::XMLParser]
135
+ def get_report_count(opts = {})
136
+ operation('GetReportCount')
137
+ .add(opts)
138
+ .structure!('ReportTypeList', 'Type')
139
+
140
+ run
141
+ end
142
+
143
+ # Gets a report and its Content-MD5 header
144
+ #
145
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReport.html
146
+ # @param report_id [String]
147
+ # @return [Peddler::XMLParser] if report is in XML format
148
+ # @return [Peddler::CSVParser] if report is a flat file
149
+ def get_report(report_id, &blk)
150
+ operation('GetReport')
151
+ .add('ReportId' => report_id)
152
+
153
+ run(&blk)
154
+ end
155
+
156
+ # Creates, updates, or deletes a report request schedule
157
+ #
158
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_ManageReportSchedule.html
159
+ # @param report_type [String]
160
+ # @param schedule [String]
161
+ # @param opts [Hash]
162
+ # @option opts [String, #iso8601] :schedule_date
163
+ # @return [Peddler::XMLParser]
164
+ def manage_report_schedule(report_type, schedule, opts = {})
165
+ operation('ManageReportSchedule')
166
+ .add(opts.merge('ReportType' => report_type, 'Schedule' => schedule))
167
+
168
+ run
169
+ end
170
+
171
+ # List scheduled reports
172
+ #
173
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleList.html
174
+ # @param report_type_list [*Array<String>]
175
+ # @return [Peddler::XMLParser]
176
+ def get_report_schedule_list(*report_type_list)
177
+ operation('GetReportScheduleList')
178
+ .add('ReportTypeList' => report_type_list)
179
+ .structure!('ReportTypeList', 'Type')
180
+
181
+ run
182
+ end
183
+
184
+ # List next page of scheduled reports
185
+ #
186
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleListByNextToken.html
187
+ # @raise [NotImplementedError]
188
+ def get_report_schedule_list_by_next_token(*)
189
+ fail NotImplementedError
190
+ end
191
+
192
+ # Count scheduled reports
193
+ #
194
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleCount.html
195
+ # @param report_type_list [Array<String>]
196
+ # @return [Peddler::XMLParser]
197
+ def get_report_schedule_count(*report_type_list)
198
+ operation('GetReportScheduleCount')
199
+ .add('ReportTypeList' => report_type_list)
200
+ .structure!('ReportTypeList', 'Type')
201
+
202
+ run
203
+ end
204
+
205
+ # Update acknowledged status of one or more reports
206
+ #
207
+ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_UpdateReportAcknowledgements.html
208
+ # @param acknowledged [Boolean]
209
+ # @param report_id_list [Array<String>]
210
+ # @return [Peddler::XMLParser]
211
+ def update_report_acknowledgements(acknowledged, *report_id_list)
212
+ operation('UpdateReportAcknowledgement')
213
+ .add('ReportIdList' => report_id_list, 'Acknowledged' => acknowledged)
214
+ .structure!('ReportIdList', 'Id')
215
+
216
+ run
217
+ end
218
+ end
219
+ end
220
+ end
data/lib/mws/reports.rb CHANGED
@@ -1,220 +1 @@
1
- require 'peddler/client'
2
-
3
- module MWS
4
- # The Reports API lets you request reports about your inventory and orders.
5
- class Reports < ::Peddler::Client
6
- # Creates a report request
7
- #
8
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_RequestReport.html
9
- # @param report_type [String]
10
- # @param opts [Hash]
11
- # @option opts [String, #iso8601] :start_date
12
- # @option opts [String, #iso8601] :end_date
13
- # @option opts [String] :report_options
14
- # @option opts [Array<String>, String] :marketplace_id
15
- # @return [Peddler::XMLParser]
16
- def request_report(report_type, opts = {})
17
- operation('RequestReport')
18
- .add(opts.merge('ReportType' => report_type))
19
- .structure!('MarketplaceIdList', 'Id')
20
-
21
- run
22
- end
23
-
24
- # Lists report requests
25
- #
26
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestList.html
27
- # @param opts [Hash]
28
- # @option opts [Array<String>, String] :report_request_id_list
29
- # @option opts [Array<String>, String] :report_type_list
30
- # @option opts [Array<String>, String] :report_processing_status_list
31
- # @option opts [Integer] :max_count
32
- # @option opts [String, #iso8601] :requested_from_date
33
- # @option opts [String, #iso8601] :requested_to_date
34
- # @return [Peddler::XMLParser]
35
- def get_report_request_list(opts = {})
36
- operation('GetReportRequestList')
37
- .add(opts)
38
- .structure!('ReportRequestIdList', 'Id')
39
- .structure!('ReportTypeList', 'Type')
40
- .structure!('ReportProcessingStatusList', 'Status')
41
-
42
- run
43
- end
44
-
45
- # Lists the next page of the report requests
46
- #
47
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestListByNextToken.html
48
- # @param next_token [String]
49
- # @return [Peddler::XMLParser]
50
- def get_report_request_list_by_next_token(next_token)
51
- operation('GetReportRequestListByNextToken')
52
- .add('NextToken' => next_token)
53
-
54
- run
55
- end
56
-
57
- # Counts requested reports
58
- #
59
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestCount.html
60
- # @param opts [Hash]
61
- # @option opts [Array<String>, String] :report_type_list
62
- # @option opts [Array<String>, String] :report_processing_status_list
63
- # @option opts [String, #iso8601] :requested_from_date
64
- # @option opts [String, #iso8601] :requested_to_date
65
- # @return [Peddler::XMLParser]
66
- def get_report_request_count(opts = {})
67
- operation('GetReportRequestCount')
68
- .add(opts)
69
- .structure!('ReportTypeList', 'Type')
70
- .structure!('ReportProcessingStatusList', 'Status')
71
-
72
- run
73
- end
74
-
75
- # Cancels one or more report requests
76
- #
77
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_CancelReportRequests.html
78
- # @param opts [Hash]
79
- # @option opts [Array<String>, String] :report_type_list
80
- # @option opts [Array<String>, String] :report_processing_status_list
81
- # @option opts [String, #iso8601] :requested_from_date
82
- # @option opts [String, #iso8601] :requested_to_date
83
- # @return [Peddler::XMLParser]
84
- def cancel_report_requests(opts = {})
85
- operation('CancelReportRequests')
86
- .add(opts)
87
- .structure!('ReportTypeList', 'Type')
88
- .structure!('ReportProcessingStatusList', 'Status')
89
-
90
- run
91
- end
92
-
93
- # Lists reports
94
- #
95
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportList.html
96
- # @param opts [Hash]
97
- # @option opts [Integer] :max_count
98
- # @option opts [Array<String>, String] :report_type_list
99
- # @option opts [Boolean] :acknowledged
100
- # @option opts [String, #iso8601] :available_from_date
101
- # @option opts [String, #iso8601] :available_to_date
102
- # @option opts [Array<String>, String] :report_request_id_list
103
- # @return [Peddler::XMLParser]
104
- def get_report_list(opts = {})
105
- operation('GetReportList')
106
- .add(opts)
107
- .structure!('ReportTypeList', 'Type')
108
- .structure!('ReportRequestIdList', 'Id')
109
-
110
- run
111
- end
112
-
113
- # Lists the next page of reports
114
- #
115
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportListByNextToken.html
116
- # @param next_token [String]
117
- # @return [Peddler::XMLParser]
118
- def get_report_list_by_next_token(next_token)
119
- operation('GetReportListByNextToken')
120
- .add('NextToken' => next_token)
121
-
122
- run
123
- end
124
-
125
- # Counts reports
126
- #
127
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportCount.html
128
- # @param opts [Hash]
129
- # @option opts [Array<String>, String] :report_type_list
130
- # @option opts [Boolean] :acknowledged
131
- # @option opts [String, #iso8601] :available_from_date
132
- # @option opts [String, #iso8601] :available_to_date
133
- # @return [Peddler::XMLParser]
134
- def get_report_count(opts = {})
135
- operation('GetReportCount')
136
- .add(opts)
137
- .structure!('ReportTypeList', 'Type')
138
-
139
- run
140
- end
141
-
142
- # Gets a report and its Content-MD5 header
143
- #
144
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReport.html
145
- # @param report_id [String]
146
- # @return [Peddler::XMLParser] if report is in XML format
147
- # @return [Peddler::CSVParser] if report is a flat file
148
- def get_report(report_id, &blk)
149
- operation('GetReport')
150
- .add('ReportId' => report_id)
151
-
152
- run(&blk)
153
- end
154
-
155
-
156
- # Creates, updates, or deletes a report request schedule
157
- #
158
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_ManageReportSchedule.html
159
- # @param report_type [String]
160
- # @param schedule [String]
161
- # @param opts [Hash]
162
- # @option opts [String, #iso8601] :schedule_date
163
- # @return [Peddler::XMLParser]
164
- def manage_report_schedule(report_type, schedule, opts = {})
165
- operation('ManageReportSchedule')
166
- .add(opts.merge('ReportType' => report_type, 'Schedule' => schedule))
167
-
168
- run
169
- end
170
-
171
- # List scheduled reports
172
- #
173
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleList.html
174
- # @param report_type_list [*Array<String>]
175
- # @return [Peddler::XMLParser]
176
- def get_report_schedule_list(*report_type_list)
177
- operation('GetReportScheduleList')
178
- .add('ReportTypeList' => report_type_list)
179
- .structure!('ReportTypeList', 'Type')
180
-
181
- run
182
- end
183
-
184
- # List next page of scheduled reports
185
- #
186
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleListByNextToken.html
187
- # @param next_token [String]
188
- # @raise [NotImplementedError]
189
- def get_report_schedule_list_by_next_token(next_token)
190
- raise NotImplementedError
191
- end
192
-
193
- # Count scheduled reports
194
- #
195
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleCount.html
196
- # @param report_type_list [Array<String>]
197
- # @return [Peddler::XMLParser]
198
- def get_report_schedule_count(*report_type_list)
199
- operation('GetReportScheduleCount')
200
- .add('ReportTypeList' => report_type_list)
201
- .structure!('ReportTypeList', 'Type')
202
-
203
- run
204
- end
205
-
206
- # Update acknowledged status of one or more reports
207
- #
208
- # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_UpdateReportAcknowledgements.html
209
- # @param acknowledged [Boolean]
210
- # @param report_id_list [Array<String>]
211
- # @return [Peddler::XMLParser]
212
- def update_report_acknowledgements(acknowledged, *report_id_list)
213
- operation('UpdateReportAcknowledgement')
214
- .add('ReportIdList' => report_id_list, 'Acknowledged' => acknowledged)
215
- .structure!('ReportIdList', 'Id')
216
-
217
- run
218
- end
219
- end
220
- end
1
+ require 'mws/reports/client'
@@ -0,0 +1,42 @@
1
+ require 'peddler/client'
2
+
3
+ module MWS
4
+ module Sellers
5
+ # The Sellers API lets sellers retrieve information about their seller
6
+ # account, such as the marketplaces they participate in.
7
+ class Client < ::Peddler::Client
8
+ path '/Sellers/2011-07-01'
9
+
10
+ # Lists the marketplaces the seller participates in
11
+ #
12
+ # @see http://docs.developer.amazonservices.com/en_US/sellers/Sellers_ListMarketplaceParticipations.html
13
+ # @param next_token [String]
14
+ # @return [Peddler::XMLParser]
15
+ def list_marketplace_participations
16
+ operation('ListMarketplaceParticipations')
17
+ run
18
+ end
19
+
20
+ # Lists the next page of marketplaces the seller participates in
21
+ #
22
+ # @see http://docs.developer.amazonservices.com/en_US/sellers/Sellers_ListMarketplaceParticipationsByNextToken.html
23
+ # @param next_token [String]
24
+ # @return [Peddler::XMLParser]
25
+ def list_marketplace_participations_by_next_token(next_token)
26
+ operation('ListMarketplaceParticipationsByNextToken')
27
+ .add('NextToken' => next_token)
28
+
29
+ run
30
+ end
31
+
32
+ # Gets the service status of the API
33
+ #
34
+ # @see http://docs.developer.amazonservices.com/en_US/sellers/MWS_GetServiceStatus.html
35
+ # @return [Peddler::XMLParser]
36
+ def get_service_status
37
+ operation('GetServiceStatus')
38
+ run
39
+ end
40
+ end
41
+ end
42
+ end
data/lib/mws/sellers.rb CHANGED
@@ -1,40 +1 @@
1
- require 'peddler/client'
2
-
3
- module MWS
4
- # The Sellers API lets sellers retrieve information about their seller
5
- # account, such as the marketplaces they participate in.
6
- class Sellers < ::Peddler::Client
7
- path '/Sellers/2011-07-01'
8
-
9
- # Lists the marketplaces the seller participates in
10
- #
11
- # @see http://docs.developer.amazonservices.com/en_US/sellers/Sellers_ListMarketplaceParticipations.html
12
- # @param next_token [String]
13
- # @return [Peddler::XMLParser]
14
- def list_marketplace_participations
15
- operation('ListMarketplaceParticipations')
16
- run
17
- end
18
-
19
- # Lists the next page of marketplaces the seller participates in
20
- #
21
- # @see http://docs.developer.amazonservices.com/en_US/sellers/Sellers_ListMarketplaceParticipationsByNextToken.html
22
- # @param next_token [String]
23
- # @return [Peddler::XMLParser]
24
- def list_marketplace_participations_by_next_token(next_token)
25
- operation('ListMarketplaceParticipationsByNextToken')
26
- .add('NextToken' => next_token)
27
-
28
- run
29
- end
30
-
31
- # Gets the service status of the API
32
- #
33
- # @see http://docs.developer.amazonservices.com/en_US/sellers/MWS_GetServiceStatus.html
34
- # @return [Peddler::XMLParser]
35
- def get_service_status
36
- operation('GetServiceStatus')
37
- run
38
- end
39
- end
40
- end
1
+ require 'mws/sellers/client'