Class: AhoSdk::Holder::PresentationsResource Private
- Inherits:
-
Object
- Object
- AhoSdk::Holder::PresentationsResource
- 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.
Presentations resource operations
Instance Method Summary collapse
-
#create(body: nil, idempotency_key: nil) ⇒ Hash
private
Create a credential presentation.
-
#delete(uuid:) ⇒ Hash
private
Revoke a presentation.
-
#get(uuid:) ⇒ Hash
private
Get presentation details.
-
#initialize(client) ⇒ PresentationsResource
constructor
private
A new instance of PresentationsResource.
-
#list(page: nil, per_page: nil, status: nil, credential_uuid: nil, sort: nil, direction: nil) ⇒ Hash
private
List holder presentations.
Constructor Details
#initialize(client) ⇒ PresentationsResource
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 PresentationsResource.
65 66 67 |
# File 'lib/aho_sdk/holder.rb', line 65 def initialize(client) @client = client end |
Instance Method Details
#create(body: nil, idempotency_key: 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.
Create a credential presentation
83 84 85 |
# File 'lib/aho_sdk/holder.rb', line 83 def create(body: nil, idempotency_key: nil) @client.post("/v1/holder/presentations", body: body, idempotency_key: idempotency_key) end |
#delete(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.
Revoke a presentation
97 98 99 |
# File 'lib/aho_sdk/holder.rb', line 97 def delete(uuid:) @client.delete("/v1/holder/presentations/#{uuid}") end |
#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 presentation details
90 91 92 |
# File 'lib/aho_sdk/holder.rb', line 90 def get(uuid:) @client.get("/v1/holder/presentations/#{uuid}") end |
#list(page: nil, per_page: nil, status: nil, credential_uuid: 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 presentations
72 73 74 75 76 77 78 |
# File 'lib/aho_sdk/holder.rb', line 72 def list(page: nil, per_page: nil, status: nil, credential_uuid: nil, sort: nil, direction: nil) fetch_page = ->(p) { response = @client.get("/v1/holder/presentations", params: { page: p, per_page: per_page, status: status, credential_uuid: credential_uuid, sort: sort, direction: direction }) Page.new(data: response[:data], meta: response[:meta], fetch_next: fetch_page) } fetch_page.call(page) end |