Class: Stigg::Resources::V1::Events
- Inherits:
-
Object
- Object
- Stigg::Resources::V1::Events
- Defined in:
- lib/stigg/resources/v1/events.rb
Overview
Operations related to usage & metering
Instance Method Summary collapse
-
#initialize(client:) ⇒ Events
constructor
private
A new instance of Events.
-
#report(events:, request_options: {}) ⇒ Stigg::Models::V1::EventReportResponse
Reports raw usage events for event-based metering.
Constructor Details
#initialize(client:) ⇒ Events
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Events.
34 35 36 |
# File 'lib/stigg/resources/v1/events.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#report(events:, request_options: {}) ⇒ Stigg::Models::V1::EventReportResponse
Reports raw usage events for event-based metering. Events are ingested asynchronously and aggregated into usage totals.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/stigg/resources/v1/events.rb', line 20 def report(params) parsed, = Stigg::V1::EventReportParams.dump_request(params) @client.request( method: :post, path: "api/v1/events", body: parsed, model: Stigg::Models::V1::EventReportResponse, options: ) end |