Class: Billingrails::Resources::Events
- Inherits:
-
Object
- Object
- Billingrails::Resources::Events
- Defined in:
- lib/billingrails/resources/events.rb
Overview
Events resource
Instance Method Summary collapse
-
#ingest(data) ⇒ Hash
Ingest event.
-
#ingest_batch(data) ⇒ Hash
Ingest batch events.
-
#initialize(client) ⇒ Events
constructor
A new instance of Events.
Constructor Details
#initialize(client) ⇒ Events
Returns a new instance of Events.
10 11 12 |
# File 'lib/billingrails/resources/events.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#ingest(data) ⇒ Hash
Ingest event
Ingests an event.
20 21 22 23 |
# File 'lib/billingrails/resources/events.rb', line 20 def ingest(data) path = "/biller/events/ingest" @client.request(:post, path, body: data) end |
#ingest_batch(data) ⇒ Hash
Ingest batch events
Ingests batch events.
31 32 33 34 |
# File 'lib/billingrails/resources/events.rb', line 31 def ingest_batch(data) path = "/biller/events/batch" @client.request(:post, path, body: data) end |