workos 2.16.0 → 3.0.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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +5 -14
  4. data/lib/workos/authentication_factor_and_challenge.rb +31 -0
  5. data/lib/workos/authentication_response.rb +27 -0
  6. data/lib/workos/client.rb +1 -1
  7. data/lib/workos/configuration.rb +1 -1
  8. data/lib/workos/invitation.rb +68 -0
  9. data/lib/workos/organization_membership.rb +50 -0
  10. data/lib/workos/sso.rb +1 -1
  11. data/lib/workos/types/invitation_struct.rb +20 -0
  12. data/lib/workos/types/magic_auth_challenge_struct.rb +12 -0
  13. data/lib/workos/types/organization_membership_struct.rb +15 -0
  14. data/lib/workos/types/provider_enum.rb +1 -0
  15. data/lib/workos/types/user_struct.rb +17 -0
  16. data/lib/workos/types.rb +9 -5
  17. data/lib/workos/user.rb +57 -0
  18. data/lib/workos/user_and_token.rb +29 -0
  19. data/lib/workos/user_management.rb +1008 -0
  20. data/lib/workos/user_response.rb +25 -0
  21. data/lib/workos/version.rb +1 -1
  22. data/lib/workos.rb +35 -28
  23. data/spec/lib/workos/sso_spec.rb +8 -8
  24. data/spec/lib/workos/user_management_spec.rb +1092 -0
  25. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/invalid.yml +84 -0
  26. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/valid.yml +82 -0
  27. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/invalid.yml +83 -0
  28. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/valid.yml +81 -0
  29. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/invalid.yml +82 -0
  30. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/valid.yml +82 -0
  31. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/invalid.yml +81 -0
  32. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/valid.yml +82 -0
  33. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/invalid.yml +82 -0
  34. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/valid.yml +82 -0
  35. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/invalid.yml +83 -0
  36. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/valid.yml +81 -0
  37. data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/invalid.yml +82 -0
  38. data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/valid.yml +82 -0
  39. data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/invalid.yml +83 -0
  40. data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml +82 -0
  41. data/spec/support/fixtures/vcr_cassettes/user_management/create_user_invalid.yml +83 -0
  42. data/spec/support/fixtures/vcr_cassettes/user_management/create_user_valid.yml +82 -0
  43. data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/invalid.yml +82 -0
  44. data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/valid.yml +78 -0
  45. data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/invalid.yml +82 -0
  46. data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/valid.yml +78 -0
  47. data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/invalid.yml +82 -0
  48. data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/valid.yml +82 -0
  49. data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/invalid.yml +82 -0
  50. data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/valid.yml +82 -0
  51. data/spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml +82 -0
  52. data/spec/support/fixtures/vcr_cassettes/user_management/get_user.yml +82 -0
  53. data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/invalid.yml +82 -0
  54. data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/valid.yml +82 -0
  55. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_after.yml +83 -0
  56. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_before.yml +83 -0
  57. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_limit.yml +83 -0
  58. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_no_options.yml +83 -0
  59. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml +83 -0
  60. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml +82 -0
  61. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml +82 -0
  62. data/spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml +82 -0
  63. data/spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml +82 -0
  64. data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml +82 -0
  65. data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml +82 -0
  66. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml +82 -0
  67. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/valid.yml +82 -0
  68. data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/invalid.yml +82 -0
  69. data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/valid.yml +82 -0
  70. data/spec/support/fixtures/vcr_cassettes/user_management/send_magic_auth_code/valid.yml +82 -0
  71. data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/invalid.yml +83 -0
  72. data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/valid.yml +82 -0
  73. data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/invalid.yml +82 -0
  74. data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/valid.yml +82 -0
  75. data/spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml +82 -0
  76. data/spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml +82 -0
  77. data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml +82 -0
  78. data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/valid.yml +82 -0
  79. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_code.yml +83 -0
  80. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_magic_auth_challenge.yml +82 -0
  81. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/valid.yml +82 -0
  82. data/workos.gemspec +0 -2
  83. metadata +132 -55
  84. data/bin/docs +0 -5
  85. data/docs/WorkOS/APIError.html +0 -160
  86. data/docs/WorkOS/AuditLog.html +0 -235
  87. data/docs/WorkOS/AuditTrail.html +0 -235
  88. data/docs/WorkOS/AuthenticationError.html +0 -160
  89. data/docs/WorkOS/Base.html +0 -287
  90. data/docs/WorkOS/Client.html +0 -504
  91. data/docs/WorkOS/InvalidRequestError.html +0 -160
  92. data/docs/WorkOS/Profile.html +0 -788
  93. data/docs/WorkOS/RequestError.html +0 -135
  94. data/docs/WorkOS/SSO.html +0 -691
  95. data/docs/WorkOS/Types/ProfileStruct.html +0 -135
  96. data/docs/WorkOS/Types/Provider.html +0 -135
  97. data/docs/WorkOS/Types.html +0 -128
  98. data/docs/WorkOS/WorkOSError.html +0 -447
  99. data/docs/WorkOS.html +0 -324
  100. data/docs/class_list.html +0 -51
  101. data/docs/css/common.css +0 -1
  102. data/docs/css/full_list.css +0 -58
  103. data/docs/css/style.css +0 -496
  104. data/docs/file.README.html +0 -252
  105. data/docs/file_list.html +0 -56
  106. data/docs/frames.html +0 -17
  107. data/docs/index.html +0 -250
  108. data/docs/js/app.js +0 -314
  109. data/docs/js/full_list.js +0 -216
  110. data/docs/js/jquery.js +0 -4
  111. data/docs/method_list.html +0 -267
  112. data/docs/top-level-namespace.html +0 -110
  113. data/lib/workos/audit_trail.rb +0 -111
  114. data/spec/lib/workos/audit_trail_spec.rb +0 -146
@@ -1,504 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: WorkOS::Client
8
-
9
- &mdash; Documentation by YARD 0.9.22
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "WorkOS::Client";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (C)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span>
41
- &raquo;
42
- <span class="title">Client</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Module: WorkOS::Client
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
- <dl>
73
- <dt>Extended by:</dt>
74
- <dd>T::Sig</dd>
75
- </dl>
76
-
77
-
78
-
79
- <dl>
80
- <dt>Includes:</dt>
81
- <dd>Kernel</dd>
82
- </dl>
83
-
84
-
85
-
86
-
87
- <dl>
88
- <dt>Included in:</dt>
89
- <dd><span class='object_link'><a href="AuditTrail.html" title="WorkOS::AuditTrail (module)">AuditTrail</a></span>, <span class='object_link'><a href="SSO.html" title="WorkOS::SSO (module)">SSO</a></span></dd>
90
- </dl>
91
-
92
-
93
-
94
- <dl>
95
- <dt>Defined in:</dt>
96
- <dd>lib/workos/client.rb</dd>
97
- </dl>
98
-
99
- </div>
100
-
101
- <h2>Overview</h2><div class="docstring">
102
- <div class="discussion">
103
-
104
- <p>A Net::HTTP based API client for interacting with the WorkOS API</p>
105
-
106
-
107
- </div>
108
- </div>
109
- <div class="tags">
110
-
111
-
112
- </div>
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
- <h2>
121
- Instance Method Summary
122
- <small><a href="#" class="summary_toggle">collapse</a></small>
123
- </h2>
124
-
125
- <ul class="summary">
126
-
127
- <li class="public ">
128
- <span class="summary_signature">
129
-
130
- <a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> &#x21d2; Object </a>
131
-
132
-
133
-
134
- </span>
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
- <span class="summary_desc"><div class='inline'></div></span>
145
-
146
- </li>
147
-
148
-
149
- <li class="public ">
150
- <span class="summary_signature">
151
-
152
- <a href="#execute_request-instance_method" title="#execute_request (instance method)">#<strong>execute_request</strong>(request:) &#x21d2; Object </a>
153
-
154
-
155
-
156
- </span>
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- <span class="summary_desc"><div class='inline'></div></span>
167
-
168
- </li>
169
-
170
-
171
- <li class="public ">
172
- <span class="summary_signature">
173
-
174
- <a href="#handle_error_response-instance_method" title="#handle_error_response (instance method)">#<strong>handle_error_response</strong>(response:) &#x21d2; Object </a>
175
-
176
-
177
-
178
- </span>
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
- <span class="summary_desc"><div class='inline'></div></span>
189
-
190
- </li>
191
-
192
-
193
- <li class="public ">
194
- <span class="summary_signature">
195
-
196
- <a href="#post_request-instance_method" title="#post_request (instance method)">#<strong>post_request</strong>(path:, body: nil) &#x21d2; Object </a>
197
-
198
-
199
-
200
- </span>
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'></div></span>
211
-
212
- </li>
213
-
214
-
215
- <li class="public ">
216
- <span class="summary_signature">
217
-
218
- <a href="#user_agent-instance_method" title="#user_agent (instance method)">#<strong>user_agent</strong> &#x21d2; Object </a>
219
-
220
-
221
-
222
- </span>
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
- <span class="summary_desc"><div class='inline'></div></span>
233
-
234
- </li>
235
-
236
-
237
- </ul>
238
-
239
-
240
-
241
-
242
-
243
-
244
- <div id="instance_method_details" class="method_details_list">
245
- <h2>Instance Method Details</h2>
246
-
247
-
248
- <div class="method_details first">
249
- <h3 class="signature first" id="client-instance_method">
250
-
251
- #<strong>client</strong> &#x21d2; <tt>Object</tt>
252
-
253
-
254
-
255
-
256
-
257
- </h3><table class="source_code">
258
- <tr>
259
- <td>
260
- <pre class="lines">
261
-
262
-
263
- 12
264
- 13
265
- 14
266
- 15
267
- 16
268
- 17
269
- 18
270
- 19</pre>
271
- </td>
272
- <td>
273
- <pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 12</span>
274
-
275
- <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
276
- <span class='kw'>return</span> <span class='ivar'>@client</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span>
277
-
278
- <span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorkOS.html#API_HOSTNAME-constant" title="WorkOS::API_HOSTNAME (constant)">API_HOSTNAME</a></span></span><span class='comma'>,</span> <span class='int'>443</span><span class='rparen'>)</span>
279
- <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_use_ssl'>use_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
280
-
281
- <span class='ivar'>@client</span>
282
- <span class='kw'>end</span></pre>
283
- </td>
284
- </tr>
285
- </table>
286
- </div>
287
-
288
- <div class="method_details ">
289
- <h3 class="signature " id="execute_request-instance_method">
290
-
291
- #<strong>execute_request</strong>(request:) &#x21d2; <tt>Object</tt>
292
-
293
-
294
-
295
-
296
-
297
- </h3><table class="source_code">
298
- <tr>
299
- <td>
300
- <pre class="lines">
301
-
302
-
303
- 22
304
- 23
305
- 24
306
- 25
307
- 26
308
- 27
309
- 28
310
- 29</pre>
311
- </td>
312
- <td>
313
- <pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 22</span>
314
-
315
- <span class='kw'>def</span> <span class='id identifier rubyid_execute_request'>execute_request</span><span class='lparen'>(</span><span class='label'>request:</span><span class='rparen'>)</span>
316
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
317
-
318
- <span class='id identifier rubyid_http_status'>http_status</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
319
- <span class='id identifier rubyid_handle_error_response'>handle_error_response</span><span class='lparen'>(</span><span class='label'>response:</span> <span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_http_status'>http_status</span> <span class='op'>&gt;=</span> <span class='int'>400</span>
320
-
321
- <span class='id identifier rubyid_response'>response</span>
322
- <span class='kw'>end</span></pre>
323
- </td>
324
- </tr>
325
- </table>
326
- </div>
327
-
328
- <div class="method_details ">
329
- <h3 class="signature " id="handle_error_response-instance_method">
330
-
331
- #<strong>handle_error_response</strong>(response:) &#x21d2; <tt>Object</tt>
332
-
333
-
334
-
335
-
336
-
337
- </h3><table class="source_code">
338
- <tr>
339
- <td>
340
- <pre class="lines">
341
-
342
-
343
- 54
344
- 55
345
- 56
346
- 57
347
- 58
348
- 59
349
- 60
350
- 61
351
- 62
352
- 63
353
- 64
354
- 65
355
- 66
356
- 67
357
- 68
358
- 69
359
- 70
360
- 71
361
- 72
362
- 73
363
- 74
364
- 75
365
- 76
366
- 77
367
- 78
368
- 79
369
- 80
370
- 81
371
- 82
372
- 83</pre>
373
- </td>
374
- <td>
375
- <pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 54</span>
376
-
377
- <span class='kw'>def</span> <span class='id identifier rubyid_handle_error_response'>handle_error_response</span><span class='lparen'>(</span><span class='label'>response:</span><span class='rparen'>)</span>
378
- <span class='id identifier rubyid_http_status'>http_status</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
379
- <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
380
-
381
- <span class='kw'>case</span> <span class='id identifier rubyid_http_status'>http_status</span>
382
- <span class='kw'>when</span> <span class='int'>400</span>
383
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="InvalidRequestError.html" title="WorkOS::InvalidRequestError (class)">InvalidRequestError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WorkOSError.html#initialize-instance_method" title="WorkOS::WorkOSError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
384
- <span class='label'>message:</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>message</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
385
- <span class='label'>http_status:</span> <span class='id identifier rubyid_http_status'>http_status</span><span class='comma'>,</span>
386
- <span class='label'>request_id:</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>x-request-id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
387
- <span class='rparen'>)</span>
388
- <span class='kw'>when</span> <span class='int'>401</span>
389
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="AuthenticationError.html" title="WorkOS::AuthenticationError (class)">AuthenticationError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WorkOSError.html#initialize-instance_method" title="WorkOS::WorkOSError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
390
- <span class='label'>message:</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>message</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
391
- <span class='label'>http_status:</span> <span class='id identifier rubyid_http_status'>http_status</span><span class='comma'>,</span>
392
- <span class='label'>request_id:</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>x-request-id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
393
- <span class='rparen'>)</span>
394
- <span class='kw'>when</span> <span class='int'>422</span>
395
- <span class='id identifier rubyid_errors'>errors</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>errors</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_error'>error</span><span class='op'>|</span>
396
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>field</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>code</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
397
- <span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>; </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
398
-
399
- <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>message</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_errors'>errors</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span>
400
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="InvalidRequestError.html" title="WorkOS::InvalidRequestError (class)">InvalidRequestError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WorkOSError.html#initialize-instance_method" title="WorkOS::WorkOSError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
401
- <span class='label'>message:</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
402
- <span class='label'>http_status:</span> <span class='id identifier rubyid_http_status'>http_status</span><span class='comma'>,</span>
403
- <span class='label'>request_id:</span> <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>x-request-id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
404
- <span class='rparen'>)</span>
405
- <span class='kw'>end</span>
406
- <span class='kw'>end</span></pre>
407
- </td>
408
- </tr>
409
- </table>
410
- </div>
411
-
412
- <div class="method_details ">
413
- <h3 class="signature " id="post_request-instance_method">
414
-
415
- #<strong>post_request</strong>(path:, body: nil) &#x21d2; <tt>Object</tt>
416
-
417
-
418
-
419
-
420
-
421
- </h3><table class="source_code">
422
- <tr>
423
- <td>
424
- <pre class="lines">
425
-
426
-
427
- 32
428
- 33
429
- 34
430
- 35
431
- 36
432
- 37</pre>
433
- </td>
434
- <td>
435
- <pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 32</span>
436
-
437
- <span class='kw'>def</span> <span class='id identifier rubyid_post_request'>post_request</span><span class='lparen'>(</span><span class='label'>path:</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
438
- <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Post</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
439
- <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span> <span class='kw'>if</span> <span class='id identifier rubyid_body'>body</span>
440
- <span class='id identifier rubyid_request'>request</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>User-Agent</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
441
- <span class='id identifier rubyid_request'>request</span>
442
- <span class='kw'>end</span></pre>
443
- </td>
444
- </tr>
445
- </table>
446
- </div>
447
-
448
- <div class="method_details ">
449
- <h3 class="signature " id="user_agent-instance_method">
450
-
451
- #<strong>user_agent</strong> &#x21d2; <tt>Object</tt>
452
-
453
-
454
-
455
-
456
-
457
- </h3><table class="source_code">
458
- <tr>
459
- <td>
460
- <pre class="lines">
461
-
462
-
463
- 40
464
- 41
465
- 42
466
- 43
467
- 44
468
- 45
469
- 46
470
- 47
471
- 48
472
- 49</pre>
473
- </td>
474
- <td>
475
- <pre class="code"><span class="info file"># File 'lib/workos/client.rb', line 40</span>
476
-
477
- <span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
478
- <span class='id identifier rubyid_engine'>engine</span> <span class='op'>=</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>RUBY_ENGINE</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='op'>::</span><span class='const'>RUBY_ENGINE</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Ruby</span><span class='tstring_end'>&#39;</span></span>
479
-
480
- <span class='lbracket'>[</span>
481
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>WorkOS</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
482
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_engine'>engine</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>RUBY_VERSION</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
483
- <span class='const'>RUBY_PLATFORM</span><span class='comma'>,</span>
484
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>v</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorkOS.html#VERSION-constant" title="WorkOS::VERSION (constant)">VERSION</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
485
- <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>; </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
486
- <span class='kw'>end</span></pre>
487
- </td>
488
- </tr>
489
- </table>
490
- </div>
491
-
492
- </div>
493
-
494
- </div>
495
-
496
- <div id="footer">
497
- Generated on Tue Apr 7 22:21:08 2020 by
498
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
499
- 0.9.22 (ruby-2.7.1).
500
- </div>
501
-
502
- </div>
503
- </body>
504
- </html>
@@ -1,160 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Exception: WorkOS::InvalidRequestError
8
-
9
- &mdash; Documentation by YARD 0.9.22
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "WorkOS::InvalidRequestError";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (I)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span>
41
- &raquo;
42
- <span class="title">InvalidRequestError</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Exception: WorkOS::InvalidRequestError
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="WorkOSError.html" title="WorkOS::WorkOSError (class)">WorkOSError</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">StandardError</li>
78
-
79
- <li class="next"><span class='object_link'><a href="WorkOSError.html" title="WorkOS::WorkOSError (class)">WorkOSError</a></span></li>
80
-
81
- <li class="next">WorkOS::InvalidRequestError</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <dl>
100
- <dt>Defined in:</dt>
101
- <dd>lib/workos/errors.rb</dd>
102
- </dl>
103
-
104
- </div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>InvalidRequestError is raised when a request is initiated with invalid parameters.</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div>
118
-
119
-
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary</h2>
124
-
125
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="WorkOSError.html" title="WorkOS::WorkOSError (class)">WorkOSError</a></span></h3>
126
- <p class="inherited"><span class='object_link'><a href="WorkOSError.html#http_status-instance_method" title="WorkOS::WorkOSError#http_status (method)">#http_status</a></span>, <span class='object_link'><a href="WorkOSError.html#request_id-instance_method" title="WorkOS::WorkOSError#request_id (method)">#request_id</a></span></p>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <h2>Method Summary</h2>
137
-
138
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="WorkOSError.html" title="WorkOS::WorkOSError (class)">WorkOSError</a></span></h3>
139
- <p class="inherited"><span class='object_link'><a href="WorkOSError.html#initialize-instance_method" title="WorkOS::WorkOSError#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="WorkOSError.html#to_s-instance_method" title="WorkOS::WorkOSError#to_s (method)">#to_s</a></span></p>
140
-
141
-
142
- <div id="constructor_details" class="method_details_list">
143
- <h2>Constructor Details</h2>
144
-
145
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="WorkOSError.html#initialize-instance_method" title="WorkOS::WorkOSError#initialize (method)">WorkOS::WorkOSError</a></span></p>
146
-
147
- </div>
148
-
149
-
150
- </div>
151
-
152
- <div id="footer">
153
- Generated on Tue Apr 7 22:21:08 2020 by
154
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.22 (ruby-2.7.1).
156
- </div>
157
-
158
- </div>
159
- </body>
160
- </html>