Module: Peddler::Headers
- Included in:
- FlatFileParser, XMLParser
- Defined in:
- lib/peddler/headers.rb
Overview
Parses MWS-specific headers
Defined Under Namespace
Classes: Quota
Instance Method Summary collapse
Instance Method Details
#quota ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/peddler/headers.rb', line 6 def quota Quota.new( headers['x-mws-quota-max'].to_i, headers['x-mws-quota-remaining'].to_i, Time.parse(headers['x-mws-quota-resetsOn']) ) end |
#request_id ⇒ Object
14 15 16 |
# File 'lib/peddler/headers.rb', line 14 def request_id headers['x-mws-request-id'] end |
#response_context ⇒ Object
22 23 24 |
# File 'lib/peddler/headers.rb', line 22 def response_context headers['x-mws-response-context'] end |
#timestamp ⇒ Object
18 19 20 |
# File 'lib/peddler/headers.rb', line 18 def Time.parse(headers['x-mws-timestamp']) end |