Class: MWS::Reports
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Reports
- Defined in:
- lib/mws/reports.rb
Overview
The Reports API lets you request reports about your inventory and orders.
Constant Summary
Constants inherited from Peddler::Client
Peddler::Client::BadMarketplaceId, Peddler::Client::HOSTS
Instance Attribute Summary
Attributes inherited from Peddler::Client
#body, #marketplace_id, #merchant_id
Instance Method Summary collapse
-
#cancel_report_requests(opts = {}) ⇒ Peddler::Parser
Cancels one or more report requests.
-
#get_report(report_id, &blk) ⇒ Peddler::Parser
Gets a report and its Content-MD5 header.
-
#get_report_count(opts = {}) ⇒ Peddler::Parser
Counts reports.
-
#get_report_list(opts = {}) ⇒ Peddler::Parser
Lists reports.
-
#get_report_list_by_next_token(next_token) ⇒ Peddler::Parser
Lists the next page of reports.
-
#get_report_request_count(opts = {}) ⇒ Peddler::Parser
Counts requested reports.
-
#get_report_request_list(opts = {}) ⇒ Peddler::Parser
Lists report requests.
-
#get_report_request_list_by_next_token(next_token) ⇒ Peddler::Parser
Lists the next page of the report requests.
-
#get_report_schedule_count(*report_type_list) ⇒ Peddler::Parser
Count scheduled reports.
-
#get_report_schedule_list(*report_type_list) ⇒ Peddler::Parser
List scheduled reports.
-
#get_report_schedule_list_by_next_token(token = next_token) ⇒ Object
List next page of scheduled reports.
-
#manage_report_schedule(report_type, schedule, opts = {}) ⇒ Peddler::Parser
Creates, updates, or deletes a report request schedule.
-
#request_report(report_type, opts = {}) ⇒ Peddler::Parser
Creates a report request.
-
#update_report_acknowledgements(acknowledged, *report_id_list) ⇒ Peddler::Parser
Update acknowledged status of one or more reports.
Methods inherited from Peddler::Client
#aws_endpoint, #headers, inherited, #operation, path, #run
Instance Method Details
#cancel_report_requests(opts = {}) ⇒ Peddler::Parser
Cancels one or more report requests
85 86 87 88 89 90 91 92 |
# File 'lib/mws/reports.rb', line 85 def cancel_report_requests(opts = {}) operation('CancelReportRequests') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') run end |
#get_report(report_id, &blk) ⇒ Peddler::Parser
Gets a report and its Content-MD5 header
149 150 151 152 153 154 |
# File 'lib/mws/reports.rb', line 149 def get_report(report_id, &blk) operation('GetReport') .add('ReportId' => report_id) run(&blk) end |
#get_report_count(opts = {}) ⇒ Peddler::Parser
Counts reports
136 137 138 139 140 141 142 |
# File 'lib/mws/reports.rb', line 136 def get_report_count(opts = {}) operation('GetReportCount') .add(opts) .structure!('ReportTypeList', 'Type') run end |
#get_report_list(opts = {}) ⇒ Peddler::Parser
Lists reports
105 106 107 108 109 110 111 112 |
# File 'lib/mws/reports.rb', line 105 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::Parser
Lists the next page of reports
120 121 122 123 124 125 |
# File 'lib/mws/reports.rb', line 120 def get_report_list_by_next_token(next_token) operation('GetReportListByNextToken') .add('NextToken' => next_token) run end |
#get_report_request_count(opts = {}) ⇒ Peddler::Parser
Counts requested reports
67 68 69 70 71 72 73 74 |
# File 'lib/mws/reports.rb', line 67 def get_report_request_count(opts = {}) operation('GetReportRequestCount') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') run end |
#get_report_request_list(opts = {}) ⇒ Peddler::Parser
Lists report requests
35 36 37 38 39 40 41 42 43 |
# File 'lib/mws/reports.rb', line 35 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::Parser
Lists the next page of the report requests
51 52 53 54 55 56 |
# File 'lib/mws/reports.rb', line 51 def get_report_request_list_by_next_token(next_token) operation('GetReportRequestListByNextToken') .add('NextToken' => next_token) run end |
#get_report_schedule_count(*report_type_list) ⇒ Peddler::Parser
Count scheduled reports
199 200 201 202 203 204 205 |
# File 'lib/mws/reports.rb', line 199 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::Parser
List scheduled reports
177 178 179 180 181 182 183 |
# File 'lib/mws/reports.rb', line 177 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(token = next_token) ⇒ Object
List next page of scheduled reports
190 191 192 |
# File 'lib/mws/reports.rb', line 190 def get_report_schedule_list_by_next_token(token = next_token) raise NotImplementedError end |
#manage_report_schedule(report_type, schedule, opts = {}) ⇒ Peddler::Parser
Creates, updates, or deletes a report request schedule
165 166 167 168 169 170 |
# File 'lib/mws/reports.rb', line 165 def manage_report_schedule(report_type, schedule, opts = {}) operation('ManageReportSchedule') .add(opts.merge('ReportType' => report_type, 'Schedule' => schedule)) run end |
#request_report(report_type, opts = {}) ⇒ Peddler::Parser
Creates a report request
16 17 18 19 20 21 22 |
# File 'lib/mws/reports.rb', line 16 def request_report(report_type, opts = {}) operation('RequestReport') .add(opts.merge('ReportType' => report_type)) .structure!('MarketplaceIdList', 'Id') run end |
#update_report_acknowledgements(acknowledged, *report_id_list) ⇒ Peddler::Parser
Update acknowledged status of one or more reports
213 214 215 216 217 218 219 |
# File 'lib/mws/reports.rb', line 213 def update_report_acknowledgements(acknowledged, *report_id_list) operation('UpdateReportAcknowledgement') .add('ReportIdList' => report_id_list, 'Acknowledged' => acknowledged) .structure!('ReportIdList', 'Id') run end |