lib/mws/reports.rb in peddler-0.7.0 vs lib/mws/reports.rb in peddler-0.7.1

- old
+ new

@@ -10,11 +10,11 @@ # @param opts [Hash] # @option opts [String, #iso8601] :start_date # @option opts [String, #iso8601] :end_date # @option opts [String] :report_options # @option opts [Array<String>, String] :marketplace_id - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def request_report(report_type, opts = {}) operation('RequestReport') .add(opts.merge('ReportType' => report_type)) .structure!('MarketplaceIdList', 'Id') @@ -29,11 +29,11 @@ # @option opts [Array<String>, String] :report_type_list # @option opts [Array<String>, String] :report_processing_status_list # @option opts [Integer] :max_count # @option opts [String, #iso8601] :requested_from_date # @option opts [String, #iso8601] :requested_to_date - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_request_list(opts = {}) operation('GetReportRequestList') .add(opts) .structure!('ReportRequestIdList', 'Id') .structure!('ReportTypeList', 'Type') @@ -44,12 +44,11 @@ # Lists the next page of the report requests # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportRequestListByNextToken.html # @param next_token [String] - # @return [Peddler::Parser] - # @return false if there are no more pages + # @return [Peddler::XMLParser] def get_report_request_list_by_next_token(next_token) operation('GetReportRequestListByNextToken') .add('NextToken' => next_token) run @@ -61,11 +60,11 @@ # @param opts [Hash] # @option opts [Array<String>, String] :report_type_list # @option opts [Array<String>, String] :report_processing_status_list # @option opts [String, #iso8601] :requested_from_date # @option opts [String, #iso8601] :requested_to_date - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_request_count(opts = {}) operation('GetReportRequestCount') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') @@ -79,11 +78,11 @@ # @param opts [Hash] # @option opts [Array<String>, String] :report_type_list # @option opts [Array<String>, String] :report_processing_status_list # @option opts [String, #iso8601] :requested_from_date # @option opts [String, #iso8601] :requested_to_date - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def cancel_report_requests(opts = {}) operation('CancelReportRequests') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportProcessingStatusList', 'Status') @@ -99,11 +98,11 @@ # @option opts [Array<String>, String] :report_type_list # @option opts [Boolean] :acknowledged # @option opts [String, #iso8601] :available_from_date # @option opts [String, #iso8601] :available_to_date # @option opts [Array<String>, String] :report_request_id_list - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_list(opts = {}) operation('GetReportList') .add(opts) .structure!('ReportTypeList', 'Type') .structure!('ReportRequestIdList', 'Id') @@ -113,12 +112,11 @@ # Lists the next page of reports # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportListByNextToken.html # @param next_token [String] - # @return [Peddler::Parser] - # @return false if there are no more pages + # @return [Peddler::XMLParser] def get_report_list_by_next_token(next_token) operation('GetReportListByNextToken') .add('NextToken' => next_token) run @@ -130,11 +128,11 @@ # @param opts [Hash] # @option opts [Array<String>, String] :report_type_list # @option opts [Boolean] :acknowledged # @option opts [String, #iso8601] :available_from_date # @option opts [String, #iso8601] :available_to_date - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_count(opts = {}) operation('GetReportCount') .add(opts) .structure!('ReportTypeList', 'Type') @@ -143,11 +141,12 @@ # Gets a report and its Content-MD5 header # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReport.html # @param report_id [String] - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] if report is in XML format + # @return [Peddler::CSVParser] if report is a flat file def get_report(report_id, &blk) operation('GetReport') .add('ReportId' => report_id) run(&blk) @@ -159,11 +158,11 @@ # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_ManageReportSchedule.html # @param report_type [String] # @param schedule [String] # @param opts [Hash] # @option opts [String, #iso8601] :schedule_date - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def manage_report_schedule(report_type, schedule, opts = {}) operation('ManageReportSchedule') .add(opts.merge('ReportType' => report_type, 'Schedule' => schedule)) run @@ -171,11 +170,11 @@ # List scheduled reports # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleList.html # @param report_type_list [*Array<String>] - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_schedule_list(*report_type_list) operation('GetReportScheduleList') .add('ReportTypeList' => report_type_list) .structure!('ReportTypeList', 'Type') @@ -185,19 +184,19 @@ # List next page of scheduled reports # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleListByNextToken.html # @param next_token [String] # @raise [NotImplementedError] - def get_report_schedule_list_by_next_token(token = next_token) + def get_report_schedule_list_by_next_token(next_token) raise NotImplementedError end # Count scheduled reports # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_GetReportScheduleCount.html # @param report_type_list [Array<String>] - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def get_report_schedule_count(*report_type_list) operation('GetReportScheduleCount') .add('ReportTypeList' => report_type_list) .structure!('ReportTypeList', 'Type') @@ -207,10 +206,10 @@ # Update acknowledged status of one or more reports # # @see http://docs.developer.amazonservices.com/en_US/reports/Reports_UpdateReportAcknowledgements.html # @param acknowledged [Boolean] # @param report_id_list [Array<String>] - # @return [Peddler::Parser] + # @return [Peddler::XMLParser] def update_report_acknowledgements(acknowledged, *report_id_list) operation('UpdateReportAcknowledgement') .add('ReportIdList' => report_id_list, 'Acknowledged' => acknowledged) .structure!('ReportIdList', 'Id')