Class: MWS::Reports::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Reports::Client
- Defined in:
- lib/mws/reports/client.rb
Overview
The Reports API lets you request reports about your inventory and orders.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#cancel_report_requests(opts = {}) ⇒ Peddler::XMLParser
Cancels one or more report requests.
-
#get_report(report_id, &blk) ⇒ Peddler::XMLParser, Peddler::FlatFileParser
Gets a report and its Content-MD5 header.
-
#get_report_count(opts = {}) ⇒ Peddler::XMLParser
Counts reports.
-
#get_report_list(opts = {}) ⇒ Peddler::XMLParser
Lists reports.
-
#get_report_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of reports.
-
#get_report_request_count(opts = {}) ⇒ Peddler::XMLParser
Counts requested reports.
-
#get_report_request_list(opts = {}) ⇒ Peddler::XMLParser
Lists report requests.
-
#get_report_request_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of the report requests.
-
#get_report_schedule_count(*report_types) ⇒ Peddler::XMLParser
Counts scheduled reports.
-
#get_report_schedule_list(*report_type_list) ⇒ Peddler::XMLParser
Lists scheduled reports.
-
#get_report_schedule_list_by_next_token ⇒ Object
Lists next page of scheduled reports.
-
#manage_report_schedule(report_type, schedule, opts = {}) ⇒ Peddler::XMLParser
Creates, updates, or deletes a report request schedule.
-
#request_report(report_type, opts = {}) ⇒ Peddler::XMLParser
Creates a report request.
-
#update_report_acknowledgements(acknowledged, *report_ids) ⇒ Peddler::XMLParser
Updates acknowledged status of one or more reports.
Methods inherited from Peddler::Client
#aws_endpoint, #defaults, #error_handler, #headers, #initialize, #marketplace, #marketplace_id, #marketplace_id=, on_error, #on_error, #operation, path, #run, version
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#cancel_report_requests(opts = {}) ⇒ Peddler::XMLParser
Cancels one or more report requests
89 90 91 92 93 94 95 96 |
# File 'lib/mws/reports/client.rb', line 89 def cancel_report_requests(opts = {}) operation('CancelReportRequests') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') run end |
#get_report(report_id, &blk) ⇒ Peddler::XMLParser, Peddler::FlatFileParser
Gets a report and its Content-MD5 header
153 154 155 156 157 158 |
# File 'lib/mws/reports/client.rb', line 153 def get_report(report_id, &blk) operation('GetReport') .add('ReportId' => report_id) run(&blk) end |
#get_report_count(opts = {}) ⇒ Peddler::XMLParser
Counts reports
139 140 141 142 143 144 145 |
# File 'lib/mws/reports/client.rb', line 139 def get_report_count(opts = {}) operation('GetReportCount') .add(opts) .structure!('ReportTypeList', 'Type') run end |
#get_report_list(opts = {}) ⇒ Peddler::XMLParser
Lists reports
109 110 111 112 113 114 115 116 |
# File 'lib/mws/reports/client.rb', line 109 def get_report_list(opts = {}) operation('GetReportList') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportRequestIdList', 'Id') run end |
#get_report_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of reports
123 124 125 126 127 128 |
# File 'lib/mws/reports/client.rb', line 123 def get_report_list_by_next_token(next_token) operation('GetReportListByNextToken') .add('NextToken' => next_token) run end |
#get_report_request_count(opts = {}) ⇒ Peddler::XMLParser
Counts requested reports
71 72 73 74 75 76 77 78 |
# File 'lib/mws/reports/client.rb', line 71 def get_report_request_count(opts = {}) operation('GetReportRequestCount') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') run end |
#get_report_request_list(opts = {}) ⇒ Peddler::XMLParser
Lists report requests
40 41 42 43 44 45 46 47 48 |
# File 'lib/mws/reports/client.rb', line 40 def get_report_request_list(opts = {}) operation('GetReportRequestList') .add(opts) .structure!('ReportRequestIdList', 'Id') .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') run end |
#get_report_request_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of the report requests
55 56 57 58 59 60 |
# File 'lib/mws/reports/client.rb', line 55 def get_report_request_list_by_next_token(next_token) operation('GetReportRequestListByNextToken') .add('NextToken' => next_token) run end |
#get_report_schedule_count(*report_types) ⇒ Peddler::XMLParser
Counts scheduled reports
202 203 204 205 206 207 208 |
# File 'lib/mws/reports/client.rb', line 202 def get_report_schedule_count(*report_type_list) operation('GetReportScheduleCount') .add('ReportTypeList' => report_type_list) .structure!('ReportTypeList', 'Type') run end |
#get_report_schedule_list(*report_type_list) ⇒ Peddler::XMLParser
Lists scheduled reports
180 181 182 183 184 185 186 |
# File 'lib/mws/reports/client.rb', line 180 def get_report_schedule_list(*report_type_list) operation('GetReportScheduleList') .add('ReportTypeList' => report_type_list) .structure!('ReportTypeList', 'Type') run end |
#get_report_schedule_list_by_next_token ⇒ Object
Lists next page of scheduled reports
192 193 194 |
# File 'lib/mws/reports/client.rb', line 192 def get_report_schedule_list_by_next_token(*) raise NotImplementedError end |
#manage_report_schedule(report_type, schedule, opts = {}) ⇒ Peddler::XMLParser
Creates, updates, or deletes a report request schedule
168 169 170 171 172 173 |
# File 'lib/mws/reports/client.rb', line 168 def manage_report_schedule(report_type, schedule, opts = {}) operation('ManageReportSchedule') .add(opts.update('ReportType' => report_type, 'Schedule' => schedule)) run end |
#request_report(report_type, opts = {}) ⇒ Peddler::XMLParser
Creates a report request
21 22 23 24 25 26 27 |
# File 'lib/mws/reports/client.rb', line 21 def request_report(report_type, opts = {}) operation('RequestReport') .add(opts.update('ReportType' => report_type)) .structure!('MarketplaceIdList', 'Id') run end |
#update_report_acknowledgements(acknowledged, *report_ids) ⇒ Peddler::XMLParser
Updates acknowledged status of one or more reports
217 218 219 220 221 222 223 |
# File 'lib/mws/reports/client.rb', line 217 def update_report_acknowledgements(acknowledged, *report_id_list) operation('UpdateReportAcknowledgements') .add('ReportIdList' => report_id_list, 'Acknowledged' => acknowledged) .structure!('ReportIdList', 'Id') run end |