Class: Peddler::Reports::UnshippedOrdersReport
- Inherits:
-
Feeds::Feed
- Object
- Feeds::Feed
- Peddler::Reports::UnshippedOrdersReport
- Defined in:
- lib/peddler/reports.rb
Overview
This is an unshipped orders report. It is very similar to the feed objects, so I’m just porting over the class.
Constant Summary collapse
- MAPPED_PARAMS =
{ "ReportID" => "id", "StartDate" => "starts_at", "EndDate" => "ends_at", "DownloadType" => "type", "Scheduled" => "scheduled", "ReportStatus" => "status", "SubmittedDate" => "submitted_at", "StartedProcessingDate" => "started_processing_at", "CompletedProcessingDate" => "completed_processing_at", "CompletedProcesssingDate" => "completed_processing_at"}
Instance Attribute Summary collapse
-
#ends_at ⇒ Object
Returns the value of attribute ends_at.
-
#scheduled ⇒ Object
Returns the value of attribute scheduled.
-
#starts_at ⇒ Object
Returns the value of attribute starts_at.
Attributes inherited from Feeds::Feed
#batch, #completed_processing_at, #download, #file_content, #id, #messages_processed, #messages_successful, #messages_with_errors, #messages_with_warnings, #started_processing_at, #status, #submitted_at, #type
Instance Method Summary collapse
-
#initialize(transport, params = {}) ⇒ UnshippedOrdersReport
constructor
Creates new unshipped order report.
Methods inherited from Feeds::Feed
Constructor Details
#initialize(transport, params = {}) ⇒ UnshippedOrdersReport
Creates new unshipped order report. It will send a request to Amazon to generate the report if the report ID is not already set.
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/peddler/reports.rb', line 28 def initialize(transport, params={}) super(transport) params.each_pair{ |key, value| self.send "#{key}=", value } @starts_at ||= (Date.today - 7).strftime("%Y-%m-%dT00:00:00-00:00") @ends_at ||= (Date.today + 1).strftime("%Y-%m-%dT00:00:00-00:00") #@type ||= "_GET_CONVERGED_FLAT_FILE_ACTIONABLE_ORDER_DATA_" @type ||= "_GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_" if @id.nil? generate_report end self end |
Instance Attribute Details
#ends_at ⇒ Object
Returns the value of attribute ends_at.
12 13 14 |
# File 'lib/peddler/reports.rb', line 12 def ends_at @ends_at end |
#scheduled ⇒ Object
Returns the value of attribute scheduled.
12 13 14 |
# File 'lib/peddler/reports.rb', line 12 def scheduled @scheduled end |
#starts_at ⇒ Object
Returns the value of attribute starts_at.
12 13 14 |
# File 'lib/peddler/reports.rb', line 12 def starts_at @starts_at end |