Module: Auth0::Api::V2::Tenants

Included in:
Auth0::Api::V2
Defined in:
lib/auth0/api/v2/tenants.rb

Overview

Methods to use the Tenants endpoints

Instance Method Summary collapse

Instance Method Details

#get_tenant_settings(fields: nil, include_fields: true) ⇒ json

Gets tenants settings.

Parameters:

  • fields (string) (defaults to: nil)

    A comma separated list of fields to include or exclude from the result.

  • include_fields (boolean) (defaults to: true)

    True if the fields specified are to be included in the result, false otherwise.

Returns:

  • (json)

    Returns tenants settings.

See Also:



14
15
16
17
18
19
20
# File 'lib/auth0/api/v2/tenants.rb', line 14

def get_tenant_settings(fields: nil, include_fields: true)
  request_params = {
    fields: fields,
    include_fields: include_fields
  }
  get(tenant_path, request_params)
end

#update_tenant_settings(body) ⇒ json

Updates tenants settings.

Parameters:

  • body (hash)

    The Hash body used to define the tenant settings’ values.

Returns:

  • (json)

    Returns the updated tenant settings.

Raises:

See Also:



27
28
29
30
# File 'lib/auth0/api/v2/tenants.rb', line 27

def update_tenant_settings(body)
  raise Auth0::InvalidParameter, 'Must supply a valid body to update tenant settings' if body.to_s.empty?
  patch(tenant_path, body)
end