Module: ConfigStore::AccountClientMethods
- Included in:
- Client
- Defined in:
- lib/configstore/clients/account_client_methods.rb
Instance Method Summary collapse
- #create_account ⇒ Object
- #delete_account(account_uuid) ⇒ Object
- #get_account(account_uuid) ⇒ Object
- #list_accounts ⇒ Object
Instance Method Details
#create_account ⇒ Object
14 15 16 17 |
# File 'lib/configstore/clients/account_client_methods.rb', line 14 def create_account raw_result = @api.create_account return ConfigStore::Account.from_api_hash(raw_result["account"]), ConfigStore::Token.from_api_hash(raw_result["token"]) end |
#delete_account(account_uuid) ⇒ Object
19 20 21 |
# File 'lib/configstore/clients/account_client_methods.rb', line 19 def delete_account(account_uuid) return @api.delete_account(account_uuid) end |
#get_account(account_uuid) ⇒ Object
10 11 12 |
# File 'lib/configstore/clients/account_client_methods.rb', line 10 def get_account(account_uuid) return ConfigStore::Account.from_api_hash(@api.get_account(account_uuid)) end |
#list_accounts ⇒ Object
4 5 6 7 8 |
# File 'lib/configstore/clients/account_client_methods.rb', line 4 def list_accounts return @api.list_accounts.map do |raw_account| next(ConfigStore::Account.from_api_hash(raw_account)) end end |