Class: Mws::Apis::Feeds::SubmissionInfo
- Inherits:
-
Object
- Object
- Mws::Apis::Feeds::SubmissionInfo
- Defined in:
- lib/mws/apis/feeds/submission_info.rb
Constant Summary collapse
- Status =
Mws::Enum.for( done: '_DONE_', submitted: '_SUBMITTED_', in_progress: '_IN_PROGRESS_', cancelled: '_CANCELLED_' )
Instance Attribute Summary collapse
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#id ⇒ Object
Returns the value of attribute id.
-
#started ⇒ Object
Returns the value of attribute started.
-
#submitted ⇒ Object
Returns the value of attribute submitted.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(node) ⇒ SubmissionInfo
constructor
A new instance of SubmissionInfo.
Constructor Details
#initialize(node) ⇒ SubmissionInfo
Returns a new instance of SubmissionInfo.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 20 def initialize(node) @id = node.xpath('FeedSubmissionId').first.text.to_s @type = Feed::Type.for(node.xpath('FeedType').first.text) @status = Status.for(node.xpath('FeedProcessingStatus').first.text) @submitted = Time.parse(node.xpath('SubmittedDate').first.text.to_s) node.xpath('StartedProcessingDate').each do | node | @started = Time.parse(node.text.to_s) end node.xpath('CompletedProcessingDate').each do | node | @completed = Time.parse(node.text.to_s) end end |
Instance Attribute Details
#completed ⇒ Object
Returns the value of attribute completed.
16 17 18 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 16 def completed @completed end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 16 def id @id end |
#started ⇒ Object
Returns the value of attribute started.
16 17 18 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 16 def started @started end |
#submitted ⇒ Object
Returns the value of attribute submitted.
16 17 18 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 16 def submitted @submitted end |
Class Method Details
.from_xml(node) ⇒ Object
33 34 35 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 33 def self.from_xml(node) new node end |
Instance Method Details
#==(other) ⇒ Object
37 38 39 40 41 |
# File 'lib/mws/apis/feeds/submission_info.rb', line 37 def ==(other) return true if equal? other return false unless other.class == self.class id == other.id end |