Module: Auth0::Api::V1::Rules

Included in:
Auth0::Api::V1
Defined in:
lib/auth0/api/v1/rules.rb

Overview

Instance Method Summary collapse

Instance Method Details

#create_rule(name, script, order = nil, status = true) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Rules

auth0.com/docs/api#!#post–api-rules

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

20
21
22
23
24
25
26
27
28
29
30
# File 'lib/auth0/api/v1/rules.rb', line 20

def create_rule(name, script, order = nil, status = true)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = '/api/rules'
  request_params = {
    name: name,
    status: status,
    script: script,
    order: order
  }
  post(path, request_params)
end

#delete_rule(name) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Rules

auth0.com/docs/api#!#delete–api-rules–rule-name-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

49
50
51
52
53
# File 'lib/auth0/api/v1/rules.rb', line 49

def delete_rule(name)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/rules/#{name}"
  delete(path)
end

#rulesObject Also known as: get_rules

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Rules

auth0.com/docs/api#!#get–api-rules

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

9
10
11
12
13
# File 'lib/auth0/api/v1/rules.rb', line 9

def rules
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = '/api/rules'
  get(path)
end

#update_rule(name, script, order = nil, status = true) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Rules

auth0.com/docs/api#!#put–api-rules–rule-name-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

35
36
37
38
39
40
41
42
43
44
# File 'lib/auth0/api/v1/rules.rb', line 35

def update_rule(name, script, order = nil, status = true)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/rules/#{name}"
  request_params = {
    status: status,
    script: script,
    order: order
  }
  put(path, request_params)
end