Class: HiEnergyAi::Resources::Users

Inherits:
HiEnergyAi::Resource show all
Defined in:
lib/hi_energy_ai/resources/users.rb

Constant Summary

Constants inherited from HiEnergyAi::Resource

HiEnergyAi::Resource::UNSET

Instance Method Summary collapse

Methods inherited from HiEnergyAi::Resource

#initialize

Constructor Details

This class inherits a constructor from HiEnergyAi::Resource

Instance Method Details

#create(attributes = UNSET, **params) ⇒ Object



14
15
16
17
# File 'lib/hi_energy_ai/resources/users.rb', line 14

def create(attributes = UNSET, **params)
  body_attrs, query = split_attributes(attributes, params)
  post("/users", params: query, body: { user: body_attrs })
end

#find(id, **params) ⇒ Object



10
11
12
# File 'lib/hi_energy_ai/resources/users.rb', line 10

def find(id, **params)
  get("/users/#{id}", params: params)
end

#list(**params) ⇒ Object



6
7
8
# File 'lib/hi_energy_ai/resources/users.rb', line 6

def list(**params)
  get("/users", params: params)
end

#resend_invitation(id, **params) ⇒ Object



24
25
26
# File 'lib/hi_energy_ai/resources/users.rb', line 24

def resend_invitation(id, **params)
  post("/users/#{id}/resend_invitation", params: params)
end

#rotate_api_key(id, **params) ⇒ Object



28
29
30
# File 'lib/hi_energy_ai/resources/users.rb', line 28

def rotate_api_key(id, **params)
  post("/users/#{id}/rotate_api_key", params: params)
end

#update(id, attributes = UNSET, **params) ⇒ Object



19
20
21
22
# File 'lib/hi_energy_ai/resources/users.rb', line 19

def update(id, attributes = UNSET, **params)
  body_attrs, query = split_attributes(attributes, params)
  patch("/users/#{id}", params: query, body: { user: body_attrs })
end