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
- #update_subaccount_auth(params = {}) ⇒ Object
- #upsert_custom_attribute_values(sub_account_id, params = {}) ⇒ Object
Instance Method Details
#activate_sub_account(subaccount_id, params = {}) ⇒ Object
22 23 24 |
# File 'lib/bridge_api/client/sub_account.rb', line 22 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
50 51 52 |
# File 'lib/bridge_api/client/sub_account.rb', line 50 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
18 19 20 |
# File 'lib/bridge_api/client/sub_account.rb', line 18 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
54 55 56 |
# File 'lib/bridge_api/client/sub_account.rb', line 54 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
42 43 44 |
# File 'lib/bridge_api/client/sub_account.rb', line 42 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
14 15 16 |
# File 'lib/bridge_api/client/sub_account.rb', line 14 def get_sub_account(subaccount_id, params = {}) get("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", params) end |
#get_sub_accounts(params = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/bridge_api/client/sub_account.rb', line 6 def get_sub_accounts(params = {}) path = "#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}" RESULT_MAPPING[path] = { meta: %w[data_dump_enabled data_dump_subaccount_enabled] } get(path, params) end |
#revoke_course_from_subaccount(course_template_id, params = {}) ⇒ Object
38 39 40 |
# File 'lib/bridge_api/client/sub_account.rb', line 38 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
34 35 36 |
# File 'lib/bridge_api/client/sub_account.rb', line 34 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
46 47 48 |
# File 'lib/bridge_api/client/sub_account.rb', line 46 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
26 27 28 |
# File 'lib/bridge_api/client/sub_account.rb', line 26 def update_subaccount(subaccount_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", params) end |
#update_subaccount_auth(params = {}) ⇒ Object
30 31 32 |
# File 'lib/bridge_api/client/sub_account.rb', line 30 def update_subaccount_auth(params = {}) put("#{API_PATH}/config/sub_account/auth", params) end |
#upsert_custom_attribute_values(sub_account_id, params = {}) ⇒ Object
58 59 60 |
# File 'lib/bridge_api/client/sub_account.rb', line 58 def upsert_custom_attribute_values(sub_account_id, params = {}) put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{sub_account_id}/custom_attribute_values", params) end |