service_client 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/doc/ServiceClient/Base.html +781 -0
  4. data/doc/ServiceClient/Errors/BadGatewayError.html +159 -0
  5. data/doc/ServiceClient/Errors/BadRequestError.html +159 -0
  6. data/doc/ServiceClient/Errors/BaseError.html +359 -0
  7. data/doc/ServiceClient/Errors/BlockedByWindowsParentalControlsError.html +159 -0
  8. data/doc/ServiceClient/Errors/ClientClosedRequestError.html +159 -0
  9. data/doc/ServiceClient/Errors/ConflictError.html +159 -0
  10. data/doc/ServiceClient/Errors/EnhanceYourCalmError.html +159 -0
  11. data/doc/ServiceClient/Errors/ExpectationFailedError.html +159 -0
  12. data/doc/ServiceClient/Errors/FailedDependencyError.html +159 -0
  13. data/doc/ServiceClient/Errors/ForbiddenError.html +159 -0
  14. data/doc/ServiceClient/Errors/GatewayTimeoutError.html +159 -0
  15. data/doc/ServiceClient/Errors/GoneError.html +159 -0
  16. data/doc/ServiceClient/Errors/HTTPVersionNotSupportedError.html +159 -0
  17. data/doc/ServiceClient/Errors/InsufficientStorageError.html +159 -0
  18. data/doc/ServiceClient/Errors/InternalServerError.html +159 -0
  19. data/doc/ServiceClient/Errors/LengthRequiredError.html +159 -0
  20. data/doc/ServiceClient/Errors/LockedError.html +159 -0
  21. data/doc/ServiceClient/Errors/LoopDetectedError.html +159 -0
  22. data/doc/ServiceClient/Errors/MethodNotAllowedError.html +159 -0
  23. data/doc/ServiceClient/Errors/NetworkAuthenticationRequiredError.html +159 -0
  24. data/doc/ServiceClient/Errors/NetworkConnectTimeoutError.html +159 -0
  25. data/doc/ServiceClient/Errors/NetworkReadTimeoutError.html +159 -0
  26. data/doc/ServiceClient/Errors/NoResponseError.html +159 -0
  27. data/doc/ServiceClient/Errors/NotAcceptableError.html +159 -0
  28. data/doc/ServiceClient/Errors/NotExtendedError.html +159 -0
  29. data/doc/ServiceClient/Errors/NotFoundError.html +159 -0
  30. data/doc/ServiceClient/Errors/NotImplementedError.html +159 -0
  31. data/doc/ServiceClient/Errors/PaymentRequiredError.html +159 -0
  32. data/doc/ServiceClient/Errors/PreconditionFailedError.html +159 -0
  33. data/doc/ServiceClient/Errors/PreconditionRequiredError.html +159 -0
  34. data/doc/ServiceClient/Errors/ProxyAuthenticationRequiredError.html +159 -0
  35. data/doc/ServiceClient/Errors/RequestEntityTooLargeError.html +159 -0
  36. data/doc/ServiceClient/Errors/RequestHeaderFieldsTooLargeError.html +159 -0
  37. data/doc/ServiceClient/Errors/RequestTimeoutError.html +159 -0
  38. data/doc/ServiceClient/Errors/RequestURITooLongError.html +159 -0
  39. data/doc/ServiceClient/Errors/RequestedRangeNotSatisfiableError.html +159 -0
  40. data/doc/ServiceClient/Errors/RetryWithError.html +159 -0
  41. data/doc/ServiceClient/Errors/ServiceUnavailableError.html +159 -0
  42. data/doc/ServiceClient/Errors/TooManyRequestsError.html +159 -0
  43. data/doc/ServiceClient/Errors/UnauthorizedError.html +159 -0
  44. data/doc/ServiceClient/Errors/UnavailableForLegalReasonsError.html +159 -0
  45. data/doc/ServiceClient/Errors/UnprocessableEntityError.html +159 -0
  46. data/doc/ServiceClient/Errors/UnsupportedMediaTypeError.html +159 -0
  47. data/doc/ServiceClient/Errors/UpgradeRequiredError.html +159 -0
  48. data/doc/ServiceClient/Errors/VariantAlsoNegotiatesError.html +159 -0
  49. data/doc/ServiceClient/Errors.html +325 -0
  50. data/doc/ServiceClient/ParamsRequired.html +147 -0
  51. data/doc/ServiceClient/Response.html +793 -0
  52. data/doc/ServiceClient.html +146 -0
  53. data/doc/_index.html +576 -0
  54. data/doc/class_list.html +51 -0
  55. data/doc/css/common.css +1 -0
  56. data/doc/css/full_list.css +58 -0
  57. data/doc/css/style.css +497 -0
  58. data/doc/file.README.html +243 -0
  59. data/doc/file_list.html +56 -0
  60. data/doc/frames.html +17 -0
  61. data/doc/index.html +216 -233
  62. data/doc/js/app.js +314 -0
  63. data/doc/js/full_list.js +216 -0
  64. data/doc/js/jquery.js +4 -0
  65. data/doc/method_list.html +171 -0
  66. data/doc/top-level-namespace.html +110 -0
  67. data/lib/service_client/base.rb +83 -23
  68. data/lib/service_client/errors.rb +18 -6
  69. data/lib/service_client/response.rb +24 -7
  70. data/lib/service_client/version.rb +1 -1
  71. metadata +65 -2
@@ -0,0 +1,793 @@
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
+ Class: ServiceClient::Response
8
+
9
+ &mdash; Documentation by YARD 0.9.28
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 = "ServiceClient::Response";
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 (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../ServiceClient.html" title="ServiceClient (module)">ServiceClient</a></span></span>
41
+ &raquo;
42
+ <span class="title">Response</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>Class: ServiceClient::Response
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">ServiceClient::Response</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd><span class='object_link'><a href="Errors.html" title="ServiceClient::Errors (module)">Errors</a></span></dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/service_client/response.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>The Response class encapsulates the HTTP response received by the ServiceClient gem.</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+ <h2>Constant Summary</h2>
122
+
123
+ <h3 class="inherited">Constants included
124
+ from <span class='object_link'><a href="Errors.html" title="ServiceClient::Errors (module)">Errors</a></span></h3>
125
+ <p class="inherited"><span class='object_link'><a href="Errors.html#ERRORS-constant" title="ServiceClient::Errors::ERRORS (constant)">Errors::ERRORS</a></span></p>
126
+
127
+
128
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#code-instance_method" title="#code (instance method)">#<strong>code</strong> &#x21d2; Integer </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+
142
+
143
+ <span class="note title readonly">readonly</span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"><div class='inline'>
154
+ <p>The HTTP status code of the response.</p>
155
+ </div></span>
156
+
157
+ </li>
158
+
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> &#x21d2; Hash, ... </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+ <span class="note title readonly">readonly</span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <span class="summary_desc"><div class='inline'>
183
+ <p>The parsed body of the response.</p>
184
+ </div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#headers-instance_method" title="#headers (instance method)">#<strong>headers</strong> &#x21d2; Hash </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+ <span class="note title readonly">readonly</span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <span class="summary_desc"><div class='inline'>
212
+ <p>The HTTP headers of the response.</p>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ </ul>
219
+
220
+
221
+
222
+
223
+
224
+ <h2>
225
+ Class Method Summary
226
+ <small><a href="#" class="summary_toggle">collapse</a></small>
227
+ </h2>
228
+
229
+ <ul class="summary">
230
+
231
+ <li class="public ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#call-class_method" title="call (class method)">.<strong>call</strong>(response) &#x21d2; ServiceClient::Response </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'>
249
+ <p>Initializes a new instance of Response and calls it to determine success or failure.</p>
250
+ </div></span>
251
+
252
+ </li>
253
+
254
+
255
+ </ul>
256
+
257
+ <h2>
258
+ Instance Method Summary
259
+ <small><a href="#" class="summary_toggle">collapse</a></small>
260
+ </h2>
261
+
262
+ <ul class="summary">
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#call-instance_method" title="#call (instance method)">#<strong>call</strong> &#x21d2; ServiceClient::Response </a>
268
+
269
+
270
+
271
+ </span>
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+ <span class="summary_desc"><div class='inline'>
282
+ <p>Determines whether the response was successful or not.</p>
283
+ </div></span>
284
+
285
+ </li>
286
+
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(response) &#x21d2; Response </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+ <span class="note title constructor">constructor</span>
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+ <span class="summary_desc"><div class='inline'>
308
+ <p>Initializes a new instance of Response with the given HTTP response object.</p>
309
+ </div></span>
310
+
311
+ </li>
312
+
313
+
314
+ </ul>
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Errors.html" title="ServiceClient::Errors (module)">Errors</a></span></h3>
327
+ <p class="inherited"><span class='object_link'><a href="Errors.html#raise_error-instance_method" title="ServiceClient::Errors#raise_error (method)">#raise_error</a></span></p>
328
+ <div id="constructor_details" class="method_details_list">
329
+ <h2>Constructor Details</h2>
330
+
331
+ <div class="method_details first">
332
+ <h3 class="signature first" id="initialize-instance_method">
333
+
334
+ #<strong>initialize</strong>(response) &#x21d2; <tt><span class='object_link'><a href="" title="ServiceClient::Response (class)">Response</a></span></tt>
335
+
336
+
337
+
338
+
339
+
340
+ </h3><div class="docstring">
341
+ <div class="discussion">
342
+
343
+ <p>Initializes a new instance of Response with the given HTTP response object.</p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+ <p class="tag_title">Parameters:</p>
350
+ <ul class="param">
351
+
352
+ <li>
353
+
354
+ <span class='name'>response</span>
355
+
356
+
357
+ <span class='type'>(<tt>HTTParty::Response</tt>)</span>
358
+
359
+
360
+
361
+ &mdash;
362
+ <div class='inline'>
363
+ <p>The HTTP response object.</p>
364
+ </div>
365
+
366
+ </li>
367
+
368
+ </ul>
369
+
370
+
371
+ </div><table class="source_code">
372
+ <tr>
373
+ <td>
374
+ <pre class="lines">
375
+
376
+
377
+ 19
378
+ 20
379
+ 21
380
+ 22
381
+ 23</pre>
382
+ </td>
383
+ <td>
384
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 19</span>
385
+
386
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
387
+ <span class='ivar'>@code</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>
388
+ <span class='ivar'>@data</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
389
+ <span class='ivar'>@headers</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+ </div>
397
+
398
+ <div id="instance_attr_details" class="attr_details">
399
+ <h2>Instance Attribute Details</h2>
400
+
401
+
402
+ <span id=""></span>
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="code-instance_method">
405
+
406
+ #<strong>code</strong> &#x21d2; <tt>Integer</tt> <span class="extras">(readonly)</span>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><div class="docstring">
413
+ <div class="discussion">
414
+
415
+ <p>The HTTP status code of the response.</p>
416
+
417
+
418
+ </div>
419
+ </div>
420
+ <div class="tags">
421
+
422
+ <p class="tag_title">Returns:</p>
423
+ <ul class="return">
424
+
425
+ <li>
426
+
427
+
428
+ <span class='type'>(<tt>Integer</tt>)</span>
429
+
430
+
431
+
432
+ &mdash;
433
+ <div class='inline'>
434
+ <p>the current value of code</p>
435
+ </div>
436
+
437
+ </li>
438
+
439
+ </ul>
440
+
441
+ </div><table class="source_code">
442
+ <tr>
443
+ <td>
444
+ <pre class="lines">
445
+
446
+
447
+ 11
448
+ 12
449
+ 13</pre>
450
+ </td>
451
+ <td>
452
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 11</span>
453
+
454
+ <span class='kw'>def</span> <span class='id identifier rubyid_code'>code</span>
455
+ <span class='ivar'>@code</span>
456
+ <span class='kw'>end</span></pre>
457
+ </td>
458
+ </tr>
459
+ </table>
460
+ </div>
461
+
462
+
463
+ <span id=""></span>
464
+ <div class="method_details ">
465
+ <h3 class="signature " id="data-instance_method">
466
+
467
+ #<strong>data</strong> &#x21d2; <tt>Hash</tt>, ... <span class="extras">(readonly)</span>
468
+
469
+
470
+
471
+
472
+
473
+ </h3><div class="docstring">
474
+ <div class="discussion">
475
+
476
+ <p>The parsed body of the response.</p>
477
+
478
+
479
+ </div>
480
+ </div>
481
+ <div class="tags">
482
+
483
+ <p class="tag_title">Returns:</p>
484
+ <ul class="return">
485
+
486
+ <li>
487
+
488
+
489
+ <span class='type'>(<tt>Hash</tt>, <tt>Array</tt>, <tt>String</tt>)</span>
490
+
491
+
492
+
493
+ &mdash;
494
+ <div class='inline'>
495
+ <p>the current value of data</p>
496
+ </div>
497
+
498
+ </li>
499
+
500
+ </ul>
501
+
502
+ </div><table class="source_code">
503
+ <tr>
504
+ <td>
505
+ <pre class="lines">
506
+
507
+
508
+ 11
509
+ 12
510
+ 13</pre>
511
+ </td>
512
+ <td>
513
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 11</span>
514
+
515
+ <span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
516
+ <span class='ivar'>@data</span>
517
+ <span class='kw'>end</span></pre>
518
+ </td>
519
+ </tr>
520
+ </table>
521
+ </div>
522
+
523
+
524
+ <span id=""></span>
525
+ <div class="method_details ">
526
+ <h3 class="signature " id="headers-instance_method">
527
+
528
+ #<strong>headers</strong> &#x21d2; <tt>Hash</tt> <span class="extras">(readonly)</span>
529
+
530
+
531
+
532
+
533
+
534
+ </h3><div class="docstring">
535
+ <div class="discussion">
536
+
537
+ <p>The HTTP headers of the response.</p>
538
+
539
+
540
+ </div>
541
+ </div>
542
+ <div class="tags">
543
+
544
+ <p class="tag_title">Returns:</p>
545
+ <ul class="return">
546
+
547
+ <li>
548
+
549
+
550
+ <span class='type'>(<tt>Hash</tt>)</span>
551
+
552
+
553
+
554
+ &mdash;
555
+ <div class='inline'>
556
+ <p>the current value of headers</p>
557
+ </div>
558
+
559
+ </li>
560
+
561
+ </ul>
562
+
563
+ </div><table class="source_code">
564
+ <tr>
565
+ <td>
566
+ <pre class="lines">
567
+
568
+
569
+ 11
570
+ 12
571
+ 13</pre>
572
+ </td>
573
+ <td>
574
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 11</span>
575
+
576
+ <span class='kw'>def</span> <span class='id identifier rubyid_headers'>headers</span>
577
+ <span class='ivar'>@headers</span>
578
+ <span class='kw'>end</span></pre>
579
+ </td>
580
+ </tr>
581
+ </table>
582
+ </div>
583
+
584
+ </div>
585
+
586
+
587
+ <div id="class_method_details" class="method_details_list">
588
+ <h2>Class Method Details</h2>
589
+
590
+
591
+ <div class="method_details first">
592
+ <h3 class="signature first" id="call-class_method">
593
+
594
+ .<strong>call</strong>(response) &#x21d2; <tt><span class='object_link'><a href="" title="ServiceClient::Response (class)">ServiceClient::Response</a></span></tt>
595
+
596
+
597
+
598
+
599
+
600
+ </h3><div class="docstring">
601
+ <div class="discussion">
602
+
603
+ <p>Initializes a new instance of Response and calls it to determine success or failure.</p>
604
+
605
+
606
+ </div>
607
+ </div>
608
+ <div class="tags">
609
+ <p class="tag_title">Parameters:</p>
610
+ <ul class="param">
611
+
612
+ <li>
613
+
614
+ <span class='name'>response</span>
615
+
616
+
617
+ <span class='type'>(<tt>HTTParty::Response</tt>)</span>
618
+
619
+
620
+
621
+ &mdash;
622
+ <div class='inline'>
623
+ <p>The HTTP response object.</p>
624
+ </div>
625
+
626
+ </li>
627
+
628
+ </ul>
629
+
630
+ <p class="tag_title">Returns:</p>
631
+ <ul class="return">
632
+
633
+ <li>
634
+
635
+
636
+ <span class='type'>(<tt><span class='object_link'><a href="" title="ServiceClient::Response (class)">ServiceClient::Response</a></span></tt>)</span>
637
+
638
+
639
+
640
+ &mdash;
641
+ <div class='inline'>
642
+ <p>Returns itself if the response was successful.</p>
643
+ </div>
644
+
645
+ </li>
646
+
647
+ </ul>
648
+ <p class="tag_title">Raises:</p>
649
+ <ul class="raise">
650
+
651
+ <li>
652
+
653
+
654
+ <span class='type'>(<tt>ServiceClient::Error</tt>)</span>
655
+
656
+
657
+
658
+ &mdash;
659
+ <div class='inline'>
660
+ <p>Raises an error with the response code and object if the response was unsuccessful.</p>
661
+ </div>
662
+
663
+ </li>
664
+
665
+ </ul>
666
+
667
+ </div><table class="source_code">
668
+ <tr>
669
+ <td>
670
+ <pre class="lines">
671
+
672
+
673
+ 44
674
+ 45
675
+ 46</pre>
676
+ </td>
677
+ <td>
678
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 44</span>
679
+
680
+ <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
681
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
682
+ <span class='kw'>end</span></pre>
683
+ </td>
684
+ </tr>
685
+ </table>
686
+ </div>
687
+
688
+ </div>
689
+
690
+ <div id="instance_method_details" class="method_details_list">
691
+ <h2>Instance Method Details</h2>
692
+
693
+
694
+ <div class="method_details first">
695
+ <h3 class="signature first" id="call-instance_method">
696
+
697
+ #<strong>call</strong> &#x21d2; <tt><span class='object_link'><a href="" title="ServiceClient::Response (class)">ServiceClient::Response</a></span></tt>
698
+
699
+
700
+
701
+
702
+
703
+ </h3><div class="docstring">
704
+ <div class="discussion">
705
+
706
+ <p>Determines whether the response was successful or not.</p>
707
+
708
+
709
+ </div>
710
+ </div>
711
+ <div class="tags">
712
+
713
+ <p class="tag_title">Returns:</p>
714
+ <ul class="return">
715
+
716
+ <li>
717
+
718
+
719
+ <span class='type'>(<tt><span class='object_link'><a href="" title="ServiceClient::Response (class)">ServiceClient::Response</a></span></tt>)</span>
720
+
721
+
722
+
723
+ &mdash;
724
+ <div class='inline'>
725
+ <p>Returns itself if the response was successful.</p>
726
+ </div>
727
+
728
+ </li>
729
+
730
+ </ul>
731
+ <p class="tag_title">Raises:</p>
732
+ <ul class="raise">
733
+
734
+ <li>
735
+
736
+
737
+ <span class='type'>(<tt>ServiceClient::Error</tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'>
743
+ <p>Raises an error with the response code and object if the response was unsuccessful.</p>
744
+ </div>
745
+
746
+ </li>
747
+
748
+ </ul>
749
+
750
+ </div><table class="source_code">
751
+ <tr>
752
+ <td>
753
+ <pre class="lines">
754
+
755
+
756
+ 29
757
+ 30
758
+ 31
759
+ 32
760
+ 33
761
+ 34
762
+ 35
763
+ 36</pre>
764
+ </td>
765
+ <td>
766
+ <pre class="code"><span class="info file"># File 'lib/service_client/response.rb', line 29</span>
767
+
768
+ <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
769
+ <span class='kw'>case</span> <span class='id identifier rubyid_code'>code</span>
770
+ <span class='kw'>when</span> <span class='int'>200</span><span class='op'>..</span><span class='int'>299</span>
771
+ <span class='kw'>self</span>
772
+ <span class='kw'>else</span>
773
+ <span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
774
+ <span class='kw'>end</span>
775
+ <span class='kw'>end</span></pre>
776
+ </td>
777
+ </tr>
778
+ </table>
779
+ </div>
780
+
781
+ </div>
782
+
783
+ </div>
784
+
785
+ <div id="footer">
786
+ Generated on Thu Feb 23 08:39:00 2023 by
787
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
788
+ 0.9.28 (ruby-2.7.1).
789
+ </div>
790
+
791
+ </div>
792
+ </body>
793
+ </html>