Class: Increase::Resources::Events
- Inherits:
-
Object
- Object
- Increase::Resources::Events
- Defined in:
- lib/increase/resources/events.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Events
constructor
A new instance of Events.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Event>
List Events.
-
#retrieve(event_id, opts = {}) ⇒ Increase::Models::Event
Retrieve an Event.
Constructor Details
#initialize(client:) ⇒ Events
Returns a new instance of Events.
6 7 8 |
# File 'lib/increase/resources/events.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Event>
List Events
37 38 39 40 41 42 43 44 45 |
# File 'lib/increase/resources/events.rb', line 37 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/events" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::Event @client.request(req, opts) end |
#retrieve(event_id, opts = {}) ⇒ Increase::Models::Event
Retrieve an Event
16 17 18 19 20 21 22 |
# File 'lib/increase/resources/events.rb', line 16 def retrieve(event_id, opts = {}) req = {} req[:method] = :get req[:path] = "/events/#{event_id}" req[:model] = Increase::Models::Event @client.request(req, opts) end |