Class: AhoSdk::Verifier::ResponsesResource Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aho_sdk/verifier.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Responses resource operations

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ResponsesResource

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 ResponsesResource.



190
191
192
# File 'lib/aho_sdk/verifier.rb', line 190

def initialize(client)
  @client = client
end

Instance Method Details

#get(request_uuid:, uuid:) ⇒ Hash

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.

Get response details

Returns:

  • (Hash)


208
209
210
# File 'lib/aho_sdk/verifier.rb', line 208

def get(request_uuid:, uuid:)
  @client.get("/v1/verifier/requests/#{request_uuid}/responses/#{uuid}")
end

#list(request_uuid:, status: nil, page: nil, per_page: nil) ⇒ Hash

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.

List responses for a presentation request

Returns:

  • (Hash)


197
198
199
200
201
202
203
# File 'lib/aho_sdk/verifier.rb', line 197

def list(request_uuid:, status: nil, page: nil, per_page: nil)
  fetch_page = ->(p) {
    response = @client.get("/v1/verifier/requests/#{request_uuid}/responses", params: { status: status, page: p, per_page: per_page })
    Page.new(data: response[:data], meta: response[:meta], fetch_next: fetch_page)
  }
  fetch_page.call(page)
end