Class: AhoSdk::Issuer::SchemasResource Private
- Inherits:
-
Object
- Object
- AhoSdk::Issuer::SchemasResource
- Defined in:
- lib/aho_sdk/issuer.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.
Schemas resource operations
Instance Method Summary collapse
-
#activate(id:, idempotency_key: nil) ⇒ Hash
private
Activate a draft credential schema.
-
#archive(id:, idempotency_key: nil) ⇒ Hash
private
Archive an active credential schema.
-
#create(body: nil, idempotency_key: nil) ⇒ Hash
private
Create a credential schema.
-
#delete(id:) ⇒ Hash
private
Delete a draft credential schema.
-
#get(id:) ⇒ Hash
private
Get credential schema details.
-
#initialize(client) ⇒ SchemasResource
constructor
private
A new instance of SchemasResource.
-
#list(status: nil, page: nil, per_page: nil) ⇒ Hash
private
List issuer credential schemas.
-
#update(id:, body: nil, idempotency_key: nil) ⇒ Hash
private
Update a draft credential schema.
Constructor Details
#initialize(client) ⇒ SchemasResource
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 SchemasResource.
382 383 384 |
# File 'lib/aho_sdk/issuer.rb', line 382 def initialize(client) @client = client end |
Instance Method Details
#activate(id:, 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.
Activate a draft credential schema
428 429 430 |
# File 'lib/aho_sdk/issuer.rb', line 428 def activate(id:, idempotency_key: nil) @client.post("/v1/issuer/schemas/#{id}/activate", idempotency_key: idempotency_key) end |
#archive(id:, 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.
Archive an active credential schema
435 436 437 |
# File 'lib/aho_sdk/issuer.rb', line 435 def archive(id:, idempotency_key: nil) @client.post("/v1/issuer/schemas/#{id}/archive", idempotency_key: idempotency_key) end |
#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 schema
389 390 391 |
# File 'lib/aho_sdk/issuer.rb', line 389 def create(body: nil, idempotency_key: nil) @client.post("/v1/issuer/schemas", body: body, idempotency_key: idempotency_key) end |
#delete(id:) ⇒ 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.
Delete a draft credential schema
421 422 423 |
# File 'lib/aho_sdk/issuer.rb', line 421 def delete(id:) @client.delete("/v1/issuer/schemas/#{id}") end |
#get(id:) ⇒ 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 credential schema details
407 408 409 |
# File 'lib/aho_sdk/issuer.rb', line 407 def get(id:) @client.get("/v1/issuer/schemas/#{id}") end |
#list(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 issuer credential schemas
396 397 398 399 400 401 402 |
# File 'lib/aho_sdk/issuer.rb', line 396 def list(status: nil, page: nil, per_page: nil) fetch_page = ->(p) { response = @client.get("/v1/issuer/schemas", 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 |
#update(id:, 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.
Update a draft credential schema
414 415 416 |
# File 'lib/aho_sdk/issuer.rb', line 414 def update(id:, body: nil, idempotency_key: nil) @client.patch("/v1/issuer/schemas/#{id}", body: body, idempotency_key: idempotency_key) end |