Class: RDStation::Events
- Inherits:
-
Object
- Object
- RDStation::Events
- Includes:
- HTTParty, RetryableRequest
- Defined in:
- lib/rdstation/events.rb
Constant Summary
Constants included from RetryableRequest
Instance Method Summary collapse
- #create(payload) ⇒ Object
-
#initialize(authorization:) ⇒ Events
constructor
A new instance of Events.
Methods included from RetryableRequest
#refresh_access_token, #retry_possible?, #retryable_request
Constructor Details
#initialize(authorization:) ⇒ Events
Returns a new instance of Events.
8 9 10 |
# File 'lib/rdstation/events.rb', line 8 def initialize(authorization:) @authorization = end |
Instance Method Details
#create(payload) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rdstation/events.rb', line 12 def create(payload) retryable_request(@authorization) do || response = self.class.post(base_url, headers: .headers, body: payload.to_json) ApiResponse.build(response) end end |