Module: Dnsimple::Client::Accounts

Included in:
AccountsService
Defined in:
lib/dnsimple/client/accounts.rb

Instance Method Summary collapse

Instance Method Details

#accounts(options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::Account> Also known as: list_accounts

Lists the accounts the authenticated entity has access to.

Examples:

List the accounts:

client.accounts.list

Parameters:

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:


18
19
20
21
22
# File 'lib/dnsimple/client/accounts.rb', line 18

def accounts(options = {})
  response = client.get(Client.versioned("/accounts"), options)

  Dnsimple::Response.new(response, response["data"].map { |r| Struct::Account.new(r) })
end