Module: Auth0::Api::V2::Prompts
- Included in:
- Auth0::Api::V2
- Defined in:
- lib/auth0/api/v2/prompts.rb
Instance Method Summary collapse
-
#custom_text(prompt, language) ⇒ json
(also: #get_custom_text)
Get custom text for a prompt Retrieve custom text for a specific prompt and language.
-
#patch_prompts(options = {}) ⇒ json
(also: #update_prompts)
Update prompts settings.
-
#prompts ⇒ json
(also: #get_prompts)
Get prompts settings.
-
#put_custom_text(prompt, language, body) ⇒ json
(also: #update_custom_text)
Set custom text for a specific prompt Existing texts will be overwritten.
Instance Method Details
#custom_text(prompt, language) ⇒ json Also known as: get_custom_text
Get custom text for a prompt Retrieve custom text for a specific prompt and language.
36 37 38 39 40 41 42 |
# File 'lib/auth0/api/v2/prompts.rb', line 36 def custom_text(prompt, language) raise Auth0::InvalidParameter, 'Must supply a valid prompt' if prompt.to_s.empty? raise Auth0::InvalidParameter, 'Must supply a valid language' if language.to_s.empty? path = "#{prompts_path}/#{prompt}/custom-text/#{language}" get(path) end |
#patch_prompts(options = {}) ⇒ json Also known as: update_prompts
Update prompts settings.
21 22 23 24 25 26 |
# File 'lib/auth0/api/v2/prompts.rb', line 21 def patch_prompts( = {}) request_params = { universal_login_experience: .fetch(:universal_login_experience, nil) } patch(prompts_path, request_params) end |
#prompts ⇒ json Also known as: get_prompts
Get prompts settings.
10 11 12 |
# File 'lib/auth0/api/v2/prompts.rb', line 10 def prompts get(prompts_path) end |
#put_custom_text(prompt, language, body) ⇒ json Also known as: update_custom_text
Set custom text for a specific prompt Existing texts will be overwritten.
53 54 55 56 57 58 59 |
# File 'lib/auth0/api/v2/prompts.rb', line 53 def put_custom_text(prompt, language, body) raise Auth0::InvalidParameter, 'Must supply a valid prompt' if prompt.to_s.empty? raise Auth0::InvalidParameter, 'Must supply a valid language' if language.to_s.empty? path = "#{prompts_path}/#{prompt}/custom-text/#{language}" put(path, body) end |