Class: AhoSdk::Holder::CredentialsResource Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aho_sdk/holder.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.

Credentials resource operations

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CredentialsResource

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



38
39
40
# File 'lib/aho_sdk/holder.rb', line 38

def initialize(client)
  @client = client
end

Instance Method Details

#get(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 holder credential details

Returns:

  • (Hash)


56
57
58
# File 'lib/aho_sdk/holder.rb', line 56

def get(uuid:)
  @client.get("/v1/holder/credentials/#{uuid}")
end

#list(page: nil, per_page: nil, status: nil, sort: nil, direction: 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 holder credentials

Returns:

  • (Hash)


45
46
47
48
49
50
51
# File 'lib/aho_sdk/holder.rb', line 45

def list(page: nil, per_page: nil, status: nil, sort: nil, direction: nil)
  fetch_page = ->(p) {
    response = @client.get("/v1/holder/credentials", params: { page: p, per_page: per_page, status: status, sort: sort, direction: direction })
    Page.new(data: response[:data], meta: response[:meta], fetch_next: fetch_page)
  }
  fetch_page.call(page)
end