auth0 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +3 -3
  3. data/.fern/replay.lock +7 -1
  4. data/.version +1 -1
  5. data/CHANGELOG.md +7 -0
  6. data/EXAMPLES.md +44 -0
  7. data/examples/ruby-api/Gemfile.lock +1 -1
  8. data/lib/auth0/actions/client.rb +47 -6
  9. data/lib/auth0/actions/executions/client.rb +4 -1
  10. data/lib/auth0/actions/modules/client.rb +40 -6
  11. data/lib/auth0/actions/modules/versions/client.rb +19 -3
  12. data/lib/auth0/actions/triggers/bindings/client.rb +12 -2
  13. data/lib/auth0/actions/triggers/client.rb +4 -1
  14. data/lib/auth0/actions/versions/client.rb +27 -4
  15. data/lib/auth0/agents/client.rb +22 -4
  16. data/lib/auth0/anomaly/blocks/client.rb +6 -0
  17. data/lib/auth0/api/authentication_endpoints.rb +40 -0
  18. data/lib/auth0/attack_protection/bot_detection/client.rb +8 -2
  19. data/lib/auth0/attack_protection/breached_password_detection/client.rb +8 -2
  20. data/lib/auth0/attack_protection/brute_force_protection/client.rb +8 -2
  21. data/lib/auth0/attack_protection/captcha/client.rb +8 -2
  22. data/lib/auth0/attack_protection/phone_provider_protection/client.rb +8 -2
  23. data/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +8 -2
  24. data/lib/auth0/branding/client.rb +8 -2
  25. data/lib/auth0/branding/phone/providers/client.rb +31 -5
  26. data/lib/auth0/branding/phone/templates/client.rb +39 -7
  27. data/lib/auth0/branding/templates/client.rb +10 -1
  28. data/lib/auth0/branding/themes/client.rb +162 -4
  29. data/lib/auth0/client.rb +8 -8
  30. data/lib/auth0/client_grants/client.rb +28 -4
  31. data/lib/auth0/client_grants/organizations/client.rb +9 -1
  32. data/lib/auth0/clients/client.rb +46 -7
  33. data/lib/auth0/clients/connections/client.rb +11 -1
  34. data/lib/auth0/clients/credentials/client.rb +36 -7
  35. data/lib/auth0/clients/types/create_client_request_content.rb +2 -0
  36. data/lib/auth0/clients/types/update_client_request_content.rb +2 -0
  37. data/lib/auth0/connection_profiles/client.rb +30 -6
  38. data/lib/auth0/connections/client.rb +37 -4
  39. data/lib/auth0/connections/clients/client.rb +21 -2
  40. data/lib/auth0/connections/directory_provisioning/client.rb +73 -8
  41. data/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +4 -1
  42. data/lib/auth0/connections/keys/client.rb +31 -8
  43. data/lib/auth0/connections/scim_configuration/client.rb +37 -6
  44. data/lib/auth0/connections/scim_configuration/tokens/client.rb +14 -2
  45. data/lib/auth0/connections/users/client.rb +6 -0
  46. data/lib/auth0/custom_domains/client.rb +43 -8
  47. data/lib/auth0/device_credentials/client.rb +25 -2
  48. data/lib/auth0/email_templates/client.rb +19 -4
  49. data/lib/auth0/emails/provider/client.rb +23 -3
  50. data/lib/auth0/event_streams/client.rb +38 -5
  51. data/lib/auth0/event_streams/deliveries/client.rb +19 -2
  52. data/lib/auth0/event_streams/redeliveries/client.rb +10 -1
  53. data/lib/auth0/events/client.rb +7 -0
  54. data/lib/auth0/experimentation/client.rb +19 -0
  55. data/lib/auth0/experimentation/experiments/client.rb +63 -0
  56. data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -0
  57. data/lib/auth0/flows/client.rb +28 -4
  58. data/lib/auth0/flows/executions/client.rb +23 -2
  59. data/lib/auth0/flows/vault/connections/client.rb +31 -4
  60. data/lib/auth0/forms/client.rb +27 -4
  61. data/lib/auth0/groups/client.rb +21 -2
  62. data/lib/auth0/groups/members/client.rb +10 -1
  63. data/lib/auth0/groups/roles/client.rb +20 -1
  64. data/lib/auth0/guardian/client.rb +77 -0
  65. data/lib/auth0/guardian/enrollments/client.rb +11 -2
  66. data/lib/auth0/guardian/factors/client.rb +21 -5
  67. data/lib/auth0/guardian/factors/duo/settings/client.rb +12 -3
  68. data/lib/auth0/guardian/factors/email/client.rb +93 -0
  69. data/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb +17 -0
  70. data/lib/auth0/guardian/factors/phone/client.rb +110 -8
  71. data/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb +17 -0
  72. data/lib/auth0/guardian/factors/push_notification/client.rb +48 -12
  73. data/lib/auth0/guardian/factors/sms/client.rb +32 -9
  74. data/lib/auth0/guardian/policies/client.rb +8 -2
  75. data/lib/auth0/guardian/types/set_guardian_settings_request_content.rb +17 -0
  76. data/lib/auth0/hooks/client.rb +33 -4
  77. data/lib/auth0/hooks/secrets/client.rb +38 -4
  78. data/lib/auth0/jobs/client.rb +4 -1
  79. data/lib/auth0/jobs/errors/client.rb +9 -4
  80. data/lib/auth0/jobs/users_exports/client.rb +4 -1
  81. data/lib/auth0/jobs/users_imports/client.rb +14 -6
  82. data/lib/auth0/jobs/verification_email/client.rb +4 -1
  83. data/lib/auth0/keys/custom_signing/client.rb +13 -2
  84. data/lib/auth0/keys/encryption/client.rb +33 -5
  85. data/lib/auth0/keys/network_acls/client.rb +19 -3
  86. data/lib/auth0/keys/signing/client.rb +21 -7
  87. data/lib/auth0/log_streams/client.rb +29 -7
  88. data/lib/auth0/logs/client.rb +16 -2
  89. data/lib/auth0/network_acls/client.rb +41 -4
  90. data/lib/auth0/organizations/client.rb +109 -5
  91. data/lib/auth0/organizations/client_grants/client.rb +25 -2
  92. data/lib/auth0/organizations/clients/client.rb +38 -4
  93. data/lib/auth0/organizations/connections/client.rb +37 -4
  94. data/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +2 -0
  95. data/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +2 -0
  96. data/lib/auth0/organizations/discovery_domains/client.rb +42 -5
  97. data/lib/auth0/organizations/enabled_connections/client.rb +36 -4
  98. data/lib/auth0/organizations/groups/client.rb +8 -1
  99. data/lib/auth0/organizations/groups/roles/client.rb +23 -1
  100. data/lib/auth0/organizations/invitations/client.rb +40 -3
  101. data/lib/auth0/organizations/members/client.rb +23 -1
  102. data/lib/auth0/organizations/members/effective_roles/client.rb +9 -1
  103. data/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +10 -1
  104. data/lib/auth0/organizations/members/roles/client.rb +24 -1
  105. data/lib/auth0/organizations/organization_template/client.rb +16 -1
  106. data/lib/auth0/organizations/roles/groups/client.rb +9 -1
  107. data/lib/auth0/organizations/roles/members/client.rb +11 -1
  108. data/lib/auth0/organizations/types/search_organizations_request_parameters.rb +19 -0
  109. data/lib/auth0/prompts/client.rb +8 -2
  110. data/lib/auth0/prompts/custom_text/client.rb +20 -2
  111. data/lib/auth0/prompts/partials/client.rb +16 -2
  112. data/lib/auth0/prompts/rendering/client.rb +34 -4
  113. data/lib/auth0/rate_limit_policies/client.rb +37 -4
  114. data/lib/auth0/refresh_tokens/client.rb +25 -3
  115. data/lib/auth0/resource_servers/client.rb +102 -4
  116. data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +4 -0
  117. data/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb +23 -0
  118. data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +4 -0
  119. data/lib/auth0/risk_assessments/settings/client.rb +8 -2
  120. data/lib/auth0/risk_assessments/settings/new_device/client.rb +8 -2
  121. data/lib/auth0/roles/client.rb +26 -4
  122. data/lib/auth0/roles/groups/client.rb +20 -1
  123. data/lib/auth0/roles/permissions/client.rb +27 -1
  124. data/lib/auth0/roles/users/client.rb +15 -1
  125. data/lib/auth0/rules/client.rb +33 -4
  126. data/lib/auth0/rules_configs/client.rb +19 -5
  127. data/lib/auth0/self_service_profiles/client.rb +23 -4
  128. data/lib/auth0/self_service_profiles/custom_text/client.rb +23 -3
  129. data/lib/auth0/self_service_profiles/sso_ticket/client.rb +10 -1
  130. data/lib/auth0/sessions/client.rb +14 -2
  131. data/lib/auth0/stats/client.rb +16 -5
  132. data/lib/auth0/supplemental_signals/client.rb +8 -2
  133. data/lib/auth0/tenants/settings/client.rb +11 -2
  134. data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +2 -0
  135. data/lib/auth0/tickets/client.rb +8 -2
  136. data/lib/auth0/token_exchange_profiles/client.rb +26 -3
  137. data/lib/auth0/types/advance_ramp_response_content.rb +15 -0
  138. data/lib/auth0/types/anonymous_sessions.rb +10 -0
  139. data/lib/auth0/types/client.rb +6 -0
  140. data/lib/auth0/types/client_my_organization_patch_configuration.rb +4 -0
  141. data/lib/auth0/types/client_my_organization_post_configuration.rb +4 -0
  142. data/lib/auth0/types/client_my_organization_response_configuration.rb +4 -0
  143. data/lib/auth0/types/connection_identity_provider_enum.rb +4 -13
  144. data/lib/auth0/types/connection_options_ad.rb +2 -0
  145. data/lib/auth0/types/connection_options_adfs.rb +2 -0
  146. data/lib/auth0/types/connection_options_azure_ad.rb +2 -0
  147. data/lib/auth0/types/connection_options_common_saml.rb +2 -0
  148. data/lib/auth0/types/connection_options_ping_federate.rb +2 -0
  149. data/lib/auth0/types/connection_options_saml.rb +2 -0
  150. data/lib/auth0/types/connection_properties_options.rb +4 -0
  151. data/lib/auth0/types/connection_strategy_enum.rb +4 -13
  152. data/lib/auth0/types/connection_thumbprints_sha384.rb +23 -0
  153. data/lib/auth0/types/connection_thumbprints_sha384ad.rb +23 -0
  154. data/lib/auth0/types/connection_thumbprints_sha384saml.rb +23 -0
  155. data/lib/auth0/types/create_anonymous_sessions.rb +10 -0
  156. data/lib/auth0/types/create_client_response_content.rb +6 -0
  157. data/lib/auth0/types/create_organization_all_connection_response_content.rb +2 -0
  158. data/lib/auth0/types/create_resource_server_response_content.rb +4 -0
  159. data/lib/auth0/types/get_client_response_content.rb +6 -0
  160. data/lib/auth0/types/get_email_factor_settings_response_content.rb +11 -0
  161. data/lib/auth0/types/get_guardian_settings_response_content.rb +15 -0
  162. data/lib/auth0/types/get_organization_all_connection_response_content.rb +2 -0
  163. data/lib/auth0/types/get_phone_factor_settings_response_content.rb +11 -0
  164. data/lib/auth0/types/get_resource_server_response_content.rb +4 -0
  165. data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
  166. data/lib/auth0/types/oauth_scope.rb +1 -2
  167. data/lib/auth0/types/organization_all_connection_post.rb +2 -0
  168. data/lib/auth0/types/organization_member_access_level_enum.rb +14 -0
  169. data/lib/auth0/types/organization_member_access_level_enum_with_null.rb +14 -0
  170. data/lib/auth0/types/organization_sort_field_enum.rb +13 -0
  171. data/lib/auth0/types/resource_server.rb +4 -0
  172. data/lib/auth0/types/resource_server_access_token.rb +10 -0
  173. data/lib/auth0/types/resource_server_access_token_claims_mapping.rb +10 -0
  174. data/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb +23 -0
  175. data/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb +11 -0
  176. data/lib/auth0/types/resource_server_search_response.rb +53 -0
  177. data/lib/auth0/types/resource_server_sort_field_enum.rb +13 -0
  178. data/lib/auth0/types/resource_server_subject_type_authorization.rb +2 -0
  179. data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb +10 -0
  180. data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb +12 -0
  181. data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
  182. data/lib/auth0/types/search_organization.rb +23 -0
  183. data/lib/auth0/types/{list_template_organizations_paginated_response_content.rb → search_organizations_paginated_response_content.rb} +3 -3
  184. data/lib/auth0/types/search_parser_enum.rb +12 -0
  185. data/lib/auth0/types/search_resource_servers_response_content.rb +11 -0
  186. data/lib/auth0/types/set_email_factor_settings_response_content.rb +11 -0
  187. data/lib/auth0/types/set_guardian_settings_response_content.rb +15 -0
  188. data/lib/auth0/types/set_phone_factor_settings_response_content.rb +11 -0
  189. data/lib/auth0/types/tenant_settings_sessions.rb +2 -0
  190. data/lib/auth0/types/tenant_settings_sessions_anonymous.rb +12 -0
  191. data/lib/auth0/types/update_anonymous_sessions.rb +10 -0
  192. data/lib/auth0/types/update_client_response_content.rb +6 -0
  193. data/lib/auth0/types/update_connection_options.rb +4 -0
  194. data/lib/auth0/types/update_organization_all_connection_response_content.rb +2 -0
  195. data/lib/auth0/types/update_resource_server_response_content.rb +4 -0
  196. data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -0
  197. data/lib/auth0/user_attribute_profiles/client.rb +40 -6
  198. data/lib/auth0/user_blocks/client.rb +20 -2
  199. data/lib/auth0/user_grants/client.rb +17 -1
  200. data/lib/auth0/users/authentication_methods/client.rb +57 -9
  201. data/lib/auth0/users/authenticators/client.rb +3 -0
  202. data/lib/auth0/users/client.rb +54 -9
  203. data/lib/auth0/users/connected_accounts/client.rb +8 -1
  204. data/lib/auth0/users/effective_permissions/client.rb +9 -1
  205. data/lib/auth0/users/effective_permissions/sources/roles/client.rb +10 -1
  206. data/lib/auth0/users/effective_roles/client.rb +8 -1
  207. data/lib/auth0/users/effective_roles/sources/groups/client.rb +9 -1
  208. data/lib/auth0/users/enrollments/client.rb +9 -4
  209. data/lib/auth0/users/groups/client.rb +11 -1
  210. data/lib/auth0/users/identities/client.rb +17 -5
  211. data/lib/auth0/users/logs/client.rb +10 -1
  212. data/lib/auth0/users/multifactor/client.rb +9 -0
  213. data/lib/auth0/users/organizations/client.rb +9 -1
  214. data/lib/auth0/users/permissions/client.rb +27 -1
  215. data/lib/auth0/users/refresh_token/client.rb +12 -1
  216. data/lib/auth0/users/risk_assessments/client.rb +7 -0
  217. data/lib/auth0/users/roles/client.rb +21 -1
  218. data/lib/auth0/users/sessions/client.rb +12 -1
  219. data/lib/auth0/verifiable_credentials/verification/templates/client.rb +32 -4
  220. data/lib/auth0/version.rb +1 -1
  221. data/lib/auth0.rb +46 -16
  222. data/wiremock/wiremock-mappings.json +333 -191
  223. metadata +40 -10
  224. data/lib/auth0/organization_templates/client.rb +0 -220
  225. data/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +0 -35
  226. data/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +0 -13
  227. data/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +0 -15
  228. data/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +0 -37
  229. data/lib/auth0/types/list_organization_templates_paginated_response_content.rb +0 -11
  230. data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
@@ -22,6 +22,9 @@ module Auth0
22
22
  # @option request_options [Integer] :timeout_in_seconds
23
23
  # @option params [String] :id
24
24
  #
25
+ # @example
26
+ # client.connections.keys.get(id: "id")
27
+ #
25
28
  # @return [Array[Auth0::Types::ConnectionKey]]
26
29
  def get(request_options: {}, **params)
27
30
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -37,10 +40,12 @@ module Auth0
37
40
  raise Auth0::Errors::TimeoutError
38
41
  end
39
42
  code = response.code.to_i
40
- return if code.between?(200, 299)
41
-
42
- error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
43
- raise error_class.new(response.body, code: code)
43
+ if code.between?(200, 299)
44
+ Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::ConnectionKey], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
45
+ else
46
+ error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
47
+ raise error_class.new(response.body, code: code)
48
+ end
44
49
  end
45
50
 
46
51
  # Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create
@@ -56,14 +61,23 @@ module Auth0
56
61
  # @option request_options [Integer] :timeout_in_seconds
57
62
  # @option params [String] :id
58
63
  #
64
+ # @example
65
+ # client.connections.keys.create(
66
+ # id: "id",
67
+ # request: {}
68
+ # )
69
+ #
59
70
  # @return [Array[Auth0::Types::PostConnectionsKeysResponseContentItem]]
60
71
  def create(request_options: {}, **params)
61
72
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
73
+ path_param_names = %i[id]
74
+ body_params = params.except(*path_param_names)
75
+
62
76
  request = Auth0::Internal::JSON::Request.new(
63
77
  base_url: request_options[:base_url],
64
78
  method: "POST",
65
79
  path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/keys",
66
- body: params,
80
+ body: body_params,
67
81
  request_options: request_options
68
82
  )
69
83
  begin
@@ -73,7 +87,7 @@ module Auth0
73
87
  end
74
88
  code = response.code.to_i
75
89
  if code.between?(200, 299)
76
- Auth0::Types::PostConnectionsKeysResponseContent.load(response.body)
90
+ (response.body.to_s.empty? ? nil : Auth0::Types::PostConnectionsKeysResponseContent.load(response.body))
77
91
  else
78
92
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
79
93
  raise error_class.new(response.body, code: code)
@@ -91,14 +105,23 @@ module Auth0
91
105
  # @option request_options [Integer] :timeout_in_seconds
92
106
  # @option params [String] :id
93
107
  #
108
+ # @example
109
+ # client.connections.keys.rotate(
110
+ # id: "id",
111
+ # request: {}
112
+ # )
113
+ #
94
114
  # @return [Auth0::Types::RotateConnectionsKeysResponseContent]
95
115
  def rotate(request_options: {}, **params)
96
116
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
117
+ path_param_names = %i[id]
118
+ body_params = params.except(*path_param_names)
119
+
97
120
  request = Auth0::Internal::JSON::Request.new(
98
121
  base_url: request_options[:base_url],
99
122
  method: "POST",
100
123
  path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/keys/rotate",
101
- body: params,
124
+ body: body_params,
102
125
  request_options: request_options
103
126
  )
104
127
  begin
@@ -108,7 +131,7 @@ module Auth0
108
131
  end
109
132
  code = response.code.to_i
110
133
  if code.between?(200, 299)
111
- Auth0::Types::RotateConnectionsKeysResponseContent.load(response.body)
134
+ (response.body.to_s.empty? ? nil : Auth0::Types::RotateConnectionsKeysResponseContent.load(response.body))
112
135
  else
113
136
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
114
137
  raise error_class.new(response.body, code: code)
@@ -23,6 +23,12 @@ module Auth0
23
23
  # @option params [String, nil] :from
24
24
  # @option params [Integer, nil] :take
25
25
  #
26
+ # @example
27
+ # client.connections.scim_configuration.list(
28
+ # from: "from",
29
+ # take: 1
30
+ # )
31
+ #
26
32
  # @return [Auth0::Types::ListSCIMConfigurationsResponseContent]
27
33
  def list(request_options: {}, **params)
28
34
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -50,7 +56,7 @@ module Auth0
50
56
  end
51
57
  code = response.code.to_i
52
58
  if code.between?(200, 299)
53
- parsed_response = Auth0::Types::ListSCIMConfigurationsResponseContent.load(response.body)
59
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListSCIMConfigurationsResponseContent.load(response.body))
54
60
  [parsed_response, response]
55
61
  else
56
62
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -70,6 +76,9 @@ module Auth0
70
76
  # @option request_options [Integer] :timeout_in_seconds
71
77
  # @option params [String] :id
72
78
  #
79
+ # @example
80
+ # client.connections.scim_configuration.get(id: "id")
81
+ #
73
82
  # @return [Auth0::Types::GetSCIMConfigurationResponseContent]
74
83
  def get(request_options: {}, **params)
75
84
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -86,7 +95,7 @@ module Auth0
86
95
  end
87
96
  code = response.code.to_i
88
97
  if code.between?(200, 299)
89
- Auth0::Types::GetSCIMConfigurationResponseContent.load(response.body)
98
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMConfigurationResponseContent.load(response.body))
90
99
  else
91
100
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
92
101
  raise error_class.new(response.body, code: code)
@@ -104,14 +113,23 @@ module Auth0
104
113
  # @option request_options [Integer] :timeout_in_seconds
105
114
  # @option params [String] :id
106
115
  #
116
+ # @example
117
+ # client.connections.scim_configuration.create(
118
+ # id: "id",
119
+ # request: {}
120
+ # )
121
+ #
107
122
  # @return [Auth0::Types::CreateSCIMConfigurationResponseContent]
108
123
  def create(request_options: {}, **params)
109
124
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
125
+ path_param_names = %i[id]
126
+ body_params = params.except(*path_param_names)
127
+
110
128
  request = Auth0::Internal::JSON::Request.new(
111
129
  base_url: request_options[:base_url],
112
130
  method: "POST",
113
131
  path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/scim-configuration",
114
- body: params,
132
+ body: body_params,
115
133
  request_options: request_options
116
134
  )
117
135
  begin
@@ -121,7 +139,7 @@ module Auth0
121
139
  end
122
140
  code = response.code.to_i
123
141
  if code.between?(200, 299)
124
- Auth0::Types::CreateSCIMConfigurationResponseContent.load(response.body)
142
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateSCIMConfigurationResponseContent.load(response.body))
125
143
  else
126
144
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
127
145
  raise error_class.new(response.body, code: code)
@@ -139,6 +157,9 @@ module Auth0
139
157
  # @option request_options [Integer] :timeout_in_seconds
140
158
  # @option params [String] :id
141
159
  #
160
+ # @example
161
+ # client.connections.scim_configuration.delete(id: "id")
162
+ #
142
163
  # @return [untyped]
143
164
  def delete(request_options: {}, **params)
144
165
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -171,6 +192,13 @@ module Auth0
171
192
  # @option request_options [Integer] :timeout_in_seconds
172
193
  # @option params [String] :id
173
194
  #
195
+ # @example
196
+ # client.connections.scim_configuration.update(
197
+ # id: "id",
198
+ # user_id_attribute: "user_id_attribute",
199
+ # mapping: [{}]
200
+ # )
201
+ #
174
202
  # @return [Auth0::Types::UpdateSCIMConfigurationResponseContent]
175
203
  def update(request_options: {}, **params)
176
204
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -192,7 +220,7 @@ module Auth0
192
220
  end
193
221
  code = response.code.to_i
194
222
  if code.between?(200, 299)
195
- Auth0::Types::UpdateSCIMConfigurationResponseContent.load(response.body)
223
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSCIMConfigurationResponseContent.load(response.body))
196
224
  else
197
225
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
198
226
  raise error_class.new(response.body, code: code)
@@ -210,6 +238,9 @@ module Auth0
210
238
  # @option request_options [Integer] :timeout_in_seconds
211
239
  # @option params [String] :id
212
240
  #
241
+ # @example
242
+ # client.connections.scim_configuration.get_default_mapping(id: "id")
243
+ #
213
244
  # @return [Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent]
214
245
  def get_default_mapping(request_options: {}, **params)
215
246
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -226,7 +257,7 @@ module Auth0
226
257
  end
227
258
  code = response.code.to_i
228
259
  if code.between?(200, 299)
229
- Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent.load(response.body)
260
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent.load(response.body))
230
261
  else
231
262
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
232
263
  raise error_class.new(response.body, code: code)
@@ -23,6 +23,9 @@ module Auth0
23
23
  # @option request_options [Integer] :timeout_in_seconds
24
24
  # @option params [String] :id
25
25
  #
26
+ # @example
27
+ # client.connections.scim_configuration.tokens.get(id: "id")
28
+ #
26
29
  # @return [Array[Auth0::Types::SCIMTokenItem]]
27
30
  def get(request_options: {}, **params)
28
31
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -39,7 +42,7 @@ module Auth0
39
42
  end
40
43
  code = response.code.to_i
41
44
  if code.between?(200, 299)
42
- Auth0::Types::GetSCIMTokensResponseContent.load(response.body)
45
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMTokensResponseContent.load(response.body))
43
46
  else
44
47
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
45
48
  raise error_class.new(response.body, code: code)
@@ -57,6 +60,9 @@ module Auth0
57
60
  # @option request_options [Integer] :timeout_in_seconds
58
61
  # @option params [String] :id
59
62
  #
63
+ # @example
64
+ # client.connections.scim_configuration.tokens.create(id: "id")
65
+ #
60
66
  # @return [Auth0::Types::CreateSCIMTokenResponseContent]
61
67
  def create(request_options: {}, **params)
62
68
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -78,7 +84,7 @@ module Auth0
78
84
  end
79
85
  code = response.code.to_i
80
86
  if code.between?(200, 299)
81
- Auth0::Types::CreateSCIMTokenResponseContent.load(response.body)
87
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateSCIMTokenResponseContent.load(response.body))
82
88
  else
83
89
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
84
90
  raise error_class.new(response.body, code: code)
@@ -97,6 +103,12 @@ module Auth0
97
103
  # @option params [String] :id
98
104
  # @option params [String] :token_id
99
105
  #
106
+ # @example
107
+ # client.connections.scim_configuration.tokens.delete(
108
+ # id: "id",
109
+ # token_id: "tokenId"
110
+ # )
111
+ #
100
112
  # @return [untyped]
101
113
  def delete(request_options: {}, **params)
102
114
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -24,6 +24,12 @@ module Auth0
24
24
  # @option params [String] :id
25
25
  # @option params [String] :email
26
26
  #
27
+ # @example
28
+ # client.connections.users.delete_by_email(
29
+ # id: "id",
30
+ # email: "email"
31
+ # )
32
+ #
27
33
  # @return [untyped]
28
34
  def delete_by_email(request_options: {}, **params)
29
35
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -24,6 +24,14 @@ module Auth0
24
24
  # @option params [Boolean, nil] :include_fields
25
25
  # @option params [String, nil] :sort
26
26
  #
27
+ # @example
28
+ # client.custom_domains.list(
29
+ # q: "q",
30
+ # fields: "fields",
31
+ # include_fields: true,
32
+ # sort: "sort"
33
+ # )
34
+ #
27
35
  # @return [Array[Auth0::Types::CustomDomain]]
28
36
  def list(request_options: {}, **params)
29
37
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -47,7 +55,7 @@ module Auth0
47
55
  end
48
56
  code = response.code.to_i
49
57
  if code.between?(200, 299)
50
- Auth0::Types::ListCustomDomainsResponseContent.load(response.body)
58
+ (response.body.to_s.empty? ? nil : Auth0::Types::ListCustomDomainsResponseContent.load(response.body))
51
59
  else
52
60
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
53
61
  raise error_class.new(response.body, code: code)
@@ -76,6 +84,12 @@ module Auth0
76
84
  # @option request_options [Hash{String => Object}] :additional_body_parameters
77
85
  # @option request_options [Integer] :timeout_in_seconds
78
86
  #
87
+ # @example
88
+ # client.custom_domains.create(
89
+ # domain: "domain",
90
+ # type: "auth0_managed_certs"
91
+ # )
92
+ #
79
93
  # @return [Auth0::Types::CreateCustomDomainResponseContent]
80
94
  def create(request_options: {}, **params)
81
95
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -93,7 +107,7 @@ module Auth0
93
107
  end
94
108
  code = response.code.to_i
95
109
  if code.between?(200, 299)
96
- Auth0::Types::CreateCustomDomainResponseContent.load(response.body)
110
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateCustomDomainResponseContent.load(response.body))
97
111
  else
98
112
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
99
113
  raise error_class.new(response.body, code: code)
@@ -110,6 +124,9 @@ module Auth0
110
124
  # @option request_options [Hash{String => Object}] :additional_body_parameters
111
125
  # @option request_options [Integer] :timeout_in_seconds
112
126
  #
127
+ # @example
128
+ # client.custom_domains.get_default
129
+ #
113
130
  # @return [Auth0::Types::GetDefaultDomainResponseContent]
114
131
  def get_default(request_options: {}, **_params)
115
132
  request = Auth0::Internal::JSON::Request.new(
@@ -125,7 +142,7 @@ module Auth0
125
142
  end
126
143
  code = response.code.to_i
127
144
  if code.between?(200, 299)
128
- Auth0::Types::GetDefaultDomainResponseContent.load(response.body)
145
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetDefaultDomainResponseContent.load(response.body))
129
146
  else
130
147
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
131
148
  raise error_class.new(response.body, code: code)
@@ -142,6 +159,9 @@ module Auth0
142
159
  # @option request_options [Hash{String => Object}] :additional_body_parameters
143
160
  # @option request_options [Integer] :timeout_in_seconds
144
161
  #
162
+ # @example
163
+ # client.custom_domains.set_default(domain: "domain")
164
+ #
145
165
  # @return [Auth0::Types::UpdateDefaultDomainResponseContent]
146
166
  def set_default(request_options: {}, **params)
147
167
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -159,7 +179,7 @@ module Auth0
159
179
  end
160
180
  code = response.code.to_i
161
181
  if code.between?(200, 299)
162
- Auth0::Types::UpdateDefaultDomainResponseContent.load(response.body)
182
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateDefaultDomainResponseContent.load(response.body))
163
183
  else
164
184
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
165
185
  raise error_class.new(response.body, code: code)
@@ -177,6 +197,9 @@ module Auth0
177
197
  # @option request_options [Integer] :timeout_in_seconds
178
198
  # @option params [String] :id
179
199
  #
200
+ # @example
201
+ # client.custom_domains.get(id: "id")
202
+ #
180
203
  # @return [Auth0::Types::GetCustomDomainResponseContent]
181
204
  def get(request_options: {}, **params)
182
205
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -193,7 +216,7 @@ module Auth0
193
216
  end
194
217
  code = response.code.to_i
195
218
  if code.between?(200, 299)
196
- Auth0::Types::GetCustomDomainResponseContent.load(response.body)
219
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetCustomDomainResponseContent.load(response.body))
197
220
  else
198
221
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
199
222
  raise error_class.new(response.body, code: code)
@@ -211,6 +234,9 @@ module Auth0
211
234
  # @option request_options [Integer] :timeout_in_seconds
212
235
  # @option params [String] :id
213
236
  #
237
+ # @example
238
+ # client.custom_domains.delete(id: "id")
239
+ #
214
240
  # @return [untyped]
215
241
  def delete(request_options: {}, **params)
216
242
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -275,6 +301,9 @@ module Auth0
275
301
  # @option request_options [Integer] :timeout_in_seconds
276
302
  # @option params [String] :id
277
303
  #
304
+ # @example
305
+ # client.custom_domains.update(id: "id")
306
+ #
278
307
  # @return [Auth0::Types::UpdateCustomDomainResponseContent]
279
308
  def update(request_options: {}, **params)
280
309
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -296,7 +325,7 @@ module Auth0
296
325
  end
297
326
  code = response.code.to_i
298
327
  if code.between?(200, 299)
299
- Auth0::Types::UpdateCustomDomainResponseContent.load(response.body)
328
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateCustomDomainResponseContent.load(response.body))
300
329
  else
301
330
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
302
331
  raise error_class.new(response.body, code: code)
@@ -314,6 +343,9 @@ module Auth0
314
343
  # @option request_options [Integer] :timeout_in_seconds
315
344
  # @option params [String] :id
316
345
  #
346
+ # @example
347
+ # client.custom_domains.test(id: "id")
348
+ #
317
349
  # @return [Auth0::Types::TestCustomDomainResponseContent]
318
350
  def test(request_options: {}, **params)
319
351
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -330,7 +362,7 @@ module Auth0
330
362
  end
331
363
  code = response.code.to_i
332
364
  if code.between?(200, 299)
333
- Auth0::Types::TestCustomDomainResponseContent.load(response.body)
365
+ (response.body.to_s.empty? ? nil : Auth0::Types::TestCustomDomainResponseContent.load(response.body))
334
366
  else
335
367
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
336
368
  raise error_class.new(response.body, code: code)
@@ -360,6 +392,9 @@ module Auth0
360
392
  # @option request_options [Integer] :timeout_in_seconds
361
393
  # @option params [String] :id
362
394
  #
395
+ # @example
396
+ # client.custom_domains.verify(id: "id")
397
+ #
363
398
  # @return [Auth0::Types::VerifyCustomDomainResponseContent]
364
399
  def verify(request_options: {}, **params)
365
400
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -376,7 +411,7 @@ module Auth0
376
411
  end
377
412
  code = response.code.to_i
378
413
  if code.between?(200, 299)
379
- Auth0::Types::VerifyCustomDomainResponseContent.load(response.body)
414
+ (response.body.to_s.empty? ? nil : Auth0::Types::VerifyCustomDomainResponseContent.load(response.body))
380
415
  else
381
416
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
382
417
  raise error_class.new(response.body, code: code)
@@ -29,6 +29,18 @@ module Auth0
29
29
  # @option params [String, nil] :client_id
30
30
  # @option params [Auth0::Types::DeviceCredentialTypeEnum, nil] :type
31
31
  #
32
+ # @example
33
+ # client.device_credentials.list(
34
+ # page: 1,
35
+ # per_page: 1,
36
+ # include_totals: true,
37
+ # fields: "fields",
38
+ # include_fields: true,
39
+ # user_id: "user_id",
40
+ # client_id: "client_id",
41
+ # type: "public_key"
42
+ # )
43
+ #
32
44
  # @return [Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent]
33
45
  def list(request_options: {}, **params)
34
46
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -63,7 +75,7 @@ module Auth0
63
75
  end
64
76
  code = response.code.to_i
65
77
  if code.between?(200, 299)
66
- parsed_response = Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent.load(response.body)
78
+ parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent.load(response.body))
67
79
  [parsed_response, response]
68
80
  else
69
81
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
@@ -86,6 +98,14 @@ module Auth0
86
98
  # @option request_options [Hash{String => Object}] :additional_body_parameters
87
99
  # @option request_options [Integer] :timeout_in_seconds
88
100
  #
101
+ # @example
102
+ # client.device_credentials.create_public_key(
103
+ # device_name: "device_name",
104
+ # type: "public_key",
105
+ # value: "value",
106
+ # device_id: "device_id"
107
+ # )
108
+ #
89
109
  # @return [Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent]
90
110
  def create_public_key(request_options: {}, **params)
91
111
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -103,7 +123,7 @@ module Auth0
103
123
  end
104
124
  code = response.code.to_i
105
125
  if code.between?(200, 299)
106
- Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent.load(response.body)
126
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent.load(response.body))
107
127
  else
108
128
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
109
129
  raise error_class.new(response.body, code: code)
@@ -121,6 +141,9 @@ module Auth0
121
141
  # @option request_options [Integer] :timeout_in_seconds
122
142
  # @option params [String] :id
123
143
  #
144
+ # @example
145
+ # client.device_credentials.delete(id: "id")
146
+ #
124
147
  # @return [untyped]
125
148
  def delete(request_options: {}, **params)
126
149
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -20,6 +20,9 @@ module Auth0
20
20
  # @option request_options [Hash{String => Object}] :additional_body_parameters
21
21
  # @option request_options [Integer] :timeout_in_seconds
22
22
  #
23
+ # @example
24
+ # client.email_templates.create(template: "verify_email")
25
+ #
23
26
  # @return [Auth0::Types::CreateEmailTemplateResponseContent]
24
27
  def create(request_options: {}, **params)
25
28
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -37,7 +40,7 @@ module Auth0
37
40
  end
38
41
  code = response.code.to_i
39
42
  if code.between?(200, 299)
40
- Auth0::Types::CreateEmailTemplateResponseContent.load(response.body)
43
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateEmailTemplateResponseContent.load(response.body))
41
44
  else
42
45
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
43
46
  raise error_class.new(response.body, code: code)
@@ -58,6 +61,9 @@ module Auth0
58
61
  # @option request_options [Integer] :timeout_in_seconds
59
62
  # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name
60
63
  #
64
+ # @example
65
+ # client.email_templates.get(template_name: "verify_email")
66
+ #
61
67
  # @return [Auth0::Types::GetEmailTemplateResponseContent]
62
68
  def get(request_options: {}, **params)
63
69
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -74,7 +80,7 @@ module Auth0
74
80
  end
75
81
  code = response.code.to_i
76
82
  if code.between?(200, 299)
77
- Auth0::Types::GetEmailTemplateResponseContent.load(response.body)
83
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetEmailTemplateResponseContent.load(response.body))
78
84
  else
79
85
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
80
86
  raise error_class.new(response.body, code: code)
@@ -92,6 +98,12 @@ module Auth0
92
98
  # @option request_options [Integer] :timeout_in_seconds
93
99
  # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name
94
100
  #
101
+ # @example
102
+ # client.email_templates.set(
103
+ # template_name: "verify_email",
104
+ # template: "verify_email"
105
+ # )
106
+ #
95
107
  # @return [Auth0::Types::SetEmailTemplateResponseContent]
96
108
  def set(request_options: {}, **params)
97
109
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -113,7 +125,7 @@ module Auth0
113
125
  end
114
126
  code = response.code.to_i
115
127
  if code.between?(200, 299)
116
- Auth0::Types::SetEmailTemplateResponseContent.load(response.body)
128
+ (response.body.to_s.empty? ? nil : Auth0::Types::SetEmailTemplateResponseContent.load(response.body))
117
129
  else
118
130
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
119
131
  raise error_class.new(response.body, code: code)
@@ -131,6 +143,9 @@ module Auth0
131
143
  # @option request_options [Integer] :timeout_in_seconds
132
144
  # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name
133
145
  #
146
+ # @example
147
+ # client.email_templates.update(template_name: "verify_email")
148
+ #
134
149
  # @return [Auth0::Types::UpdateEmailTemplateResponseContent]
135
150
  def update(request_options: {}, **params)
136
151
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -152,7 +167,7 @@ module Auth0
152
167
  end
153
168
  code = response.code.to_i
154
169
  if code.between?(200, 299)
155
- Auth0::Types::UpdateEmailTemplateResponseContent.load(response.body)
170
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateEmailTemplateResponseContent.load(response.body))
156
171
  else
157
172
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
158
173
  raise error_class.new(response.body, code: code)
@@ -25,6 +25,12 @@ module Auth0
25
25
  # @option params [String, nil] :fields
26
26
  # @option params [Boolean, nil] :include_fields
27
27
  #
28
+ # @example
29
+ # client.emails.provider.get(
30
+ # fields: "fields",
31
+ # include_fields: true
32
+ # )
33
+ #
28
34
  # @return [Auth0::Types::GetEmailProviderResponseContent]
29
35
  def get(request_options: {}, **params)
30
36
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -46,7 +52,7 @@ module Auth0
46
52
  end
47
53
  code = response.code.to_i
48
54
  if code.between?(200, 299)
49
- Auth0::Types::GetEmailProviderResponseContent.load(response.body)
55
+ (response.body.to_s.empty? ? nil : Auth0::Types::GetEmailProviderResponseContent.load(response.body))
50
56
  else
51
57
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
52
58
  raise error_class.new(response.body, code: code)
@@ -87,6 +93,14 @@ module Auth0
87
93
  # @option request_options [Hash{String => Object}] :additional_body_parameters
88
94
  # @option request_options [Integer] :timeout_in_seconds
89
95
  #
96
+ # @example
97
+ # client.emails.provider.create(
98
+ # name: "mailgun",
99
+ # credentials: {
100
+ # api_key: "api_key"
101
+ # }
102
+ # )
103
+ #
90
104
  # @return [Auth0::Types::CreateEmailProviderResponseContent]
91
105
  def create(request_options: {}, **params)
92
106
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -104,7 +118,7 @@ module Auth0
104
118
  end
105
119
  code = response.code.to_i
106
120
  if code.between?(200, 299)
107
- Auth0::Types::CreateEmailProviderResponseContent.load(response.body)
121
+ (response.body.to_s.empty? ? nil : Auth0::Types::CreateEmailProviderResponseContent.load(response.body))
108
122
  else
109
123
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
110
124
  raise error_class.new(response.body, code: code)
@@ -121,6 +135,9 @@ module Auth0
121
135
  # @option request_options [Hash{String => Object}] :additional_body_parameters
122
136
  # @option request_options [Integer] :timeout_in_seconds
123
137
  #
138
+ # @example
139
+ # client.emails.provider.delete
140
+ #
124
141
  # @return [untyped]
125
142
  def delete(request_options: {}, **_params)
126
143
  request = Auth0::Internal::JSON::Request.new(
@@ -176,6 +193,9 @@ module Auth0
176
193
  # @option request_options [Hash{String => Object}] :additional_body_parameters
177
194
  # @option request_options [Integer] :timeout_in_seconds
178
195
  #
196
+ # @example
197
+ # client.emails.provider.update
198
+ #
179
199
  # @return [Auth0::Types::UpdateEmailProviderResponseContent]
180
200
  def update(request_options: {}, **params)
181
201
  params = Auth0::Internal::Types::Utils.normalize_keys(params)
@@ -193,7 +213,7 @@ module Auth0
193
213
  end
194
214
  code = response.code.to_i
195
215
  if code.between?(200, 299)
196
- Auth0::Types::UpdateEmailProviderResponseContent.load(response.body)
216
+ (response.body.to_s.empty? ? nil : Auth0::Types::UpdateEmailProviderResponseContent.load(response.body))
197
217
  else
198
218
  error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
199
219
  raise error_class.new(response.body, code: code)