Module: BWAPI::Client::Admin::Clients::SubClients
- Included in:
- BWAPI::Client::Admin
- Defined in:
- lib/bwapi/client/admin/sub_clients.rb
Overview
Subclients module for admin/subclient endpoints
Instance Method Summary collapse
-
#client_sub_clients(client_id, opts = {}) ⇒ Hashie::Mash
(also: #sub_clients)
Get all sub clients.
-
#create_client_sub_client(client_id, opts = {}) ⇒ Hashie::Mash
(also: #create_sub_client)
Create new subclient.
-
#delete_client_sub_client(client_id, sub_client_id) ⇒ Hashie::Mash
(also: #delete_sub_client)
Delete specific sub client of client.
-
#get_client_sub_client(client_id, sub_client_id) ⇒ Hashie::Mash
(also: #sub_client)
Get specific sub client of client.
-
#update_client_sub_client(client_id, sub_client_id, opts = {}) ⇒ Hashie::Mash
(also: #update_sub_client)
Update new subclient.
Instance Method Details
#client_sub_clients(client_id, opts = {}) ⇒ Hashie::Mash Also known as: sub_clients
Get all sub clients
15 16 17 |
# File 'lib/bwapi/client/admin/sub_clients.rb', line 15 def client_sub_clients client_id, opts={} get "admin/clients/#{client_id}/subclients", opts end |
#create_client_sub_client(client_id, opts = {}) ⇒ Hashie::Mash Also known as: create_sub_client
Create new subclient
61 62 63 |
# File 'lib/bwapi/client/admin/sub_clients.rb', line 61 def create_client_sub_client client_id, opts={} post "admin/clients/#{client_id}/subclients", opts end |
#delete_client_sub_client(client_id, sub_client_id) ⇒ Hashie::Mash Also known as: delete_sub_client
Delete specific sub client of client
108 109 110 |
# File 'lib/bwapi/client/admin/sub_clients.rb', line 108 def delete_client_sub_client client_id, sub_client_id delete "admin/clients/#{client_id}/subclients/#{sub_client_id}" end |
#get_client_sub_client(client_id, sub_client_id) ⇒ Hashie::Mash Also known as: sub_client
Get specific sub client of client
25 26 27 |
# File 'lib/bwapi/client/admin/sub_clients.rb', line 25 def get_client_sub_client client_id, sub_client_id get "admin/clients/#{client_id}/subclients/#{sub_client_id}" end |
#update_client_sub_client(client_id, sub_client_id, opts = {}) ⇒ Hashie::Mash Also known as: update_sub_client
Update new subclient
98 99 100 |
# File 'lib/bwapi/client/admin/sub_clients.rb', line 98 def update_client_sub_client client_id, sub_client_id, opts={} put "admin/clients/#{client_id}/subclients/#{sub_client_id}", opts end |