Class: Svix::Ingest

Inherits:
Object
  • Object
show all
Defined in:
lib/svix/api/ingest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Ingest

Returns a new instance of Ingest.



10
11
12
13
14
# File 'lib/svix/api/ingest.rb', line 10

def initialize(client)
  @client = client
  @endpoint = IngestEndpoint.new(client)
  @source = IngestSource.new(client)
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



8
9
10
# File 'lib/svix/api/ingest.rb', line 8

def endpoint
  @endpoint
end

#sourceObject

Returns the value of attribute source.



9
10
11
# File 'lib/svix/api/ingest.rb', line 9

def source
  @source
end

Instance Method Details

#dashboard(source_id, ingest_source_consumer_portal_access_in, options = {}) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/svix/api/ingest.rb', line 16

def dashboard(source_id, ingest_source_consumer_portal_access_in, options = {})
  options = options.transform_keys(&:to_s)
  res = @client.execute_request(
    "POST",
    "/ingest/api/v1/source/#{source_id}/dashboard",
    headers: {
      "idempotency-key" => options["idempotency-key"]
    },
    body: ingest_source_consumer_portal_access_in
  )
  DashboardAccessOut.deserialize(res)
end