Class: EasyPost::Services::Event
- Defined in:
- lib/easypost/services/event.rb
Constant Summary collapse
Instance Method Summary collapse
-
#all(params = {}) ⇒ Object
Retrieve all Event objects.
-
#get_next_page(collection, page_size = nil) ⇒ Object
Get the next page of events.
-
#retrieve(id) ⇒ Object
Retrieve an Event object.
-
#retrieve_all_payloads(event_id) ⇒ Object
Retrieve all payloads for an event.
-
#retrieve_payload(event_id, payload_id) ⇒ Object
Retrieve a specific payload for an event.
Methods inherited from Service
Constructor Details
This class inherits a constructor from EasyPost::Services::Service
Instance Method Details
#all(params = {}) ⇒ Object
Retrieve all Event objects
14 15 16 |
# File 'lib/easypost/services/event.rb', line 14 def all(params = {}) @client.make_request(:get, 'events', MODEL_CLASS, params) end |
#get_next_page(collection, page_size = nil) ⇒ Object
Get the next page of events.
29 30 31 |
# File 'lib/easypost/services/event.rb', line 29 def get_next_page(collection, page_size = nil) get_next_page_helper(collection, collection.events, 'events', MODEL_CLASS, page_size) end |
#retrieve(id) ⇒ Object
Retrieve an Event object
9 10 11 |
# File 'lib/easypost/services/event.rb', line 9 def retrieve(id) @client.make_request(:get, "events/#{id}", MODEL_CLASS) end |