module BridgeAPI::Client::SubAccount

Public Instance Methods

activate_sub_account(subaccount_id, params = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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