Module: BridgeAPI::Client::SubAccount
- Defined in:
- lib/bridge_api/client/sub_account.rb
Instance Method Summary collapse
- #activate_sub_account(subaccount_id, params = {}) ⇒ Object
- #create_sub_account_lti_config(sub_account_id, params = {}) ⇒ Object
- #deactivate_sub_account(subaccount_id, params = {}) ⇒ Object
- #delete_lti_config(sub_account_id, lti_tool_id, params = {}) ⇒ Object
- #get_lti_config_for_sub_account(sub_account_id, params = {}) ⇒ Object
- #get_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_sub_account_lti_config(sub_account_id, lti_tool_id, params = {}) ⇒ Object
- #update_subaccount(subaccount_id, params = {}) ⇒ Object
Instance Method Details
#activate_sub_account(subaccount_id, params = {}) ⇒ Object
16 17 18 |
# File 'lib/bridge_api/client/sub_account.rb', line 16 def activate_sub_account(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}/enable", params) end |
#create_sub_account_lti_config(sub_account_id, params = {}) ⇒ Object
40 41 42 |
# File 'lib/bridge_api/client/sub_account.rb', line 40 def create_sub_account_lti_config(sub_account_id, params = {}) post("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}", params) end |
#deactivate_sub_account(subaccount_id, params = {}) ⇒ Object
12 13 14 |
# File 'lib/bridge_api/client/sub_account.rb', line 12 def deactivate_sub_account(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}/disable", params) end |
#delete_lti_config(sub_account_id, lti_tool_id, params = {}) ⇒ Object
44 45 46 |
# File 'lib/bridge_api/client/sub_account.rb', line 44 def delete_lti_config(sub_account_id, lti_tool_id, params = {}) delete("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}/#{lti_tool_id}", params) end |
#get_lti_config_for_sub_account(sub_account_id, params = {}) ⇒ Object
32 33 34 |
# File 'lib/bridge_api/client/sub_account.rb', line 32 def get_lti_config_for_sub_account(sub_account_id, params = {}) get("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}", params) end |
#get_sub_account(subaccount_id, params = {}) ⇒ Object
8 9 10 |
# File 'lib/bridge_api/client/sub_account.rb', line 8 def get_sub_account(subaccount_id, params = {}) get("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", 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
28 29 30 |
# File 'lib/bridge_api/client/sub_account.rb', line 28 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
24 25 26 |
# File 'lib/bridge_api/client/sub_account.rb', line 24 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_sub_account_lti_config(sub_account_id, lti_tool_id, params = {}) ⇒ Object
36 37 38 |
# File 'lib/bridge_api/client/sub_account.rb', line 36 def update_sub_account_lti_config(sub_account_id, lti_tool_id, params = {}) put("#{API_PATH}#{SUPPORT_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}#{LTI_TOOLS_PATH}/#{lti_tool_id}", params) end |
#update_subaccount(subaccount_id, params = {}) ⇒ Object
20 21 22 |
# File 'lib/bridge_api/client/sub_account.rb', line 20 def update_subaccount(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", params) end |