Class: AhoSdk::Account::ApiKeysResource Private

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

Api_keys resource operations

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ApiKeysResource

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



50
51
52
# File 'lib/aho_sdk/account.rb', line 50

def initialize(client)
  @client = client
end

Instance Method Details

#get(hashid:) ⇒ 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 API key details

Returns:

  • (Hash)


64
65
66
# File 'lib/aho_sdk/account.rb', line 64

def get(hashid:)
  @client.get("/v1/account/api_keys/#{hashid}")
end

#listHash

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 API keys

Returns:

  • (Hash)


57
58
59
# File 'lib/aho_sdk/account.rb', line 57

def list
  @client.get("/v1/account/api_keys")
end

#update(hashid:, body:, 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 API key

Returns:

  • (Hash)


71
72
73
# File 'lib/aho_sdk/account.rb', line 71

def update(hashid:, body:, idempotency_key: nil)
  @client.patch("/v1/account/api_keys/#{hashid}", body: body, idempotency_key: idempotency_key)
end