class RDStation::Events
Constants
- EVENTS_ENDPOINT
Public Class Methods
new(authorization:)
click to toggle source
# File lib/rdstation/events.rb, line 8 def initialize(authorization:) @authorization = authorization end
Public Instance Methods
create(payload)
click to toggle source
# File lib/rdstation/events.rb, line 12 def create(payload) retryable_request(@authorization) do |authorization| response = self.class.post(EVENTS_ENDPOINT, headers: authorization.headers, body: payload.to_json) ApiResponse.build(response) end end