Module: BridgeAPI::Client::SubAccount
- Defined in:
- lib/bridge_api/client/sub_account.rb
Instance Method Summary collapse
- #activate_sub_account(subaccount_id, params = {}) ⇒ Object
- #deactivate_sub_account(subaccount_id, params = {}) ⇒ Object
- #get_sub_accounts(params = {}) ⇒ Object
- #revoke_course_from_subaccount(course_template_id, params = {}) ⇒ Object
- #share_course_with_subaccount(course_template_id, params = {}) ⇒ Object
- #update_subaccount(subaccount_id, params = {}) ⇒ Object
Instance Method Details
#activate_sub_account(subaccount_id, params = {}) ⇒ Object
12 13 14 |
# File 'lib/bridge_api/client/sub_account.rb', line 12 def activate_sub_account(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}/enable", params) end |
#deactivate_sub_account(subaccount_id, params = {}) ⇒ Object
8 9 10 |
# File 'lib/bridge_api/client/sub_account.rb', line 8 def deactivate_sub_account(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}/disable", params) end |
#get_sub_accounts(params = {}) ⇒ Object
4 5 6 |
# File 'lib/bridge_api/client/sub_account.rb', line 4 def get_sub_accounts(params = {}) get("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}", params) end |
#revoke_course_from_subaccount(course_template_id, params = {}) ⇒ Object
24 25 26 |
# File 'lib/bridge_api/client/sub_account.rb', line 24 def revoke_course_from_subaccount(course_template_id, params = {}) put("#{API_PATH}#{AUTHOR_PATH}#{COURSE_TEMPLATE_PATH}/#{course_template_id}/#{SUB_ACCOUNT_PATH}/revoke", params) end |
#share_course_with_subaccount(course_template_id, params = {}) ⇒ Object
20 21 22 |
# File 'lib/bridge_api/client/sub_account.rb', line 20 def share_course_with_subaccount(course_template_id, params = {}) put("#{API_PATH}#{AUTHOR_PATH}#{COURSE_TEMPLATE_PATH}/#{course_template_id}/#{SUB_ACCOUNT_PATH}/share", params) end |
#update_subaccount(subaccount_id, params = {}) ⇒ Object
16 17 18 |
# File 'lib/bridge_api/client/sub_account.rb', line 16 def update_subaccount(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", params) end |