venice 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -22
- data/README.md +1 -0
- data/coverage/index.html +749 -526
- data/lib/venice/client.rb +11 -1
- data/lib/venice/in_app_receipt.rb +15 -1
- data/lib/venice/pending_renewal_info.rb +4 -0
- data/lib/venice/receipt.rb +17 -0
- data/lib/venice/version.rb +1 -1
- data/spec/fixtures/receipt_expired_cancelled.json +56 -0
- data/spec/fixtures/receipt_not_expired_cancelled.json +51 -0
- data/spec/in_app_receipt_spec.rb +4 -0
- data/spec/pending_renewal_info_spec.rb +1 -0
- data/spec/receipt_spec.rb +108 -57
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d437ee9b5b0c0d779bb78aeb916f1f2d03fa3ad5b68f141764a942c710e862e
|
4
|
+
data.tar.gz: 0fba0451cbb2fa15be9eb3fb326d50116a0d91089c3200ab75f54421a033dc82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b860ba4b492b78a31387834bf3d8c98b6a21e5a0f131f9e154367ff5eaf02e126858aa8d9f6ae46508c8c7b84d17a9f83e396a5967b261be541be070271d53
|
7
|
+
data.tar.gz: 9df20d187ad408edcaa8d97fded3d35d4c7a35f5877390b5822102e80d7fbaa06ab22fd65d5a14e9032f5c29e61f29c8830f7c05d859baaad98777b51ce27c7c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
venice (0.
|
4
|
+
venice (0.6.0)
|
5
5
|
commander (~> 4.1)
|
6
6
|
json
|
7
7
|
terminal-table (~> 1.4)
|
@@ -9,37 +9,37 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
commander (4.4.
|
13
|
-
highline (~>
|
12
|
+
commander (4.4.7)
|
13
|
+
highline (~> 2.0.0)
|
14
14
|
diff-lcs (1.3)
|
15
|
-
docile (1.3.
|
16
|
-
highline (
|
17
|
-
json (2.
|
18
|
-
rake (
|
19
|
-
rspec (3.
|
20
|
-
rspec-core (~> 3.
|
21
|
-
rspec-expectations (~> 3.
|
22
|
-
rspec-mocks (~> 3.
|
23
|
-
rspec-core (3.
|
24
|
-
rspec-support (~> 3.
|
25
|
-
rspec-expectations (3.
|
15
|
+
docile (1.3.2)
|
16
|
+
highline (2.0.3)
|
17
|
+
json (2.2.0)
|
18
|
+
rake (13.0.0)
|
19
|
+
rspec (3.9.0)
|
20
|
+
rspec-core (~> 3.9.0)
|
21
|
+
rspec-expectations (~> 3.9.0)
|
22
|
+
rspec-mocks (~> 3.9.0)
|
23
|
+
rspec-core (3.9.0)
|
24
|
+
rspec-support (~> 3.9.0)
|
25
|
+
rspec-expectations (3.9.0)
|
26
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.
|
28
|
-
rspec-its (1.
|
27
|
+
rspec-support (~> 3.9.0)
|
28
|
+
rspec-its (1.3.0)
|
29
29
|
rspec-core (>= 3.0.0)
|
30
30
|
rspec-expectations (>= 3.0.0)
|
31
|
-
rspec-mocks (3.
|
31
|
+
rspec-mocks (3.9.0)
|
32
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.
|
34
|
-
rspec-support (3.
|
35
|
-
simplecov (0.
|
33
|
+
rspec-support (~> 3.9.0)
|
34
|
+
rspec-support (3.9.0)
|
35
|
+
simplecov (0.17.1)
|
36
36
|
docile (~> 1.1)
|
37
37
|
json (>= 1.8, < 3)
|
38
38
|
simplecov-html (~> 0.10.0)
|
39
39
|
simplecov-html (0.10.2)
|
40
40
|
terminal-table (1.8.0)
|
41
41
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
42
|
-
unicode-display_width (1.
|
42
|
+
unicode-display_width (1.6.0)
|
43
43
|
|
44
44
|
PLATFORMS
|
45
45
|
ruby
|
@@ -52,4 +52,4 @@ DEPENDENCIES
|
|
52
52
|
venice!
|
53
53
|
|
54
54
|
BUNDLED WITH
|
55
|
-
|
55
|
+
2.0.2
|
data/README.md
CHANGED
@@ -86,6 +86,7 @@ Venice also comes with the `iap` binary, which provides a convenient way to veri
|
|
86
86
|
| - web_order_line_item_id | 1000000000000001 |
|
87
87
|
| - version_external_identifier | |
|
88
88
|
| - is_trial_period | true |
|
89
|
+
| - is_in_intro_offer_period | true |
|
89
90
|
+--------------------------------+------------------------------------+
|
90
91
|
|
91
92
|
|
data/coverage/index.html
CHANGED
@@ -14,27 +14,27 @@
|
|
14
14
|
<img src="./assets/0.10.2/loading.gif" alt="loading"/>
|
15
15
|
</div>
|
16
16
|
<div id="wrapper" style="display:none;">
|
17
|
-
<div class="timestamp">Generated <abbr class="timeago" title="
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2019-11-09T13:19:49+03:00">2019-11-09T13:19:49+03:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
21
21
|
<div class="file_list_container" id="AllFiles">
|
22
22
|
<h2>
|
23
23
|
<span class="group_name">All Files</span>
|
24
|
-
(<span class="covered_percent"><span class="yellow">
|
24
|
+
(<span class="covered_percent"><span class="yellow">87.39%</span></span>
|
25
25
|
covered at
|
26
26
|
<span class="covered_strength">
|
27
27
|
<span class="green">
|
28
|
-
|
28
|
+
5.55
|
29
29
|
</span>
|
30
30
|
</span> hits/line)
|
31
31
|
</h2>
|
32
32
|
<a name="AllFiles"></a>
|
33
33
|
<div>
|
34
|
-
<b>
|
35
|
-
<b>
|
36
|
-
<span class="green"><b>
|
37
|
-
<span class="red"><b>
|
34
|
+
<b>5</b> files in total.
|
35
|
+
<b>238</b> relevant lines.
|
36
|
+
<span class="green"><b>208</b> lines covered</span> and
|
37
|
+
<span class="red"><b>30</b> lines missed </span>
|
38
38
|
</div>
|
39
39
|
<table class="file_list">
|
40
40
|
<thead>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<tbody>
|
52
52
|
|
53
53
|
<tr>
|
54
|
-
<td class="strong"><a href="#
|
54
|
+
<td class="strong"><a href="#175f5aad0793e9750ae8298148ee6c32946b63ae" class="src_link" title="lib/venice.rb">lib/venice.rb</a></td>
|
55
55
|
<td class="green strong">100.0 %</td>
|
56
56
|
<td>5</td>
|
57
57
|
<td>5</td>
|
@@ -61,53 +61,43 @@
|
|
61
61
|
</tr>
|
62
62
|
|
63
63
|
<tr>
|
64
|
-
<td class="strong"><a href="#
|
65
|
-
<td class="
|
66
|
-
<td>
|
67
|
-
<td>
|
68
|
-
<td>
|
69
|
-
<td>
|
70
|
-
<td>
|
64
|
+
<td class="strong"><a href="#d79fadfe1306623a10822709e775b8c021f4fc4e" class="src_link" title="lib/venice/client.rb">lib/venice/client.rb</a></td>
|
65
|
+
<td class="yellow strong">86.15 %</td>
|
66
|
+
<td>117</td>
|
67
|
+
<td>65</td>
|
68
|
+
<td>56</td>
|
69
|
+
<td>9</td>
|
70
|
+
<td>4.5</td>
|
71
71
|
</tr>
|
72
72
|
|
73
73
|
<tr>
|
74
|
-
<td class="strong"><a href="#
|
75
|
-
<td class="green strong">97.
|
76
|
-
<td>
|
77
|
-
<td>
|
78
|
-
<td>
|
74
|
+
<td class="strong"><a href="#080477ce0f6d0348fc87b2c6eb5ce94e3b5da4cd" class="src_link" title="lib/venice/in_app_receipt.rb">lib/venice/in_app_receipt.rb</a></td>
|
75
|
+
<td class="green strong">97.92 %</td>
|
76
|
+
<td>121</td>
|
77
|
+
<td>48</td>
|
78
|
+
<td>47</td>
|
79
79
|
<td>1</td>
|
80
|
-
<td>
|
80
|
+
<td>11.6</td>
|
81
81
|
</tr>
|
82
82
|
|
83
83
|
<tr>
|
84
|
-
<td class="strong"><a href="#
|
85
|
-
<td class="green strong">
|
86
|
-
<td>
|
87
|
-
<td>
|
88
|
-
<td>
|
84
|
+
<td class="strong"><a href="#17a12c36d26ef47e82b8c4a1684d8e945c9a9e89" class="src_link" title="lib/venice/pending_renewal_info.rb">lib/venice/pending_renewal_info.rb</a></td>
|
85
|
+
<td class="green strong">96.0 %</td>
|
86
|
+
<td>68</td>
|
87
|
+
<td>25</td>
|
88
|
+
<td>24</td>
|
89
89
|
<td>1</td>
|
90
|
-
<td>3.
|
91
|
-
</tr>
|
92
|
-
|
93
|
-
<tr>
|
94
|
-
<td class="strong"><a href="#77ad70939c4d9b01595773040694e97b058d41a1" class="src_link" title="lib/venice/receipt.rb">lib/venice/receipt.rb</a></td>
|
95
|
-
<td class="red strong">75.58 %</td>
|
96
|
-
<td>171</td>
|
97
|
-
<td>86</td>
|
98
|
-
<td>65</td>
|
99
|
-
<td>21</td>
|
100
|
-
<td>2.7</td>
|
90
|
+
<td>3.5</td>
|
101
91
|
</tr>
|
102
92
|
|
103
93
|
<tr>
|
104
|
-
<td class="strong"><a href="#
|
105
|
-
<td class="
|
106
|
-
<td>
|
107
|
-
<td>
|
108
|
-
<td>
|
109
|
-
<td>
|
110
|
-
<td>
|
94
|
+
<td class="strong"><a href="#10dfdb14e321a7bb364075307e5a80a2a62317af" class="src_link" title="lib/venice/receipt.rb">lib/venice/receipt.rb</a></td>
|
95
|
+
<td class="red strong">80.0 %</td>
|
96
|
+
<td>188</td>
|
97
|
+
<td>95</td>
|
98
|
+
<td>76</td>
|
99
|
+
<td>19</td>
|
100
|
+
<td>4.0</td>
|
111
101
|
</tr>
|
112
102
|
|
113
103
|
</tbody>
|
@@ -119,14 +109,14 @@
|
|
119
109
|
</div>
|
120
110
|
|
121
111
|
<div id="footer">
|
122
|
-
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.
|
112
|
+
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.17.1
|
123
113
|
and simplecov-html v0.10.2<br/>
|
124
114
|
using RSpec
|
125
115
|
</div>
|
126
116
|
|
127
117
|
<div class="source_files">
|
128
118
|
|
129
|
-
<div class="source_table" id="
|
119
|
+
<div class="source_table" id="175f5aad0793e9750ae8298148ee6c32946b63ae">
|
130
120
|
<div class="header">
|
131
121
|
<h3>lib/venice.rb</h3>
|
132
122
|
<h4><span class="green">100.0 %</span> covered</h4>
|
@@ -175,14 +165,14 @@
|
|
175
165
|
</div>
|
176
166
|
|
177
167
|
|
178
|
-
<div class="source_table" id="
|
168
|
+
<div class="source_table" id="d79fadfe1306623a10822709e775b8c021f4fc4e">
|
179
169
|
<div class="header">
|
180
170
|
<h3>lib/venice/client.rb</h3>
|
181
|
-
<h4><span class="
|
171
|
+
<h4><span class="yellow">86.15 %</span> covered</h4>
|
182
172
|
<div>
|
183
|
-
<b>
|
184
|
-
<span class="green"><b>
|
185
|
-
<span class="red"><b>
|
173
|
+
<b>65</b> relevant lines.
|
174
|
+
<span class="green"><b>56</b> lines covered</span> and
|
175
|
+
<span class="red"><b>9</b> lines missed.</span>
|
186
176
|
</div>
|
187
177
|
</div>
|
188
178
|
|
@@ -315,20 +305,20 @@
|
|
315
305
|
<code class="ruby"> def production</code>
|
316
306
|
</li>
|
317
307
|
|
318
|
-
<li class="covered" data-hits="
|
319
|
-
<span class="hits">
|
308
|
+
<li class="covered" data-hits="6" data-linenumber="22">
|
309
|
+
<span class="hits">6</span>
|
320
310
|
|
321
311
|
<code class="ruby"> client = new</code>
|
322
312
|
</li>
|
323
313
|
|
324
|
-
<li class="covered" data-hits="
|
325
|
-
<span class="hits">
|
314
|
+
<li class="covered" data-hits="6" data-linenumber="23">
|
315
|
+
<span class="hits">6</span>
|
326
316
|
|
327
317
|
<code class="ruby"> client.verification_url = ITUNES_PRODUCTION_RECEIPT_VERIFICATION_ENDPOINT</code>
|
328
318
|
</li>
|
329
319
|
|
330
|
-
<li class="covered" data-hits="
|
331
|
-
<span class="hits">
|
320
|
+
<li class="covered" data-hits="6" data-linenumber="24">
|
321
|
+
<span class="hits">6</span>
|
332
322
|
|
333
323
|
<code class="ruby"> client</code>
|
334
324
|
</li>
|
@@ -357,8 +347,8 @@
|
|
357
347
|
<code class="ruby"> def initialize</code>
|
358
348
|
</li>
|
359
349
|
|
360
|
-
<li class="covered" data-hits="
|
361
|
-
<span class="hits">
|
350
|
+
<li class="covered" data-hits="14" data-linenumber="29">
|
351
|
+
<span class="hits">14</span>
|
362
352
|
|
363
353
|
<code class="ruby"> @verification_url = ENV['IAP_VERIFICATION_ENDPOINT']</code>
|
364
354
|
</li>
|
@@ -381,20 +371,20 @@
|
|
381
371
|
<code class="ruby"> def verify!(data, options = {})</code>
|
382
372
|
</li>
|
383
373
|
|
384
|
-
<li class="covered" data-hits="
|
385
|
-
<span class="hits">
|
374
|
+
<li class="covered" data-hits="24" data-linenumber="33">
|
375
|
+
<span class="hits">24</span>
|
386
376
|
|
387
377
|
<code class="ruby"> @verification_url ||= ITUNES_DEVELOPMENT_RECEIPT_VERIFICATION_ENDPOINT</code>
|
388
378
|
</li>
|
389
379
|
|
390
|
-
<li class="covered" data-hits="
|
391
|
-
<span class="hits">
|
380
|
+
<li class="covered" data-hits="24" data-linenumber="34">
|
381
|
+
<span class="hits">24</span>
|
392
382
|
|
393
383
|
<code class="ruby"> @shared_secret = options[:shared_secret] if options[:shared_secret]</code>
|
394
384
|
</li>
|
395
385
|
|
396
|
-
<li class="covered" data-hits="
|
397
|
-
<span class="hits">
|
386
|
+
<li class="covered" data-hits="24" data-linenumber="35">
|
387
|
+
<span class="hits">24</span>
|
398
388
|
|
399
389
|
<code class="ruby"> @exclude_old_transactions = options[:exclude_old_transactions] if options[:exclude_old_transactions]</code>
|
400
390
|
</li>
|
@@ -405,20 +395,20 @@
|
|
405
395
|
<code class="ruby"></code>
|
406
396
|
</li>
|
407
397
|
|
408
|
-
<li class="covered" data-hits="
|
409
|
-
<span class="hits">
|
398
|
+
<li class="covered" data-hits="24" data-linenumber="37">
|
399
|
+
<span class="hits">24</span>
|
410
400
|
|
411
401
|
<code class="ruby"> json = json_response_from_verifying_data(data, options)</code>
|
412
402
|
</li>
|
413
403
|
|
414
|
-
<li class="covered" data-hits="
|
415
|
-
<span class="hits">
|
404
|
+
<li class="covered" data-hits="17" data-linenumber="38">
|
405
|
+
<span class="hits">17</span>
|
416
406
|
|
417
407
|
<code class="ruby"> receipt_attributes = json['receipt'].dup if json['receipt']</code>
|
418
408
|
</li>
|
419
409
|
|
420
|
-
<li class="covered" data-hits="
|
421
|
-
<span class="hits">
|
410
|
+
<li class="covered" data-hits="17" data-linenumber="39">
|
411
|
+
<span class="hits">17</span>
|
422
412
|
|
423
413
|
<code class="ruby"> receipt_attributes['original_json_response'] = json if receipt_attributes</code>
|
424
414
|
</li>
|
@@ -429,8 +419,8 @@
|
|
429
419
|
<code class="ruby"></code>
|
430
420
|
</li>
|
431
421
|
|
432
|
-
<li class="covered" data-hits="
|
433
|
-
<span class="hits">
|
422
|
+
<li class="covered" data-hits="17" data-linenumber="41">
|
423
|
+
<span class="hits">17</span>
|
434
424
|
|
435
425
|
<code class="ruby"> case json['status'].to_i</code>
|
436
426
|
</li>
|
@@ -441,8 +431,8 @@
|
|
441
431
|
<code class="ruby"> when 0, 21006</code>
|
442
432
|
</li>
|
443
433
|
|
444
|
-
<li class="covered" data-hits="
|
445
|
-
<span class="hits">
|
434
|
+
<li class="covered" data-hits="9" data-linenumber="43">
|
435
|
+
<span class="hits">9</span>
|
446
436
|
|
447
437
|
<code class="ruby"> receipt = Receipt.new(receipt_attributes)</code>
|
448
438
|
</li>
|
@@ -471,8 +461,8 @@
|
|
471
461
|
<code class="ruby"> # > The JSON representation of the receipt for the most recent renewal</code>
|
472
462
|
</li>
|
473
463
|
|
474
|
-
<li class="covered" data-hits="
|
475
|
-
<span class="hits">
|
464
|
+
<li class="covered" data-hits="9" data-linenumber="48">
|
465
|
+
<span class="hits">9</span>
|
476
466
|
|
477
467
|
<code class="ruby"> if latest_receipt_info_attributes = json['latest_receipt_info']</code>
|
478
468
|
</li>
|
@@ -561,8 +551,8 @@
|
|
561
551
|
<code class="ruby"></code>
|
562
552
|
</li>
|
563
553
|
|
564
|
-
<li class="covered" data-hits="
|
565
|
-
<span class="hits">
|
554
|
+
<li class="covered" data-hits="9" data-linenumber="63">
|
555
|
+
<span class="hits">9</span>
|
566
556
|
|
567
557
|
<code class="ruby"> return receipt</code>
|
568
558
|
</li>
|
@@ -573,8 +563,8 @@
|
|
573
563
|
<code class="ruby"> else</code>
|
574
564
|
</li>
|
575
565
|
|
576
|
-
<li class="covered" data-hits="
|
577
|
-
<span class="hits">
|
566
|
+
<li class="covered" data-hits="8" data-linenumber="65">
|
567
|
+
<span class="hits">8</span>
|
578
568
|
|
579
569
|
<code class="ruby"> raise Receipt::VerificationError, json</code>
|
580
570
|
</li>
|
@@ -615,14 +605,14 @@
|
|
615
605
|
<code class="ruby"> def json_response_from_verifying_data(data, options = {})</code>
|
616
606
|
</li>
|
617
607
|
|
618
|
-
<li class="
|
619
|
-
|
608
|
+
<li class="never" data-hits="" data-linenumber="72">
|
609
|
+
|
620
610
|
|
621
611
|
<code class="ruby"> parameters = {</code>
|
622
612
|
</li>
|
623
613
|
|
624
|
-
<li class="
|
625
|
-
|
614
|
+
<li class="covered" data-hits="3" data-linenumber="73">
|
615
|
+
<span class="hits">3</span>
|
626
616
|
|
627
617
|
<code class="ruby"> 'receipt-data' => data</code>
|
628
618
|
</li>
|
@@ -735,8 +725,8 @@
|
|
735
725
|
<code class="ruby"></code>
|
736
726
|
</li>
|
737
727
|
|
738
|
-
<li class="
|
739
|
-
|
728
|
+
<li class="never" data-hits="" data-linenumber="92">
|
729
|
+
|
740
730
|
|
741
731
|
<code class="ruby"> begin</code>
|
742
732
|
</li>
|
@@ -771,61 +761,121 @@
|
|
771
761
|
<code class="ruby"></code>
|
772
762
|
</li>
|
773
763
|
|
774
|
-
<li class="
|
764
|
+
<li class="never" data-hits="" data-linenumber="98">
|
765
|
+
|
766
|
+
|
767
|
+
<code class="ruby"> begin</code>
|
768
|
+
</li>
|
769
|
+
|
770
|
+
<li class="covered" data-hits="3" data-linenumber="99">
|
775
771
|
<span class="hits">3</span>
|
776
772
|
|
777
|
-
<code class="ruby">
|
773
|
+
<code class="ruby"> JSON.parse(response.body)</code>
|
774
|
+
</li>
|
775
|
+
|
776
|
+
<li class="missed" data-hits="0" data-linenumber="100">
|
777
|
+
|
778
|
+
|
779
|
+
<code class="ruby"> rescue JSON::ParserError</code>
|
780
|
+
</li>
|
781
|
+
|
782
|
+
<li class="missed" data-hits="0" data-linenumber="101">
|
783
|
+
|
784
|
+
|
785
|
+
<code class="ruby"> raise InvalidResponseError</code>
|
786
|
+
</li>
|
787
|
+
|
788
|
+
<li class="never" data-hits="" data-linenumber="102">
|
789
|
+
|
790
|
+
|
791
|
+
<code class="ruby"> end</code>
|
778
792
|
</li>
|
779
793
|
|
780
|
-
<li class="never" data-hits="" data-linenumber="
|
794
|
+
<li class="never" data-hits="" data-linenumber="103">
|
781
795
|
|
782
796
|
|
783
797
|
<code class="ruby"> end</code>
|
784
798
|
</li>
|
785
799
|
|
786
|
-
<li class="never" data-hits="" data-linenumber="
|
800
|
+
<li class="never" data-hits="" data-linenumber="104">
|
787
801
|
|
788
802
|
|
789
803
|
<code class="ruby"> end</code>
|
790
804
|
</li>
|
791
805
|
|
792
|
-
<li class="never" data-hits="" data-linenumber="
|
806
|
+
<li class="never" data-hits="" data-linenumber="105">
|
793
807
|
|
794
808
|
|
795
809
|
<code class="ruby"></code>
|
796
810
|
</li>
|
797
811
|
|
798
|
-
<li class="covered" data-hits="1" data-linenumber="
|
812
|
+
<li class="covered" data-hits="1" data-linenumber="106">
|
799
813
|
<span class="hits">1</span>
|
800
814
|
|
801
815
|
<code class="ruby"> class Client::TimeoutError < Timeout::Error</code>
|
802
816
|
</li>
|
803
817
|
|
804
|
-
<li class="covered" data-hits="1" data-linenumber="
|
818
|
+
<li class="covered" data-hits="1" data-linenumber="107">
|
805
819
|
<span class="hits">1</span>
|
806
820
|
|
807
821
|
<code class="ruby"> def message</code>
|
808
822
|
</li>
|
809
823
|
|
810
|
-
<li class="missed" data-hits="0" data-linenumber="
|
824
|
+
<li class="missed" data-hits="0" data-linenumber="108">
|
811
825
|
|
812
826
|
|
813
827
|
<code class="ruby"> 'The App Store timed out.'</code>
|
814
828
|
</li>
|
815
829
|
|
816
|
-
<li class="never" data-hits="" data-linenumber="
|
830
|
+
<li class="never" data-hits="" data-linenumber="109">
|
817
831
|
|
818
832
|
|
819
833
|
<code class="ruby"> end</code>
|
820
834
|
</li>
|
821
835
|
|
822
|
-
<li class="never" data-hits="" data-linenumber="
|
836
|
+
<li class="never" data-hits="" data-linenumber="110">
|
823
837
|
|
824
838
|
|
825
839
|
<code class="ruby"> end</code>
|
826
840
|
</li>
|
827
841
|
|
828
|
-
<li class="never" data-hits="" data-linenumber="
|
842
|
+
<li class="never" data-hits="" data-linenumber="111">
|
843
|
+
|
844
|
+
|
845
|
+
<code class="ruby"></code>
|
846
|
+
</li>
|
847
|
+
|
848
|
+
<li class="covered" data-hits="1" data-linenumber="112">
|
849
|
+
<span class="hits">1</span>
|
850
|
+
|
851
|
+
<code class="ruby"> class Client::InvalidResponseError < StandardError</code>
|
852
|
+
</li>
|
853
|
+
|
854
|
+
<li class="covered" data-hits="1" data-linenumber="113">
|
855
|
+
<span class="hits">1</span>
|
856
|
+
|
857
|
+
<code class="ruby"> def message</code>
|
858
|
+
</li>
|
859
|
+
|
860
|
+
<li class="missed" data-hits="0" data-linenumber="114">
|
861
|
+
|
862
|
+
|
863
|
+
<code class="ruby"> 'The App Store returned invalid response'</code>
|
864
|
+
</li>
|
865
|
+
|
866
|
+
<li class="never" data-hits="" data-linenumber="115">
|
867
|
+
|
868
|
+
|
869
|
+
<code class="ruby"> end</code>
|
870
|
+
</li>
|
871
|
+
|
872
|
+
<li class="never" data-hits="" data-linenumber="116">
|
873
|
+
|
874
|
+
|
875
|
+
<code class="ruby"> end</code>
|
876
|
+
</li>
|
877
|
+
|
878
|
+
<li class="never" data-hits="" data-linenumber="117">
|
829
879
|
|
830
880
|
|
831
881
|
<code class="ruby">end</code>
|
@@ -836,13 +886,13 @@
|
|
836
886
|
</div>
|
837
887
|
|
838
888
|
|
839
|
-
<div class="source_table" id="
|
889
|
+
<div class="source_table" id="080477ce0f6d0348fc87b2c6eb5ce94e3b5da4cd">
|
840
890
|
<div class="header">
|
841
891
|
<h3>lib/venice/in_app_receipt.rb</h3>
|
842
|
-
<h4><span class="green">97.
|
892
|
+
<h4><span class="green">97.92 %</span> covered</h4>
|
843
893
|
<div>
|
844
|
-
<b>
|
845
|
-
<span class="green"><b>
|
894
|
+
<b>48</b> relevant lines.
|
895
|
+
<span class="green"><b>47</b> lines covered</span> and
|
846
896
|
<span class="red"><b>1</b> lines missed.</span>
|
847
897
|
</div>
|
848
898
|
</div>
|
@@ -895,598 +945,682 @@
|
|
895
945
|
<li class="never" data-hits="" data-linenumber="8">
|
896
946
|
|
897
947
|
|
948
|
+
<code class="ruby"> # Original JSON data returned from Apple for an InAppReceipt object.</code>
|
949
|
+
</li>
|
950
|
+
|
951
|
+
<li class="covered" data-hits="1" data-linenumber="9">
|
952
|
+
<span class="hits">1</span>
|
953
|
+
|
954
|
+
<code class="ruby"> attr_reader :original_json_data</code>
|
955
|
+
</li>
|
956
|
+
|
957
|
+
<li class="never" data-hits="" data-linenumber="10">
|
958
|
+
|
959
|
+
|
960
|
+
<code class="ruby"></code>
|
961
|
+
</li>
|
962
|
+
|
963
|
+
<li class="never" data-hits="" data-linenumber="11">
|
964
|
+
|
965
|
+
|
898
966
|
<code class="ruby"> # The number of items purchased. This value corresponds to the quantity property of</code>
|
899
967
|
</li>
|
900
968
|
|
901
|
-
<li class="never" data-hits="" data-linenumber="
|
969
|
+
<li class="never" data-hits="" data-linenumber="12">
|
902
970
|
|
903
971
|
|
904
972
|
<code class="ruby"> # the SKPayment object stored in the transaction’s payment property.</code>
|
905
973
|
</li>
|
906
974
|
|
907
|
-
<li class="covered" data-hits="1" data-linenumber="
|
975
|
+
<li class="covered" data-hits="1" data-linenumber="13">
|
908
976
|
<span class="hits">1</span>
|
909
977
|
|
910
978
|
<code class="ruby"> attr_reader :quantity</code>
|
911
979
|
</li>
|
912
980
|
|
913
|
-
<li class="never" data-hits="" data-linenumber="
|
981
|
+
<li class="never" data-hits="" data-linenumber="14">
|
914
982
|
|
915
983
|
|
916
984
|
<code class="ruby"></code>
|
917
985
|
</li>
|
918
986
|
|
919
|
-
<li class="never" data-hits="" data-linenumber="
|
987
|
+
<li class="never" data-hits="" data-linenumber="15">
|
920
988
|
|
921
989
|
|
922
990
|
<code class="ruby"> # The product identifier of the item that was purchased. This value corresponds to</code>
|
923
991
|
</li>
|
924
992
|
|
925
|
-
<li class="never" data-hits="" data-linenumber="
|
993
|
+
<li class="never" data-hits="" data-linenumber="16">
|
926
994
|
|
927
995
|
|
928
996
|
<code class="ruby"> # the productIdentifier property of the SKPayment object stored in the transaction’s</code>
|
929
997
|
</li>
|
930
998
|
|
931
|
-
<li class="never" data-hits="" data-linenumber="
|
999
|
+
<li class="never" data-hits="" data-linenumber="17">
|
932
1000
|
|
933
1001
|
|
934
1002
|
<code class="ruby"> # payment property.</code>
|
935
1003
|
</li>
|
936
1004
|
|
937
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1005
|
+
<li class="covered" data-hits="1" data-linenumber="18">
|
938
1006
|
<span class="hits">1</span>
|
939
1007
|
|
940
1008
|
<code class="ruby"> attr_reader :product_id</code>
|
941
1009
|
</li>
|
942
1010
|
|
943
|
-
<li class="never" data-hits="" data-linenumber="
|
1011
|
+
<li class="never" data-hits="" data-linenumber="19">
|
944
1012
|
|
945
1013
|
|
946
1014
|
<code class="ruby"></code>
|
947
1015
|
</li>
|
948
1016
|
|
949
|
-
<li class="never" data-hits="" data-linenumber="
|
1017
|
+
<li class="never" data-hits="" data-linenumber="20">
|
950
1018
|
|
951
1019
|
|
952
1020
|
<code class="ruby"> # The transaction identifier of the item that was purchased. This value corresponds</code>
|
953
1021
|
</li>
|
954
1022
|
|
955
|
-
<li class="never" data-hits="" data-linenumber="
|
1023
|
+
<li class="never" data-hits="" data-linenumber="21">
|
956
1024
|
|
957
1025
|
|
958
1026
|
<code class="ruby"> # to the transaction’s transactionIdentifier property.</code>
|
959
1027
|
</li>
|
960
1028
|
|
961
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1029
|
+
<li class="covered" data-hits="1" data-linenumber="22">
|
962
1030
|
<span class="hits">1</span>
|
963
1031
|
|
964
1032
|
<code class="ruby"> attr_reader :transaction_id</code>
|
965
1033
|
</li>
|
966
1034
|
|
967
|
-
<li class="never" data-hits="" data-linenumber="
|
1035
|
+
<li class="never" data-hits="" data-linenumber="23">
|
968
1036
|
|
969
1037
|
|
970
1038
|
<code class="ruby"></code>
|
971
1039
|
</li>
|
972
1040
|
|
973
|
-
<li class="never" data-hits="" data-linenumber="
|
1041
|
+
<li class="never" data-hits="" data-linenumber="24">
|
974
1042
|
|
975
1043
|
|
976
1044
|
<code class="ruby"> # The primary key for identifying subscription purchases. This value is a unique ID that identifies purchase events across devices, including subscription renewal purchase events.</code>
|
977
1045
|
</li>
|
978
1046
|
|
979
|
-
<li class="never" data-hits="" data-linenumber="
|
1047
|
+
<li class="never" data-hits="" data-linenumber="25">
|
980
1048
|
|
981
1049
|
|
982
1050
|
<code class="ruby"> # When restoring purchase, transaction_id could change</code>
|
983
1051
|
</li>
|
984
1052
|
|
985
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1053
|
+
<li class="covered" data-hits="1" data-linenumber="26">
|
986
1054
|
<span class="hits">1</span>
|
987
1055
|
|
988
1056
|
<code class="ruby"> attr_reader :web_order_line_item_id</code>
|
989
1057
|
</li>
|
990
1058
|
|
991
|
-
<li class="never" data-hits="" data-linenumber="
|
1059
|
+
<li class="never" data-hits="" data-linenumber="27">
|
992
1060
|
|
993
1061
|
|
994
1062
|
<code class="ruby"></code>
|
995
1063
|
</li>
|
996
1064
|
|
997
|
-
<li class="never" data-hits="" data-linenumber="
|
1065
|
+
<li class="never" data-hits="" data-linenumber="28">
|
998
1066
|
|
999
1067
|
|
1000
1068
|
<code class="ruby"> # The date and time this transaction occurred. This value corresponds to the</code>
|
1001
1069
|
</li>
|
1002
1070
|
|
1003
|
-
<li class="never" data-hits="" data-linenumber="
|
1071
|
+
<li class="never" data-hits="" data-linenumber="29">
|
1004
1072
|
|
1005
1073
|
|
1006
1074
|
<code class="ruby"> # transaction’s transactionDate property.</code>
|
1007
1075
|
</li>
|
1008
1076
|
|
1009
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1077
|
+
<li class="covered" data-hits="1" data-linenumber="30">
|
1010
1078
|
<span class="hits">1</span>
|
1011
1079
|
|
1012
1080
|
<code class="ruby"> attr_reader :purchased_at</code>
|
1013
1081
|
</li>
|
1014
1082
|
|
1015
|
-
<li class="never" data-hits="" data-linenumber="
|
1083
|
+
<li class="never" data-hits="" data-linenumber="31">
|
1016
1084
|
|
1017
1085
|
|
1018
1086
|
<code class="ruby"></code>
|
1019
1087
|
</li>
|
1020
1088
|
|
1021
|
-
<li class="never" data-hits="" data-linenumber="
|
1089
|
+
<li class="never" data-hits="" data-linenumber="32">
|
1022
1090
|
|
1023
1091
|
|
1024
1092
|
<code class="ruby"> # A string that the App Store uses to uniquely identify the application that created</code>
|
1025
1093
|
</li>
|
1026
1094
|
|
1027
|
-
<li class="never" data-hits="" data-linenumber="
|
1095
|
+
<li class="never" data-hits="" data-linenumber="33">
|
1028
1096
|
|
1029
1097
|
|
1030
1098
|
<code class="ruby"> # the payment transaction. If your server supports multiple applications, you can use</code>
|
1031
1099
|
</li>
|
1032
1100
|
|
1033
|
-
<li class="never" data-hits="" data-linenumber="
|
1101
|
+
<li class="never" data-hits="" data-linenumber="34">
|
1034
1102
|
|
1035
1103
|
|
1036
1104
|
<code class="ruby"> # this value to differentiate between them. Applications that are executing in the</code>
|
1037
1105
|
</li>
|
1038
1106
|
|
1039
|
-
<li class="never" data-hits="" data-linenumber="
|
1107
|
+
<li class="never" data-hits="" data-linenumber="35">
|
1040
1108
|
|
1041
1109
|
|
1042
1110
|
<code class="ruby"> # sandbox do not yet have an app-item-id assigned to them, so this key is missing from</code>
|
1043
1111
|
</li>
|
1044
1112
|
|
1045
|
-
<li class="never" data-hits="" data-linenumber="
|
1113
|
+
<li class="never" data-hits="" data-linenumber="36">
|
1046
1114
|
|
1047
1115
|
|
1048
1116
|
<code class="ruby"> # receipts created by the sandbox.</code>
|
1049
1117
|
</li>
|
1050
1118
|
|
1051
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1119
|
+
<li class="covered" data-hits="1" data-linenumber="37">
|
1052
1120
|
<span class="hits">1</span>
|
1053
1121
|
|
1054
1122
|
<code class="ruby"> attr_reader :app_item_id</code>
|
1055
1123
|
</li>
|
1056
1124
|
|
1057
|
-
<li class="never" data-hits="" data-linenumber="
|
1125
|
+
<li class="never" data-hits="" data-linenumber="38">
|
1058
1126
|
|
1059
1127
|
|
1060
1128
|
<code class="ruby"></code>
|
1061
1129
|
</li>
|
1062
1130
|
|
1063
|
-
<li class="never" data-hits="" data-linenumber="
|
1131
|
+
<li class="never" data-hits="" data-linenumber="39">
|
1064
1132
|
|
1065
1133
|
|
1066
1134
|
<code class="ruby"> # An arbitrary number that uniquely identifies a revision of your application. This key</code>
|
1067
1135
|
</li>
|
1068
1136
|
|
1069
|
-
<li class="never" data-hits="" data-linenumber="
|
1137
|
+
<li class="never" data-hits="" data-linenumber="40">
|
1070
1138
|
|
1071
1139
|
|
1072
1140
|
<code class="ruby"> # is missing in receipts created by the sandbox.</code>
|
1073
1141
|
</li>
|
1074
1142
|
|
1075
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1143
|
+
<li class="covered" data-hits="1" data-linenumber="41">
|
1076
1144
|
<span class="hits">1</span>
|
1077
1145
|
|
1078
1146
|
<code class="ruby"> attr_reader :version_external_identifier</code>
|
1079
1147
|
</li>
|
1080
1148
|
|
1081
|
-
<li class="never" data-hits="" data-linenumber="
|
1149
|
+
<li class="never" data-hits="" data-linenumber="42">
|
1082
1150
|
|
1083
1151
|
|
1084
1152
|
<code class="ruby"></code>
|
1085
1153
|
</li>
|
1086
1154
|
|
1087
|
-
<li class="never" data-hits="" data-linenumber="
|
1155
|
+
<li class="never" data-hits="" data-linenumber="43">
|
1088
1156
|
|
1089
1157
|
|
1090
1158
|
<code class="ruby"> # For a transaction that restores a previous transaction, this is the original receipt</code>
|
1091
1159
|
</li>
|
1092
1160
|
|
1093
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1161
|
+
<li class="covered" data-hits="1" data-linenumber="44">
|
1094
1162
|
<span class="hits">1</span>
|
1095
1163
|
|
1096
1164
|
<code class="ruby"> attr_accessor :original</code>
|
1097
1165
|
</li>
|
1098
1166
|
|
1099
|
-
<li class="never" data-hits="" data-linenumber="
|
1167
|
+
<li class="never" data-hits="" data-linenumber="45">
|
1100
1168
|
|
1101
1169
|
|
1102
1170
|
<code class="ruby"></code>
|
1103
1171
|
</li>
|
1104
1172
|
|
1105
|
-
<li class="never" data-hits="" data-linenumber="
|
1173
|
+
<li class="never" data-hits="" data-linenumber="46">
|
1106
1174
|
|
1107
1175
|
|
1108
1176
|
<code class="ruby"> # For auto-renewable subscriptions, returns the date the subscription will expire</code>
|
1109
1177
|
</li>
|
1110
1178
|
|
1111
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1179
|
+
<li class="covered" data-hits="1" data-linenumber="47">
|
1112
1180
|
<span class="hits">1</span>
|
1113
1181
|
|
1114
1182
|
<code class="ruby"> attr_reader :expires_at</code>
|
1115
1183
|
</li>
|
1116
1184
|
|
1117
|
-
<li class="never" data-hits="" data-linenumber="
|
1185
|
+
<li class="never" data-hits="" data-linenumber="48">
|
1118
1186
|
|
1119
1187
|
|
1120
1188
|
<code class="ruby"></code>
|
1121
1189
|
</li>
|
1122
1190
|
|
1123
|
-
<li class="never" data-hits="" data-linenumber="
|
1191
|
+
<li class="never" data-hits="" data-linenumber="49">
|
1124
1192
|
|
1125
1193
|
|
1126
1194
|
<code class="ruby"> # For a transaction that was canceled by Apple customer support, the time and date of the cancellation.</code>
|
1127
1195
|
</li>
|
1128
1196
|
|
1129
|
-
<li class="
|
1197
|
+
<li class="never" data-hits="" data-linenumber="50">
|
1198
|
+
|
1199
|
+
|
1200
|
+
<code class="ruby"> # For an auto-renewable subscription plan that was upgraded, the time and date of the upgrade transaction.</code>
|
1201
|
+
</li>
|
1202
|
+
|
1203
|
+
<li class="covered" data-hits="1" data-linenumber="51">
|
1130
1204
|
<span class="hits">1</span>
|
1131
1205
|
|
1132
1206
|
<code class="ruby"> attr_reader :cancellation_at</code>
|
1133
1207
|
</li>
|
1134
1208
|
|
1135
|
-
<li class="never" data-hits="" data-linenumber="
|
1209
|
+
<li class="never" data-hits="" data-linenumber="52">
|
1210
|
+
|
1211
|
+
|
1212
|
+
<code class="ruby"></code>
|
1213
|
+
</li>
|
1214
|
+
|
1215
|
+
<li class="never" data-hits="" data-linenumber="53">
|
1216
|
+
|
1217
|
+
|
1218
|
+
<code class="ruby"> # Only present for auto-renewable subscription receipts. Value is true if the customer’s subscription is</code>
|
1219
|
+
</li>
|
1220
|
+
|
1221
|
+
<li class="never" data-hits="" data-linenumber="54">
|
1222
|
+
|
1223
|
+
|
1224
|
+
<code class="ruby"> # currently in the free trial period, false if not, nil if key is not present on receipt.</code>
|
1225
|
+
</li>
|
1226
|
+
|
1227
|
+
<li class="covered" data-hits="1" data-linenumber="55">
|
1228
|
+
<span class="hits">1</span>
|
1229
|
+
|
1230
|
+
<code class="ruby"> attr_reader :is_trial_period</code>
|
1231
|
+
</li>
|
1232
|
+
|
1233
|
+
<li class="never" data-hits="" data-linenumber="56">
|
1234
|
+
|
1235
|
+
|
1236
|
+
<code class="ruby"> # Only present for auto-renewable subscription receipts. Value is true if the customer’s subscription is</code>
|
1237
|
+
</li>
|
1238
|
+
|
1239
|
+
<li class="never" data-hits="" data-linenumber="57">
|
1240
|
+
|
1241
|
+
|
1242
|
+
<code class="ruby"> # currently in an introductory price period, false if not, nil if key is not present on receipt.</code>
|
1243
|
+
</li>
|
1244
|
+
|
1245
|
+
<li class="covered" data-hits="1" data-linenumber="58">
|
1246
|
+
<span class="hits">1</span>
|
1247
|
+
|
1248
|
+
<code class="ruby"> attr_reader :is_in_intro_offer_period</code>
|
1249
|
+
</li>
|
1250
|
+
|
1251
|
+
<li class="never" data-hits="" data-linenumber="59">
|
1136
1252
|
|
1137
1253
|
|
1138
1254
|
<code class="ruby"></code>
|
1139
1255
|
</li>
|
1140
1256
|
|
1141
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1257
|
+
<li class="covered" data-hits="1" data-linenumber="60">
|
1142
1258
|
<span class="hits">1</span>
|
1143
1259
|
|
1144
1260
|
<code class="ruby"> def initialize(attributes = {})</code>
|
1145
1261
|
</li>
|
1146
1262
|
|
1147
|
-
<li class="covered" data-hits="
|
1148
|
-
<span class="hits">
|
1263
|
+
<li class="covered" data-hits="34" data-linenumber="61">
|
1264
|
+
<span class="hits">34</span>
|
1265
|
+
|
1266
|
+
<code class="ruby"> @original_json_data = attributes</code>
|
1267
|
+
</li>
|
1268
|
+
|
1269
|
+
<li class="covered" data-hits="34" data-linenumber="62">
|
1270
|
+
<span class="hits">34</span>
|
1149
1271
|
|
1150
1272
|
<code class="ruby"> @quantity = Integer(attributes['quantity']) if attributes['quantity']</code>
|
1151
1273
|
</li>
|
1152
1274
|
|
1153
|
-
<li class="covered" data-hits="
|
1154
|
-
<span class="hits">
|
1275
|
+
<li class="covered" data-hits="34" data-linenumber="63">
|
1276
|
+
<span class="hits">34</span>
|
1155
1277
|
|
1156
1278
|
<code class="ruby"> @product_id = attributes['product_id']</code>
|
1157
1279
|
</li>
|
1158
1280
|
|
1159
|
-
<li class="covered" data-hits="
|
1160
|
-
<span class="hits">
|
1281
|
+
<li class="covered" data-hits="34" data-linenumber="64">
|
1282
|
+
<span class="hits">34</span>
|
1161
1283
|
|
1162
1284
|
<code class="ruby"> @transaction_id = attributes['transaction_id']</code>
|
1163
1285
|
</li>
|
1164
1286
|
|
1165
|
-
<li class="covered" data-hits="
|
1166
|
-
<span class="hits">
|
1287
|
+
<li class="covered" data-hits="34" data-linenumber="65">
|
1288
|
+
<span class="hits">34</span>
|
1167
1289
|
|
1168
1290
|
<code class="ruby"> @web_order_line_item_id = attributes['web_order_line_item_id']</code>
|
1169
1291
|
</li>
|
1170
1292
|
|
1171
|
-
<li class="covered" data-hits="
|
1172
|
-
<span class="hits">
|
1293
|
+
<li class="covered" data-hits="34" data-linenumber="66">
|
1294
|
+
<span class="hits">34</span>
|
1173
1295
|
|
1174
1296
|
<code class="ruby"> @purchased_at = DateTime.parse(attributes['purchase_date']) if attributes['purchase_date']</code>
|
1175
1297
|
</li>
|
1176
1298
|
|
1177
|
-
<li class="covered" data-hits="
|
1178
|
-
<span class="hits">
|
1299
|
+
<li class="covered" data-hits="34" data-linenumber="67">
|
1300
|
+
<span class="hits">34</span>
|
1179
1301
|
|
1180
1302
|
<code class="ruby"> @app_item_id = attributes['app_item_id']</code>
|
1181
1303
|
</li>
|
1182
1304
|
|
1183
|
-
<li class="covered" data-hits="
|
1184
|
-
<span class="hits">
|
1305
|
+
<li class="covered" data-hits="34" data-linenumber="68">
|
1306
|
+
<span class="hits">34</span>
|
1185
1307
|
|
1186
1308
|
<code class="ruby"> @version_external_identifier = attributes['version_external_identifier']</code>
|
1187
1309
|
</li>
|
1188
1310
|
|
1189
|
-
<li class="covered" data-hits="
|
1190
|
-
<span class="hits">
|
1311
|
+
<li class="covered" data-hits="34" data-linenumber="69">
|
1312
|
+
<span class="hits">34</span>
|
1191
1313
|
|
1192
|
-
<code class="ruby"> @is_trial_period = attributes['is_trial_period'].to_s == 'true'
|
1314
|
+
<code class="ruby"> @is_trial_period = attributes['is_trial_period'].to_s == 'true' if attributes['is_trial_period']</code>
|
1193
1315
|
</li>
|
1194
1316
|
|
1195
|
-
<li class="
|
1317
|
+
<li class="covered" data-hits="34" data-linenumber="70">
|
1318
|
+
<span class="hits">34</span>
|
1319
|
+
|
1320
|
+
<code class="ruby"> @is_in_intro_offer_period = attributes['is_in_intro_offer_period'] == 'true' if attributes['is_in_intro_offer_period']</code>
|
1321
|
+
</li>
|
1322
|
+
|
1323
|
+
<li class="never" data-hits="" data-linenumber="71">
|
1196
1324
|
|
1197
1325
|
|
1198
1326
|
<code class="ruby"></code>
|
1199
1327
|
</li>
|
1200
1328
|
|
1201
|
-
<li class="never" data-hits="" data-linenumber="
|
1329
|
+
<li class="never" data-hits="" data-linenumber="72">
|
1202
1330
|
|
1203
1331
|
|
1204
1332
|
<code class="ruby"> # expires_date is in ms since the Epoch, Time.at expects seconds</code>
|
1205
1333
|
</li>
|
1206
1334
|
|
1207
|
-
<li class="covered" data-hits="
|
1208
|
-
<span class="hits">
|
1335
|
+
<li class="covered" data-hits="34" data-linenumber="73">
|
1336
|
+
<span class="hits">34</span>
|
1209
1337
|
|
1210
1338
|
<code class="ruby"> if attributes['expires_date_ms']</code>
|
1211
1339
|
</li>
|
1212
1340
|
|
1213
|
-
<li class="covered" data-hits="5" data-linenumber="
|
1341
|
+
<li class="covered" data-hits="5" data-linenumber="74">
|
1214
1342
|
<span class="hits">5</span>
|
1215
1343
|
|
1216
1344
|
<code class="ruby"> @expires_at = Time.at(attributes['expires_date_ms'].to_i / 1000)</code>
|
1217
1345
|
</li>
|
1218
1346
|
|
1219
|
-
<li class="covered" data-hits="
|
1220
|
-
<span class="hits">
|
1347
|
+
<li class="covered" data-hits="29" data-linenumber="75">
|
1348
|
+
<span class="hits">29</span>
|
1221
1349
|
|
1222
1350
|
<code class="ruby"> elsif attributes['expires_date'] && is_number?(attributes['expires_date'])</code>
|
1223
1351
|
</li>
|
1224
1352
|
|
1225
|
-
<li class="covered" data-hits="3" data-linenumber="
|
1353
|
+
<li class="covered" data-hits="3" data-linenumber="76">
|
1226
1354
|
<span class="hits">3</span>
|
1227
1355
|
|
1228
1356
|
<code class="ruby"> @expires_at = Time.at(attributes['expires_date'].to_i / 1000)</code>
|
1229
1357
|
</li>
|
1230
1358
|
|
1231
|
-
<li class="never" data-hits="" data-linenumber="
|
1359
|
+
<li class="never" data-hits="" data-linenumber="77">
|
1232
1360
|
|
1233
1361
|
|
1234
1362
|
<code class="ruby"> end</code>
|
1235
1363
|
</li>
|
1236
1364
|
|
1237
|
-
<li class="never" data-hits="" data-linenumber="
|
1365
|
+
<li class="never" data-hits="" data-linenumber="78">
|
1238
1366
|
|
1239
1367
|
|
1240
1368
|
<code class="ruby"></code>
|
1241
1369
|
</li>
|
1242
1370
|
|
1243
|
-
<li class="never" data-hits="" data-linenumber="
|
1371
|
+
<li class="never" data-hits="" data-linenumber="79">
|
1244
1372
|
|
1245
1373
|
|
1246
1374
|
<code class="ruby"> # cancellation_date is in ms since the Epoch, Time.at expects seconds</code>
|
1247
1375
|
</li>
|
1248
1376
|
|
1249
|
-
<li class="covered" data-hits="
|
1250
|
-
<span class="hits">
|
1377
|
+
<li class="covered" data-hits="34" data-linenumber="80">
|
1378
|
+
<span class="hits">34</span>
|
1251
1379
|
|
1252
1380
|
<code class="ruby"> @cancellation_at = Time.at(attributes['cancellation_date_ms'].to_i / 1000) if attributes['cancellation_date_ms']</code>
|
1253
1381
|
</li>
|
1254
1382
|
|
1255
|
-
<li class="never" data-hits="" data-linenumber="
|
1383
|
+
<li class="never" data-hits="" data-linenumber="81">
|
1256
1384
|
|
1257
1385
|
|
1258
1386
|
<code class="ruby"></code>
|
1259
1387
|
</li>
|
1260
1388
|
|
1261
|
-
<li class="covered" data-hits="
|
1262
|
-
<span class="hits">
|
1389
|
+
<li class="covered" data-hits="34" data-linenumber="82">
|
1390
|
+
<span class="hits">34</span>
|
1263
1391
|
|
1264
1392
|
<code class="ruby"> if attributes['original_transaction_id'] || attributes['original_purchase_date']</code>
|
1265
1393
|
</li>
|
1266
1394
|
|
1267
|
-
<li class="
|
1268
|
-
|
1395
|
+
<li class="never" data-hits="" data-linenumber="83">
|
1396
|
+
|
1269
1397
|
|
1270
1398
|
<code class="ruby"> original_attributes = {</code>
|
1271
1399
|
</li>
|
1272
1400
|
|
1273
|
-
<li class="
|
1274
|
-
|
1401
|
+
<li class="covered" data-hits="17" data-linenumber="84">
|
1402
|
+
<span class="hits">17</span>
|
1275
1403
|
|
1276
1404
|
<code class="ruby"> 'transaction_id' => attributes['original_transaction_id'],</code>
|
1277
1405
|
</li>
|
1278
1406
|
|
1279
|
-
<li class="never" data-hits="" data-linenumber="
|
1407
|
+
<li class="never" data-hits="" data-linenumber="85">
|
1280
1408
|
|
1281
1409
|
|
1282
1410
|
<code class="ruby"> 'purchase_date' => attributes['original_purchase_date']</code>
|
1283
1411
|
</li>
|
1284
1412
|
|
1285
|
-
<li class="never" data-hits="" data-linenumber="
|
1413
|
+
<li class="never" data-hits="" data-linenumber="86">
|
1286
1414
|
|
1287
1415
|
|
1288
1416
|
<code class="ruby"> }</code>
|
1289
1417
|
</li>
|
1290
1418
|
|
1291
|
-
<li class="never" data-hits="" data-linenumber="
|
1419
|
+
<li class="never" data-hits="" data-linenumber="87">
|
1292
1420
|
|
1293
1421
|
|
1294
1422
|
<code class="ruby"></code>
|
1295
1423
|
</li>
|
1296
1424
|
|
1297
|
-
<li class="covered" data-hits="
|
1298
|
-
<span class="hits">
|
1425
|
+
<li class="covered" data-hits="17" data-linenumber="88">
|
1426
|
+
<span class="hits">17</span>
|
1299
1427
|
|
1300
1428
|
<code class="ruby"> self.original = InAppReceipt.new(original_attributes)</code>
|
1301
1429
|
</li>
|
1302
1430
|
|
1303
|
-
<li class="never" data-hits="" data-linenumber="
|
1431
|
+
<li class="never" data-hits="" data-linenumber="89">
|
1304
1432
|
|
1305
1433
|
|
1306
1434
|
<code class="ruby"> end</code>
|
1307
1435
|
</li>
|
1308
1436
|
|
1309
|
-
<li class="never" data-hits="" data-linenumber="
|
1437
|
+
<li class="never" data-hits="" data-linenumber="90">
|
1310
1438
|
|
1311
1439
|
|
1312
1440
|
<code class="ruby"> end</code>
|
1313
1441
|
</li>
|
1314
1442
|
|
1315
|
-
<li class="never" data-hits="" data-linenumber="
|
1443
|
+
<li class="never" data-hits="" data-linenumber="91">
|
1316
1444
|
|
1317
1445
|
|
1318
1446
|
<code class="ruby"></code>
|
1319
1447
|
</li>
|
1320
1448
|
|
1321
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1449
|
+
<li class="covered" data-hits="1" data-linenumber="92">
|
1322
1450
|
<span class="hits">1</span>
|
1323
1451
|
|
1324
1452
|
<code class="ruby"> def to_hash</code>
|
1325
1453
|
</li>
|
1326
1454
|
|
1327
|
-
<li class="
|
1328
|
-
|
1455
|
+
<li class="never" data-hits="" data-linenumber="93">
|
1456
|
+
|
1329
1457
|
|
1330
1458
|
<code class="ruby"> {</code>
|
1331
1459
|
</li>
|
1332
1460
|
|
1333
|
-
<li class="
|
1334
|
-
|
1461
|
+
<li class="covered" data-hits="2" data-linenumber="94">
|
1462
|
+
<span class="hits">2</span>
|
1335
1463
|
|
1336
1464
|
<code class="ruby"> quantity: @quantity,</code>
|
1337
1465
|
</li>
|
1338
1466
|
|
1339
|
-
<li class="never" data-hits="" data-linenumber="
|
1467
|
+
<li class="never" data-hits="" data-linenumber="95">
|
1340
1468
|
|
1341
1469
|
|
1342
1470
|
<code class="ruby"> product_id: @product_id,</code>
|
1343
1471
|
</li>
|
1344
1472
|
|
1345
|
-
<li class="never" data-hits="" data-linenumber="
|
1473
|
+
<li class="never" data-hits="" data-linenumber="96">
|
1346
1474
|
|
1347
1475
|
|
1348
1476
|
<code class="ruby"> transaction_id: @transaction_id,</code>
|
1349
1477
|
</li>
|
1350
1478
|
|
1351
|
-
<li class="never" data-hits="" data-linenumber="
|
1479
|
+
<li class="never" data-hits="" data-linenumber="97">
|
1352
1480
|
|
1353
1481
|
|
1354
1482
|
<code class="ruby"> web_order_line_item_id: @web_order_line_item_id,</code>
|
1355
1483
|
</li>
|
1356
1484
|
|
1357
|
-
<li class="covered" data-hits="2" data-linenumber="
|
1485
|
+
<li class="covered" data-hits="2" data-linenumber="98">
|
1358
1486
|
<span class="hits">2</span>
|
1359
1487
|
|
1360
1488
|
<code class="ruby"> purchase_date: (@purchased_at.httpdate rescue nil),</code>
|
1361
1489
|
</li>
|
1362
1490
|
|
1363
|
-
<li class="covered" data-hits="2" data-linenumber="
|
1491
|
+
<li class="covered" data-hits="2" data-linenumber="99">
|
1364
1492
|
<span class="hits">2</span>
|
1365
1493
|
|
1366
1494
|
<code class="ruby"> original_transaction_id: (@original.transaction_id rescue nil),</code>
|
1367
1495
|
</li>
|
1368
1496
|
|
1369
|
-
<li class="covered" data-hits="2" data-linenumber="
|
1497
|
+
<li class="covered" data-hits="2" data-linenumber="100">
|
1370
1498
|
<span class="hits">2</span>
|
1371
1499
|
|
1372
1500
|
<code class="ruby"> original_purchase_date: (@original.purchased_at.httpdate rescue nil),</code>
|
1373
1501
|
</li>
|
1374
1502
|
|
1375
|
-
<li class="never" data-hits="" data-linenumber="
|
1503
|
+
<li class="never" data-hits="" data-linenumber="101">
|
1376
1504
|
|
1377
1505
|
|
1378
1506
|
<code class="ruby"> app_item_id: @app_item_id,</code>
|
1379
1507
|
</li>
|
1380
1508
|
|
1381
|
-
<li class="never" data-hits="" data-linenumber="
|
1509
|
+
<li class="never" data-hits="" data-linenumber="102">
|
1382
1510
|
|
1383
1511
|
|
1384
1512
|
<code class="ruby"> version_external_identifier: @version_external_identifier,</code>
|
1385
1513
|
</li>
|
1386
1514
|
|
1387
|
-
<li class="never" data-hits="" data-linenumber="
|
1515
|
+
<li class="never" data-hits="" data-linenumber="103">
|
1388
1516
|
|
1389
1517
|
|
1390
1518
|
<code class="ruby"> is_trial_period: @is_trial_period,</code>
|
1391
1519
|
</li>
|
1392
1520
|
|
1393
|
-
<li class="
|
1521
|
+
<li class="never" data-hits="" data-linenumber="104">
|
1522
|
+
|
1523
|
+
|
1524
|
+
<code class="ruby"> is_in_intro_offer_period: @is_in_intro_offer_period,</code>
|
1525
|
+
</li>
|
1526
|
+
|
1527
|
+
<li class="covered" data-hits="2" data-linenumber="105">
|
1394
1528
|
<span class="hits">2</span>
|
1395
1529
|
|
1396
1530
|
<code class="ruby"> expires_at: (@expires_at.httpdate rescue nil),</code>
|
1397
1531
|
</li>
|
1398
1532
|
|
1399
|
-
<li class="covered" data-hits="2" data-linenumber="
|
1533
|
+
<li class="covered" data-hits="2" data-linenumber="106">
|
1400
1534
|
<span class="hits">2</span>
|
1401
1535
|
|
1402
1536
|
<code class="ruby"> cancellation_at: (@cancellation_at.httpdate rescue nil)</code>
|
1403
1537
|
</li>
|
1404
1538
|
|
1405
|
-
<li class="never" data-hits="" data-linenumber="
|
1539
|
+
<li class="never" data-hits="" data-linenumber="107">
|
1406
1540
|
|
1407
1541
|
|
1408
1542
|
<code class="ruby"> }</code>
|
1409
1543
|
</li>
|
1410
1544
|
|
1411
|
-
<li class="never" data-hits="" data-linenumber="
|
1545
|
+
<li class="never" data-hits="" data-linenumber="108">
|
1412
1546
|
|
1413
1547
|
|
1414
1548
|
<code class="ruby"> end</code>
|
1415
1549
|
</li>
|
1416
1550
|
|
1417
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1551
|
+
<li class="covered" data-hits="1" data-linenumber="109">
|
1418
1552
|
<span class="hits">1</span>
|
1419
1553
|
|
1420
1554
|
<code class="ruby"> alias_method :to_h, :to_hash</code>
|
1421
1555
|
</li>
|
1422
1556
|
|
1423
|
-
<li class="never" data-hits="" data-linenumber="
|
1557
|
+
<li class="never" data-hits="" data-linenumber="110">
|
1424
1558
|
|
1425
1559
|
|
1426
1560
|
<code class="ruby"></code>
|
1427
1561
|
</li>
|
1428
1562
|
|
1429
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1563
|
+
<li class="covered" data-hits="1" data-linenumber="111">
|
1430
1564
|
<span class="hits">1</span>
|
1431
1565
|
|
1432
1566
|
<code class="ruby"> def to_json</code>
|
1433
1567
|
</li>
|
1434
1568
|
|
1435
|
-
<li class="missed" data-hits="0" data-linenumber="
|
1569
|
+
<li class="missed" data-hits="0" data-linenumber="112">
|
1436
1570
|
|
1437
1571
|
|
1438
1572
|
<code class="ruby"> to_hash.to_json</code>
|
1439
1573
|
</li>
|
1440
1574
|
|
1441
|
-
<li class="never" data-hits="" data-linenumber="
|
1575
|
+
<li class="never" data-hits="" data-linenumber="113">
|
1442
1576
|
|
1443
1577
|
|
1444
1578
|
<code class="ruby"> end</code>
|
1445
1579
|
</li>
|
1446
1580
|
|
1447
|
-
<li class="never" data-hits="" data-linenumber="
|
1581
|
+
<li class="never" data-hits="" data-linenumber="114">
|
1448
1582
|
|
1449
1583
|
|
1450
1584
|
<code class="ruby"></code>
|
1451
1585
|
</li>
|
1452
1586
|
|
1453
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1587
|
+
<li class="covered" data-hits="1" data-linenumber="115">
|
1454
1588
|
<span class="hits">1</span>
|
1455
1589
|
|
1456
1590
|
<code class="ruby"> private</code>
|
1457
1591
|
</li>
|
1458
1592
|
|
1459
|
-
<li class="never" data-hits="" data-linenumber="
|
1593
|
+
<li class="never" data-hits="" data-linenumber="116">
|
1460
1594
|
|
1461
1595
|
|
1462
1596
|
<code class="ruby"></code>
|
1463
1597
|
</li>
|
1464
1598
|
|
1465
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1599
|
+
<li class="covered" data-hits="1" data-linenumber="117">
|
1466
1600
|
<span class="hits">1</span>
|
1467
1601
|
|
1468
1602
|
<code class="ruby"> def is_number?(string)</code>
|
1469
1603
|
</li>
|
1470
1604
|
|
1471
|
-
<li class="covered" data-hits="
|
1472
|
-
<span class="hits">
|
1605
|
+
<li class="covered" data-hits="12" data-linenumber="118">
|
1606
|
+
<span class="hits">12</span>
|
1473
1607
|
|
1474
1608
|
<code class="ruby"> !!(string && string.to_s =~ /^[0-9]+$/)</code>
|
1475
1609
|
</li>
|
1476
1610
|
|
1477
|
-
<li class="never" data-hits="" data-linenumber="
|
1611
|
+
<li class="never" data-hits="" data-linenumber="119">
|
1478
1612
|
|
1479
1613
|
|
1480
1614
|
<code class="ruby"> end</code>
|
1481
1615
|
</li>
|
1482
1616
|
|
1483
|
-
<li class="never" data-hits="" data-linenumber="
|
1617
|
+
<li class="never" data-hits="" data-linenumber="120">
|
1484
1618
|
|
1485
1619
|
|
1486
1620
|
<code class="ruby"> end</code>
|
1487
1621
|
</li>
|
1488
1622
|
|
1489
|
-
<li class="never" data-hits="" data-linenumber="
|
1623
|
+
<li class="never" data-hits="" data-linenumber="121">
|
1490
1624
|
|
1491
1625
|
|
1492
1626
|
<code class="ruby">end</code>
|
@@ -1497,13 +1631,13 @@
|
|
1497
1631
|
</div>
|
1498
1632
|
|
1499
1633
|
|
1500
|
-
<div class="source_table" id="
|
1634
|
+
<div class="source_table" id="17a12c36d26ef47e82b8c4a1684d8e945c9a9e89">
|
1501
1635
|
<div class="header">
|
1502
1636
|
<h3>lib/venice/pending_renewal_info.rb</h3>
|
1503
|
-
<h4><span class="green">
|
1637
|
+
<h4><span class="green">96.0 %</span> covered</h4>
|
1504
1638
|
<div>
|
1505
|
-
<b>
|
1506
|
-
<span class="green"><b>
|
1639
|
+
<b>25</b> relevant lines.
|
1640
|
+
<span class="green"><b>24</b> lines covered</span> and
|
1507
1641
|
<span class="red"><b>1</b> lines missed.</span>
|
1508
1642
|
</div>
|
1509
1643
|
</div>
|
@@ -1526,370 +1660,394 @@
|
|
1526
1660
|
<li class="never" data-hits="" data-linenumber="3">
|
1527
1661
|
|
1528
1662
|
|
1663
|
+
<code class="ruby"> # Original JSON data returned from Apple for a PendingRenewalInfo object.</code>
|
1664
|
+
</li>
|
1665
|
+
|
1666
|
+
<li class="covered" data-hits="1" data-linenumber="4">
|
1667
|
+
<span class="hits">1</span>
|
1668
|
+
|
1669
|
+
<code class="ruby"> attr_reader :original_json_data</code>
|
1670
|
+
</li>
|
1671
|
+
|
1672
|
+
<li class="never" data-hits="" data-linenumber="5">
|
1673
|
+
|
1674
|
+
|
1675
|
+
<code class="ruby"></code>
|
1676
|
+
</li>
|
1677
|
+
|
1678
|
+
<li class="never" data-hits="" data-linenumber="6">
|
1679
|
+
|
1680
|
+
|
1529
1681
|
<code class="ruby"> # For an expired subscription, the reason for the subscription expiration.</code>
|
1530
1682
|
</li>
|
1531
1683
|
|
1532
|
-
<li class="never" data-hits="" data-linenumber="
|
1684
|
+
<li class="never" data-hits="" data-linenumber="7">
|
1533
1685
|
|
1534
1686
|
|
1535
1687
|
<code class="ruby"> # This key is only present for a receipt containing an expired auto-renewable subscription.</code>
|
1536
1688
|
</li>
|
1537
1689
|
|
1538
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1690
|
+
<li class="covered" data-hits="1" data-linenumber="8">
|
1539
1691
|
<span class="hits">1</span>
|
1540
1692
|
|
1541
1693
|
<code class="ruby"> attr_reader :expiration_intent</code>
|
1542
1694
|
</li>
|
1543
1695
|
|
1544
|
-
<li class="never" data-hits="" data-linenumber="
|
1696
|
+
<li class="never" data-hits="" data-linenumber="9">
|
1545
1697
|
|
1546
1698
|
|
1547
1699
|
<code class="ruby"></code>
|
1548
1700
|
</li>
|
1549
1701
|
|
1550
|
-
<li class="never" data-hits="" data-linenumber="
|
1702
|
+
<li class="never" data-hits="" data-linenumber="10">
|
1551
1703
|
|
1552
1704
|
|
1553
1705
|
<code class="ruby"> # The current renewal status for the auto-renewable subscription.</code>
|
1554
1706
|
</li>
|
1555
1707
|
|
1556
|
-
<li class="never" data-hits="" data-linenumber="
|
1708
|
+
<li class="never" data-hits="" data-linenumber="11">
|
1557
1709
|
|
1558
1710
|
|
1559
1711
|
<code class="ruby"> # This key is only present for auto-renewable subscription receipts, for active or expired subscriptions</code>
|
1560
1712
|
</li>
|
1561
1713
|
|
1562
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1714
|
+
<li class="covered" data-hits="1" data-linenumber="12">
|
1563
1715
|
<span class="hits">1</span>
|
1564
1716
|
|
1565
1717
|
<code class="ruby"> attr_reader :auto_renew_status</code>
|
1566
1718
|
</li>
|
1567
1719
|
|
1568
|
-
<li class="never" data-hits="" data-linenumber="
|
1720
|
+
<li class="never" data-hits="" data-linenumber="13">
|
1569
1721
|
|
1570
1722
|
|
1571
1723
|
<code class="ruby"></code>
|
1572
1724
|
</li>
|
1573
1725
|
|
1574
|
-
<li class="never" data-hits="" data-linenumber="
|
1726
|
+
<li class="never" data-hits="" data-linenumber="14">
|
1575
1727
|
|
1576
1728
|
|
1577
1729
|
<code class="ruby"> # The current renewal preference for the auto-renewable subscription.</code>
|
1578
1730
|
</li>
|
1579
1731
|
|
1580
|
-
<li class="never" data-hits="" data-linenumber="
|
1732
|
+
<li class="never" data-hits="" data-linenumber="15">
|
1581
1733
|
|
1582
1734
|
|
1583
1735
|
<code class="ruby"> # The value for this key corresponds to the productIdentifier property of the product that the customer’s subscription renews.</code>
|
1584
1736
|
</li>
|
1585
1737
|
|
1586
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1738
|
+
<li class="covered" data-hits="1" data-linenumber="16">
|
1587
1739
|
<span class="hits">1</span>
|
1588
1740
|
|
1589
1741
|
<code class="ruby"> attr_reader :auto_renew_product_id</code>
|
1590
1742
|
</li>
|
1591
1743
|
|
1592
|
-
<li class="never" data-hits="" data-linenumber="
|
1744
|
+
<li class="never" data-hits="" data-linenumber="17">
|
1593
1745
|
|
1594
1746
|
|
1595
1747
|
<code class="ruby"></code>
|
1596
1748
|
</li>
|
1597
1749
|
|
1598
|
-
<li class="never" data-hits="" data-linenumber="
|
1750
|
+
<li class="never" data-hits="" data-linenumber="18">
|
1599
1751
|
|
1600
1752
|
|
1601
1753
|
<code class="ruby"> # For an expired subscription, whether or not Apple is still attempting to automatically renew the subscription.</code>
|
1602
1754
|
</li>
|
1603
1755
|
|
1604
|
-
<li class="never" data-hits="" data-linenumber="
|
1756
|
+
<li class="never" data-hits="" data-linenumber="19">
|
1605
1757
|
|
1606
1758
|
|
1607
1759
|
<code class="ruby"> # If the customer’s subscription failed to renew because the App Store was unable to complete the transaction, this value will reflect whether or not the App Store is still trying to renew the subscription.</code>
|
1608
1760
|
</li>
|
1609
1761
|
|
1610
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1762
|
+
<li class="covered" data-hits="1" data-linenumber="20">
|
1611
1763
|
<span class="hits">1</span>
|
1612
1764
|
|
1613
1765
|
<code class="ruby"> attr_reader :is_in_billing_retry_period</code>
|
1614
1766
|
</li>
|
1615
1767
|
|
1616
|
-
<li class="never" data-hits="" data-linenumber="
|
1768
|
+
<li class="never" data-hits="" data-linenumber="21">
|
1617
1769
|
|
1618
1770
|
|
1619
1771
|
<code class="ruby"></code>
|
1620
1772
|
</li>
|
1621
1773
|
|
1622
|
-
<li class="never" data-hits="" data-linenumber="
|
1774
|
+
<li class="never" data-hits="" data-linenumber="22">
|
1623
1775
|
|
1624
1776
|
|
1625
1777
|
<code class="ruby"> # The product identifier of the item that was purchased.</code>
|
1626
1778
|
</li>
|
1627
1779
|
|
1628
|
-
<li class="never" data-hits="" data-linenumber="
|
1780
|
+
<li class="never" data-hits="" data-linenumber="23">
|
1629
1781
|
|
1630
1782
|
|
1631
1783
|
<code class="ruby"> # This value corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.</code>
|
1632
1784
|
</li>
|
1633
1785
|
|
1634
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1786
|
+
<li class="covered" data-hits="1" data-linenumber="24">
|
1635
1787
|
<span class="hits">1</span>
|
1636
1788
|
|
1637
1789
|
<code class="ruby"> attr_reader :product_id</code>
|
1638
1790
|
</li>
|
1639
1791
|
|
1640
|
-
<li class="never" data-hits="" data-linenumber="
|
1792
|
+
<li class="never" data-hits="" data-linenumber="25">
|
1641
1793
|
|
1642
1794
|
|
1643
1795
|
<code class="ruby"></code>
|
1644
1796
|
</li>
|
1645
1797
|
|
1646
|
-
<li class="never" data-hits="" data-linenumber="
|
1798
|
+
<li class="never" data-hits="" data-linenumber="26">
|
1647
1799
|
|
1648
1800
|
|
1649
1801
|
<code class="ruby"> # The current price consent status for a subscription price increase</code>
|
1650
1802
|
</li>
|
1651
1803
|
|
1652
|
-
<li class="never" data-hits="" data-linenumber="
|
1804
|
+
<li class="never" data-hits="" data-linenumber="27">
|
1653
1805
|
|
1654
1806
|
|
1655
1807
|
<code class="ruby"> # This key is only present for auto-renewable subscription receipts if the subscription price was increased without keeping the existing price for active subscribers</code>
|
1656
1808
|
</li>
|
1657
1809
|
|
1658
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1810
|
+
<li class="covered" data-hits="1" data-linenumber="28">
|
1659
1811
|
<span class="hits">1</span>
|
1660
1812
|
|
1661
1813
|
<code class="ruby"> attr_reader :price_consent_status</code>
|
1662
1814
|
</li>
|
1663
1815
|
|
1664
|
-
<li class="never" data-hits="" data-linenumber="
|
1816
|
+
<li class="never" data-hits="" data-linenumber="29">
|
1665
1817
|
|
1666
1818
|
|
1667
1819
|
<code class="ruby"></code>
|
1668
1820
|
</li>
|
1669
1821
|
|
1670
|
-
<li class="never" data-hits="" data-linenumber="
|
1822
|
+
<li class="never" data-hits="" data-linenumber="30">
|
1671
1823
|
|
1672
1824
|
|
1673
1825
|
<code class="ruby"> # For a transaction that was cancelled, the reason for cancellation.</code>
|
1674
1826
|
</li>
|
1675
1827
|
|
1676
|
-
<li class="never" data-hits="" data-linenumber="
|
1828
|
+
<li class="never" data-hits="" data-linenumber="31">
|
1677
1829
|
|
1678
1830
|
|
1679
1831
|
<code class="ruby"> # Use this value along with the cancellation date to identify possible issues in your app that may lead customers to contact Apple customer support.</code>
|
1680
1832
|
</li>
|
1681
1833
|
|
1682
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1834
|
+
<li class="covered" data-hits="1" data-linenumber="32">
|
1683
1835
|
<span class="hits">1</span>
|
1684
1836
|
|
1685
1837
|
<code class="ruby"> attr_reader :cancellation_reason</code>
|
1686
1838
|
</li>
|
1687
1839
|
|
1688
|
-
<li class="never" data-hits="" data-linenumber="
|
1840
|
+
<li class="never" data-hits="" data-linenumber="33">
|
1689
1841
|
|
1690
1842
|
|
1691
1843
|
<code class="ruby"></code>
|
1692
1844
|
</li>
|
1693
1845
|
|
1694
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1846
|
+
<li class="covered" data-hits="1" data-linenumber="34">
|
1695
1847
|
<span class="hits">1</span>
|
1696
1848
|
|
1697
1849
|
<code class="ruby"> def initialize(attributes)</code>
|
1698
1850
|
</li>
|
1699
1851
|
|
1700
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1852
|
+
<li class="covered" data-hits="8" data-linenumber="35">
|
1853
|
+
<span class="hits">8</span>
|
1854
|
+
|
1855
|
+
<code class="ruby"> @original_json_data = attributes</code>
|
1856
|
+
</li>
|
1857
|
+
|
1858
|
+
<li class="covered" data-hits="8" data-linenumber="36">
|
1701
1859
|
<span class="hits">8</span>
|
1702
1860
|
|
1703
1861
|
<code class="ruby"> @expiration_intent = Integer(attributes['expiration_intent']) if attributes['expiration_intent']</code>
|
1704
1862
|
</li>
|
1705
1863
|
|
1706
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1864
|
+
<li class="covered" data-hits="8" data-linenumber="37">
|
1707
1865
|
<span class="hits">8</span>
|
1708
1866
|
|
1709
1867
|
<code class="ruby"> @auto_renew_status = Integer(attributes['auto_renew_status']) if attributes['auto_renew_status']</code>
|
1710
1868
|
</li>
|
1711
1869
|
|
1712
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1870
|
+
<li class="covered" data-hits="8" data-linenumber="38">
|
1713
1871
|
<span class="hits">8</span>
|
1714
1872
|
|
1715
1873
|
<code class="ruby"> @auto_renew_product_id = attributes['auto_renew_product_id']</code>
|
1716
1874
|
</li>
|
1717
1875
|
|
1718
|
-
<li class="never" data-hits="" data-linenumber="
|
1876
|
+
<li class="never" data-hits="" data-linenumber="39">
|
1719
1877
|
|
1720
1878
|
|
1721
1879
|
<code class="ruby"></code>
|
1722
1880
|
</li>
|
1723
1881
|
|
1724
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1882
|
+
<li class="covered" data-hits="8" data-linenumber="40">
|
1725
1883
|
<span class="hits">8</span>
|
1726
1884
|
|
1727
1885
|
<code class="ruby"> if attributes['is_in_billing_retry_period']</code>
|
1728
1886
|
</li>
|
1729
1887
|
|
1730
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1888
|
+
<li class="covered" data-hits="8" data-linenumber="41">
|
1731
1889
|
<span class="hits">8</span>
|
1732
1890
|
|
1733
1891
|
<code class="ruby"> @is_in_billing_retry_period = (attributes['is_in_billing_retry_period'] == '1')</code>
|
1734
1892
|
</li>
|
1735
1893
|
|
1736
|
-
<li class="never" data-hits="" data-linenumber="
|
1894
|
+
<li class="never" data-hits="" data-linenumber="42">
|
1737
1895
|
|
1738
1896
|
|
1739
1897
|
<code class="ruby"> end</code>
|
1740
1898
|
</li>
|
1741
1899
|
|
1742
|
-
<li class="never" data-hits="" data-linenumber="
|
1900
|
+
<li class="never" data-hits="" data-linenumber="43">
|
1743
1901
|
|
1744
1902
|
|
1745
1903
|
<code class="ruby"></code>
|
1746
1904
|
</li>
|
1747
1905
|
|
1748
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1906
|
+
<li class="covered" data-hits="8" data-linenumber="44">
|
1749
1907
|
<span class="hits">8</span>
|
1750
1908
|
|
1751
1909
|
<code class="ruby"> @product_id = attributes['product_id']</code>
|
1752
1910
|
</li>
|
1753
1911
|
|
1754
|
-
<li class="never" data-hits="" data-linenumber="
|
1912
|
+
<li class="never" data-hits="" data-linenumber="45">
|
1755
1913
|
|
1756
1914
|
|
1757
1915
|
<code class="ruby"></code>
|
1758
1916
|
</li>
|
1759
1917
|
|
1760
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1918
|
+
<li class="covered" data-hits="8" data-linenumber="46">
|
1761
1919
|
<span class="hits">8</span>
|
1762
1920
|
|
1763
1921
|
<code class="ruby"> @price_consent_status = Integer(attributes['price_consent_status']) if attributes['price_consent_status']</code>
|
1764
1922
|
</li>
|
1765
1923
|
|
1766
|
-
<li class="covered" data-hits="8" data-linenumber="
|
1924
|
+
<li class="covered" data-hits="8" data-linenumber="47">
|
1767
1925
|
<span class="hits">8</span>
|
1768
1926
|
|
1769
1927
|
<code class="ruby"> @cancellation_reason = Integer(attributes['cancellation_reason']) if attributes['cancellation_reason']</code>
|
1770
1928
|
</li>
|
1771
1929
|
|
1772
|
-
<li class="never" data-hits="" data-linenumber="
|
1930
|
+
<li class="never" data-hits="" data-linenumber="48">
|
1773
1931
|
|
1774
1932
|
|
1775
1933
|
<code class="ruby"> end</code>
|
1776
1934
|
</li>
|
1777
1935
|
|
1778
|
-
<li class="never" data-hits="" data-linenumber="
|
1936
|
+
<li class="never" data-hits="" data-linenumber="49">
|
1779
1937
|
|
1780
1938
|
|
1781
1939
|
<code class="ruby"></code>
|
1782
1940
|
</li>
|
1783
1941
|
|
1784
|
-
<li class="covered" data-hits="1" data-linenumber="
|
1942
|
+
<li class="covered" data-hits="1" data-linenumber="50">
|
1785
1943
|
<span class="hits">1</span>
|
1786
1944
|
|
1787
1945
|
<code class="ruby"> def to_hash</code>
|
1788
1946
|
</li>
|
1789
1947
|
|
1790
|
-
<li class="
|
1791
|
-
|
1948
|
+
<li class="never" data-hits="" data-linenumber="51">
|
1949
|
+
|
1792
1950
|
|
1793
1951
|
<code class="ruby"> {</code>
|
1794
1952
|
</li>
|
1795
1953
|
|
1796
|
-
<li class="
|
1797
|
-
|
1954
|
+
<li class="covered" data-hits="2" data-linenumber="52">
|
1955
|
+
<span class="hits">2</span>
|
1798
1956
|
|
1799
1957
|
<code class="ruby"> expiration_intent: @expiration_intent,</code>
|
1800
1958
|
</li>
|
1801
1959
|
|
1802
|
-
<li class="never" data-hits="" data-linenumber="
|
1960
|
+
<li class="never" data-hits="" data-linenumber="53">
|
1803
1961
|
|
1804
1962
|
|
1805
1963
|
<code class="ruby"> auto_renew_status: @auto_renew_status,</code>
|
1806
1964
|
</li>
|
1807
1965
|
|
1808
|
-
<li class="never" data-hits="" data-linenumber="
|
1966
|
+
<li class="never" data-hits="" data-linenumber="54">
|
1809
1967
|
|
1810
1968
|
|
1811
1969
|
<code class="ruby"> auto_renew_product_id: @auto_renew_product_id,</code>
|
1812
1970
|
</li>
|
1813
1971
|
|
1814
|
-
<li class="never" data-hits="" data-linenumber="
|
1972
|
+
<li class="never" data-hits="" data-linenumber="55">
|
1815
1973
|
|
1816
1974
|
|
1817
1975
|
<code class="ruby"> is_in_billing_retry_period: @is_in_billing_retry_period,</code>
|
1818
1976
|
</li>
|
1819
1977
|
|
1820
|
-
<li class="never" data-hits="" data-linenumber="
|
1978
|
+
<li class="never" data-hits="" data-linenumber="56">
|
1821
1979
|
|
1822
1980
|
|
1823
1981
|
<code class="ruby"> product_id: @product_id,</code>
|
1824
1982
|
</li>
|
1825
1983
|
|
1826
|
-
<li class="never" data-hits="" data-linenumber="
|
1984
|
+
<li class="never" data-hits="" data-linenumber="57">
|
1827
1985
|
|
1828
1986
|
|
1829
1987
|
<code class="ruby"> price_consent_status: @price_consent_status,</code>
|
1830
1988
|
</li>
|
1831
1989
|
|
1832
|
-
<li class="never" data-hits="" data-linenumber="
|
1990
|
+
<li class="never" data-hits="" data-linenumber="58">
|
1833
1991
|
|
1834
1992
|
|
1835
1993
|
<code class="ruby"> cancellation_reason: @cancellation_reason</code>
|
1836
1994
|
</li>
|
1837
1995
|
|
1838
|
-
<li class="never" data-hits="" data-linenumber="
|
1996
|
+
<li class="never" data-hits="" data-linenumber="59">
|
1839
1997
|
|
1840
1998
|
|
1841
1999
|
<code class="ruby"> }</code>
|
1842
2000
|
</li>
|
1843
2001
|
|
1844
|
-
<li class="never" data-hits="" data-linenumber="
|
2002
|
+
<li class="never" data-hits="" data-linenumber="60">
|
1845
2003
|
|
1846
2004
|
|
1847
2005
|
<code class="ruby"> end</code>
|
1848
2006
|
</li>
|
1849
2007
|
|
1850
|
-
<li class="never" data-hits="" data-linenumber="
|
2008
|
+
<li class="never" data-hits="" data-linenumber="61">
|
1851
2009
|
|
1852
2010
|
|
1853
2011
|
<code class="ruby"></code>
|
1854
2012
|
</li>
|
1855
2013
|
|
1856
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2014
|
+
<li class="covered" data-hits="1" data-linenumber="62">
|
1857
2015
|
<span class="hits">1</span>
|
1858
2016
|
|
1859
2017
|
<code class="ruby"> alias_method :to_h, :to_hash</code>
|
1860
2018
|
</li>
|
1861
2019
|
|
1862
|
-
<li class="never" data-hits="" data-linenumber="
|
2020
|
+
<li class="never" data-hits="" data-linenumber="63">
|
1863
2021
|
|
1864
2022
|
|
1865
2023
|
<code class="ruby"></code>
|
1866
2024
|
</li>
|
1867
2025
|
|
1868
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2026
|
+
<li class="covered" data-hits="1" data-linenumber="64">
|
1869
2027
|
<span class="hits">1</span>
|
1870
2028
|
|
1871
2029
|
<code class="ruby"> def to_json</code>
|
1872
2030
|
</li>
|
1873
2031
|
|
1874
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2032
|
+
<li class="missed" data-hits="0" data-linenumber="65">
|
1875
2033
|
|
1876
2034
|
|
1877
2035
|
<code class="ruby"> to_hash.to_json</code>
|
1878
2036
|
</li>
|
1879
2037
|
|
1880
|
-
<li class="never" data-hits="" data-linenumber="
|
2038
|
+
<li class="never" data-hits="" data-linenumber="66">
|
1881
2039
|
|
1882
2040
|
|
1883
2041
|
<code class="ruby"> end</code>
|
1884
2042
|
</li>
|
1885
2043
|
|
1886
|
-
<li class="never" data-hits="" data-linenumber="
|
2044
|
+
<li class="never" data-hits="" data-linenumber="67">
|
1887
2045
|
|
1888
2046
|
|
1889
2047
|
<code class="ruby"> end</code>
|
1890
2048
|
</li>
|
1891
2049
|
|
1892
|
-
<li class="never" data-hits="" data-linenumber="
|
2050
|
+
<li class="never" data-hits="" data-linenumber="68">
|
1893
2051
|
|
1894
2052
|
|
1895
2053
|
<code class="ruby">end</code>
|
@@ -1900,14 +2058,14 @@
|
|
1900
2058
|
</div>
|
1901
2059
|
|
1902
2060
|
|
1903
|
-
<div class="source_table" id="
|
2061
|
+
<div class="source_table" id="10dfdb14e321a7bb364075307e5a80a2a62317af">
|
1904
2062
|
<div class="header">
|
1905
2063
|
<h3>lib/venice/receipt.rb</h3>
|
1906
|
-
<h4><span class="red">
|
2064
|
+
<h4><span class="red">80.0 %</span> covered</h4>
|
1907
2065
|
<div>
|
1908
|
-
<b>
|
1909
|
-
<span class="green"><b>
|
1910
|
-
<span class="red"><b>
|
2066
|
+
<b>95</b> relevant lines.
|
2067
|
+
<span class="green"><b>76</b> lines covered</span> and
|
2068
|
+
<span class="red"><b>19</b> lines missed.</span>
|
1911
2069
|
</div>
|
1912
2070
|
</div>
|
1913
2071
|
|
@@ -1938,1040 +2096,1105 @@
|
|
1938
2096
|
<code class="ruby"> class Receipt</code>
|
1939
2097
|
</li>
|
1940
2098
|
|
1941
|
-
<li class="
|
2099
|
+
<li class="covered" data-hits="1" data-linenumber="5">
|
2100
|
+
<span class="hits">1</span>
|
2101
|
+
|
2102
|
+
<code class="ruby"> MAX_RE_VERIFY_COUNT = 3</code>
|
2103
|
+
</li>
|
2104
|
+
|
2105
|
+
<li class="never" data-hits="" data-linenumber="6">
|
2106
|
+
|
2107
|
+
|
2108
|
+
<code class="ruby"></code>
|
2109
|
+
</li>
|
2110
|
+
|
2111
|
+
<li class="never" data-hits="" data-linenumber="7">
|
1942
2112
|
|
1943
2113
|
|
1944
2114
|
<code class="ruby"> # For detailed explanations on these keys/values, see</code>
|
1945
2115
|
</li>
|
1946
2116
|
|
1947
|
-
<li class="never" data-hits="" data-linenumber="
|
2117
|
+
<li class="never" data-hits="" data-linenumber="8">
|
1948
2118
|
|
1949
2119
|
|
1950
2120
|
<code class="ruby"> # https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW1</code>
|
1951
2121
|
</li>
|
1952
2122
|
|
1953
|
-
<li class="never" data-hits="" data-linenumber="
|
2123
|
+
<li class="never" data-hits="" data-linenumber="9">
|
1954
2124
|
|
1955
2125
|
|
1956
2126
|
<code class="ruby"></code>
|
1957
2127
|
</li>
|
1958
2128
|
|
1959
|
-
<li class="never" data-hits="" data-linenumber="
|
2129
|
+
<li class="never" data-hits="" data-linenumber="10">
|
1960
2130
|
|
1961
2131
|
|
1962
2132
|
<code class="ruby"> # The app’s bundle identifier.</code>
|
1963
2133
|
</li>
|
1964
2134
|
|
1965
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2135
|
+
<li class="covered" data-hits="1" data-linenumber="11">
|
1966
2136
|
<span class="hits">1</span>
|
1967
2137
|
|
1968
2138
|
<code class="ruby"> attr_reader :bundle_id</code>
|
1969
2139
|
</li>
|
1970
2140
|
|
1971
|
-
<li class="never" data-hits="" data-linenumber="
|
2141
|
+
<li class="never" data-hits="" data-linenumber="12">
|
1972
2142
|
|
1973
2143
|
|
1974
2144
|
<code class="ruby"></code>
|
1975
2145
|
</li>
|
1976
2146
|
|
1977
|
-
<li class="never" data-hits="" data-linenumber="
|
2147
|
+
<li class="never" data-hits="" data-linenumber="13">
|
1978
2148
|
|
1979
2149
|
|
1980
2150
|
<code class="ruby"> # The app’s version number.</code>
|
1981
2151
|
</li>
|
1982
2152
|
|
1983
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2153
|
+
<li class="covered" data-hits="1" data-linenumber="14">
|
1984
2154
|
<span class="hits">1</span>
|
1985
2155
|
|
1986
2156
|
<code class="ruby"> attr_reader :application_version</code>
|
1987
2157
|
</li>
|
1988
2158
|
|
1989
|
-
<li class="never" data-hits="" data-linenumber="
|
2159
|
+
<li class="never" data-hits="" data-linenumber="15">
|
1990
2160
|
|
1991
2161
|
|
1992
2162
|
<code class="ruby"></code>
|
1993
2163
|
</li>
|
1994
2164
|
|
1995
|
-
<li class="never" data-hits="" data-linenumber="
|
2165
|
+
<li class="never" data-hits="" data-linenumber="16">
|
1996
2166
|
|
1997
2167
|
|
1998
2168
|
<code class="ruby"> # The receipt for an in-app purchase.</code>
|
1999
2169
|
</li>
|
2000
2170
|
|
2001
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2171
|
+
<li class="covered" data-hits="1" data-linenumber="17">
|
2002
2172
|
<span class="hits">1</span>
|
2003
2173
|
|
2004
2174
|
<code class="ruby"> attr_reader :in_app</code>
|
2005
2175
|
</li>
|
2006
2176
|
|
2007
|
-
<li class="never" data-hits="" data-linenumber="
|
2177
|
+
<li class="never" data-hits="" data-linenumber="18">
|
2008
2178
|
|
2009
2179
|
|
2010
2180
|
<code class="ruby"></code>
|
2011
2181
|
</li>
|
2012
2182
|
|
2013
|
-
<li class="never" data-hits="" data-linenumber="
|
2183
|
+
<li class="never" data-hits="" data-linenumber="19">
|
2014
2184
|
|
2015
2185
|
|
2016
2186
|
<code class="ruby"> # The version of the app that was originally purchased.</code>
|
2017
2187
|
</li>
|
2018
2188
|
|
2019
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2189
|
+
<li class="covered" data-hits="1" data-linenumber="20">
|
2020
2190
|
<span class="hits">1</span>
|
2021
2191
|
|
2022
2192
|
<code class="ruby"> attr_reader :original_application_version</code>
|
2023
2193
|
</li>
|
2024
2194
|
|
2025
|
-
<li class="never" data-hits="" data-linenumber="
|
2195
|
+
<li class="never" data-hits="" data-linenumber="21">
|
2026
2196
|
|
2027
2197
|
|
2028
2198
|
<code class="ruby"></code>
|
2029
2199
|
</li>
|
2030
2200
|
|
2031
|
-
<li class="never" data-hits="" data-linenumber="
|
2201
|
+
<li class="never" data-hits="" data-linenumber="22">
|
2032
2202
|
|
2033
2203
|
|
2034
2204
|
<code class="ruby"> # The original purchase date</code>
|
2035
2205
|
</li>
|
2036
2206
|
|
2037
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2207
|
+
<li class="covered" data-hits="1" data-linenumber="23">
|
2038
2208
|
<span class="hits">1</span>
|
2039
2209
|
|
2040
2210
|
<code class="ruby"> attr_reader :original_purchase_date</code>
|
2041
2211
|
</li>
|
2042
2212
|
|
2043
|
-
<li class="never" data-hits="" data-linenumber="
|
2213
|
+
<li class="never" data-hits="" data-linenumber="24">
|
2044
2214
|
|
2045
2215
|
|
2046
2216
|
<code class="ruby"></code>
|
2047
2217
|
</li>
|
2048
2218
|
|
2049
|
-
<li class="never" data-hits="" data-linenumber="
|
2219
|
+
<li class="never" data-hits="" data-linenumber="25">
|
2050
2220
|
|
2051
2221
|
|
2052
2222
|
<code class="ruby"> # The date that the app receipt expires.</code>
|
2053
2223
|
</li>
|
2054
2224
|
|
2055
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2225
|
+
<li class="covered" data-hits="1" data-linenumber="26">
|
2056
2226
|
<span class="hits">1</span>
|
2057
2227
|
|
2058
2228
|
<code class="ruby"> attr_reader :expires_at</code>
|
2059
2229
|
</li>
|
2060
2230
|
|
2061
|
-
<li class="never" data-hits="" data-linenumber="
|
2231
|
+
<li class="never" data-hits="" data-linenumber="27">
|
2062
2232
|
|
2063
2233
|
|
2064
2234
|
<code class="ruby"></code>
|
2065
2235
|
</li>
|
2066
2236
|
|
2067
|
-
<li class="never" data-hits="" data-linenumber="
|
2237
|
+
<li class="never" data-hits="" data-linenumber="28">
|
2068
2238
|
|
2069
2239
|
|
2070
2240
|
<code class="ruby"> # Non-Documented receipt keys/values</code>
|
2071
2241
|
</li>
|
2072
2242
|
|
2073
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2243
|
+
<li class="covered" data-hits="1" data-linenumber="29">
|
2074
2244
|
<span class="hits">1</span>
|
2075
2245
|
|
2076
2246
|
<code class="ruby"> attr_reader :receipt_type</code>
|
2077
2247
|
</li>
|
2078
2248
|
|
2079
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2249
|
+
<li class="covered" data-hits="1" data-linenumber="30">
|
2080
2250
|
<span class="hits">1</span>
|
2081
2251
|
|
2082
2252
|
<code class="ruby"> attr_reader :adam_id</code>
|
2083
2253
|
</li>
|
2084
2254
|
|
2085
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2255
|
+
<li class="covered" data-hits="1" data-linenumber="31">
|
2086
2256
|
<span class="hits">1</span>
|
2087
2257
|
|
2088
2258
|
<code class="ruby"> attr_reader :download_id</code>
|
2089
2259
|
</li>
|
2090
2260
|
|
2091
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2261
|
+
<li class="covered" data-hits="1" data-linenumber="32">
|
2092
2262
|
<span class="hits">1</span>
|
2093
2263
|
|
2094
2264
|
<code class="ruby"> attr_reader :requested_at</code>
|
2095
2265
|
</li>
|
2096
2266
|
|
2097
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2267
|
+
<li class="covered" data-hits="1" data-linenumber="33">
|
2098
2268
|
<span class="hits">1</span>
|
2099
2269
|
|
2100
2270
|
<code class="ruby"> attr_reader :receipt_created_at</code>
|
2101
2271
|
</li>
|
2102
2272
|
|
2103
|
-
<li class="
|
2273
|
+
<li class="covered" data-hits="1" data-linenumber="34">
|
2274
|
+
<span class="hits">1</span>
|
2275
|
+
|
2276
|
+
<code class="ruby"> attr_reader :expiration_intent</code>
|
2277
|
+
</li>
|
2278
|
+
|
2279
|
+
<li class="never" data-hits="" data-linenumber="35">
|
2104
2280
|
|
2105
2281
|
|
2106
2282
|
<code class="ruby"></code>
|
2107
2283
|
</li>
|
2108
2284
|
|
2109
|
-
<li class="never" data-hits="" data-linenumber="
|
2285
|
+
<li class="never" data-hits="" data-linenumber="36">
|
2110
2286
|
|
2111
2287
|
|
2112
2288
|
<code class="ruby"> # Original json response from AppStore</code>
|
2113
2289
|
</li>
|
2114
2290
|
|
2115
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2291
|
+
<li class="covered" data-hits="1" data-linenumber="37">
|
2116
2292
|
<span class="hits">1</span>
|
2117
2293
|
|
2118
2294
|
<code class="ruby"> attr_reader :original_json_response</code>
|
2119
2295
|
</li>
|
2120
2296
|
|
2121
|
-
<li class="never" data-hits="" data-linenumber="
|
2297
|
+
<li class="never" data-hits="" data-linenumber="38">
|
2122
2298
|
|
2123
2299
|
|
2124
2300
|
<code class="ruby"></code>
|
2125
2301
|
</li>
|
2126
2302
|
|
2127
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2303
|
+
<li class="covered" data-hits="1" data-linenumber="39">
|
2128
2304
|
<span class="hits">1</span>
|
2129
2305
|
|
2130
2306
|
<code class="ruby"> attr_accessor :latest_receipt_info</code>
|
2131
2307
|
</li>
|
2132
2308
|
|
2133
|
-
<li class="never" data-hits="" data-linenumber="
|
2309
|
+
<li class="never" data-hits="" data-linenumber="40">
|
2134
2310
|
|
2135
2311
|
|
2136
2312
|
<code class="ruby"></code>
|
2137
2313
|
</li>
|
2138
2314
|
|
2139
|
-
<li class="never" data-hits="" data-linenumber="
|
2315
|
+
<li class="never" data-hits="" data-linenumber="41">
|
2140
2316
|
|
2141
2317
|
|
2142
2318
|
<code class="ruby"> # Information about the status of the customer's auto-renewable subscriptions</code>
|
2143
2319
|
</li>
|
2144
2320
|
|
2145
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2321
|
+
<li class="covered" data-hits="1" data-linenumber="42">
|
2146
2322
|
<span class="hits">1</span>
|
2147
2323
|
|
2148
2324
|
<code class="ruby"> attr_reader :pending_renewal_info</code>
|
2149
2325
|
</li>
|
2150
2326
|
|
2151
|
-
<li class="never" data-hits="" data-linenumber="
|
2327
|
+
<li class="never" data-hits="" data-linenumber="43">
|
2152
2328
|
|
2153
2329
|
|
2154
2330
|
<code class="ruby"></code>
|
2155
2331
|
</li>
|
2156
2332
|
|
2157
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2333
|
+
<li class="covered" data-hits="1" data-linenumber="44">
|
2158
2334
|
<span class="hits">1</span>
|
2159
2335
|
|
2160
2336
|
<code class="ruby"> def initialize(attributes = {})</code>
|
2161
2337
|
</li>
|
2162
2338
|
|
2163
|
-
<li class="covered" data-hits="
|
2164
|
-
<span class="hits">
|
2339
|
+
<li class="covered" data-hits="12" data-linenumber="45">
|
2340
|
+
<span class="hits">12</span>
|
2165
2341
|
|
2166
2342
|
<code class="ruby"> @original_json_response = attributes['original_json_response']</code>
|
2167
2343
|
</li>
|
2168
2344
|
|
2169
|
-
<li class="never" data-hits="" data-linenumber="
|
2345
|
+
<li class="never" data-hits="" data-linenumber="46">
|
2170
2346
|
|
2171
2347
|
|
2172
2348
|
<code class="ruby"></code>
|
2173
2349
|
</li>
|
2174
2350
|
|
2175
|
-
<li class="covered" data-hits="
|
2176
|
-
<span class="hits">
|
2351
|
+
<li class="covered" data-hits="12" data-linenumber="47">
|
2352
|
+
<span class="hits">12</span>
|
2177
2353
|
|
2178
2354
|
<code class="ruby"> @bundle_id = attributes['bundle_id']</code>
|
2179
2355
|
</li>
|
2180
2356
|
|
2181
|
-
<li class="covered" data-hits="
|
2182
|
-
<span class="hits">
|
2357
|
+
<li class="covered" data-hits="12" data-linenumber="48">
|
2358
|
+
<span class="hits">12</span>
|
2183
2359
|
|
2184
2360
|
<code class="ruby"> @application_version = attributes['application_version']</code>
|
2185
2361
|
</li>
|
2186
2362
|
|
2187
|
-
<li class="covered" data-hits="
|
2188
|
-
<span class="hits">
|
2363
|
+
<li class="covered" data-hits="12" data-linenumber="49">
|
2364
|
+
<span class="hits">12</span>
|
2189
2365
|
|
2190
2366
|
<code class="ruby"> @original_application_version = attributes['original_application_version']</code>
|
2191
2367
|
</li>
|
2192
2368
|
|
2193
|
-
<li class="covered" data-hits="
|
2194
|
-
<span class="hits">
|
2369
|
+
<li class="covered" data-hits="12" data-linenumber="50">
|
2370
|
+
<span class="hits">12</span>
|
2195
2371
|
|
2196
2372
|
<code class="ruby"> if attributes['original_purchase_date']</code>
|
2197
2373
|
</li>
|
2198
2374
|
|
2199
|
-
<li class="covered" data-hits="
|
2200
|
-
<span class="hits">
|
2375
|
+
<li class="covered" data-hits="9" data-linenumber="51">
|
2376
|
+
<span class="hits">9</span>
|
2201
2377
|
|
2202
2378
|
<code class="ruby"> @original_purchase_date = DateTime.parse(attributes['original_purchase_date'])</code>
|
2203
2379
|
</li>
|
2204
2380
|
|
2205
|
-
<li class="never" data-hits="" data-linenumber="
|
2381
|
+
<li class="never" data-hits="" data-linenumber="52">
|
2206
2382
|
|
2207
2383
|
|
2208
2384
|
<code class="ruby"> end</code>
|
2209
2385
|
</li>
|
2210
2386
|
|
2211
|
-
<li class="covered" data-hits="
|
2212
|
-
<span class="hits">
|
2387
|
+
<li class="covered" data-hits="12" data-linenumber="53">
|
2388
|
+
<span class="hits">12</span>
|
2213
2389
|
|
2214
2390
|
<code class="ruby"> if attributes['expiration_date']</code>
|
2215
2391
|
</li>
|
2216
2392
|
|
2217
|
-
<li class="covered" data-hits="
|
2218
|
-
<span class="hits">
|
2393
|
+
<li class="covered" data-hits="9" data-linenumber="54">
|
2394
|
+
<span class="hits">9</span>
|
2219
2395
|
|
2220
2396
|
<code class="ruby"> @expires_at = Time.at(attributes['expiration_date'].to_i / 1000).to_datetime</code>
|
2221
2397
|
</li>
|
2222
2398
|
|
2223
|
-
<li class="never" data-hits="" data-linenumber="
|
2399
|
+
<li class="never" data-hits="" data-linenumber="55">
|
2224
2400
|
|
2225
2401
|
|
2226
2402
|
<code class="ruby"> end</code>
|
2227
2403
|
</li>
|
2228
2404
|
|
2229
|
-
<li class="never" data-hits="" data-linenumber="
|
2405
|
+
<li class="never" data-hits="" data-linenumber="56">
|
2230
2406
|
|
2231
2407
|
|
2232
2408
|
<code class="ruby"></code>
|
2233
2409
|
</li>
|
2234
2410
|
|
2235
|
-
<li class="covered" data-hits="
|
2236
|
-
<span class="hits">
|
2411
|
+
<li class="covered" data-hits="12" data-linenumber="57">
|
2412
|
+
<span class="hits">12</span>
|
2237
2413
|
|
2238
2414
|
<code class="ruby"> @receipt_type = attributes['receipt_type']</code>
|
2239
2415
|
</li>
|
2240
2416
|
|
2241
|
-
<li class="covered" data-hits="
|
2242
|
-
<span class="hits">
|
2417
|
+
<li class="covered" data-hits="12" data-linenumber="58">
|
2418
|
+
<span class="hits">12</span>
|
2243
2419
|
|
2244
2420
|
<code class="ruby"> @adam_id = attributes['adam_id']</code>
|
2245
2421
|
</li>
|
2246
2422
|
|
2247
|
-
<li class="covered" data-hits="
|
2248
|
-
<span class="hits">
|
2423
|
+
<li class="covered" data-hits="12" data-linenumber="59">
|
2424
|
+
<span class="hits">12</span>
|
2249
2425
|
|
2250
2426
|
<code class="ruby"> @download_id = attributes['download_id']</code>
|
2251
2427
|
</li>
|
2252
2428
|
|
2253
|
-
<li class="covered" data-hits="
|
2254
|
-
<span class="hits">
|
2429
|
+
<li class="covered" data-hits="12" data-linenumber="60">
|
2430
|
+
<span class="hits">12</span>
|
2255
2431
|
|
2256
2432
|
<code class="ruby"> @requested_at = DateTime.parse(attributes['request_date']) if attributes['request_date']</code>
|
2257
2433
|
</li>
|
2258
2434
|
|
2259
|
-
<li class="covered" data-hits="
|
2260
|
-
<span class="hits">
|
2435
|
+
<li class="covered" data-hits="12" data-linenumber="61">
|
2436
|
+
<span class="hits">12</span>
|
2261
2437
|
|
2262
2438
|
<code class="ruby"> @receipt_created_at = DateTime.parse(attributes['receipt_creation_date']) if attributes['receipt_creation_date']</code>
|
2263
2439
|
</li>
|
2264
2440
|
|
2265
|
-
<li class="
|
2441
|
+
<li class="covered" data-hits="12" data-linenumber="62">
|
2442
|
+
<span class="hits">12</span>
|
2443
|
+
|
2444
|
+
<code class="ruby"> @expiration_intent = Integer(original_json_response['expiration_intent']) if original_json_response['expiration_intent']</code>
|
2445
|
+
</li>
|
2446
|
+
|
2447
|
+
<li class="never" data-hits="" data-linenumber="63">
|
2266
2448
|
|
2267
2449
|
|
2268
2450
|
<code class="ruby"></code>
|
2269
2451
|
</li>
|
2270
2452
|
|
2271
|
-
<li class="covered" data-hits="
|
2272
|
-
<span class="hits">
|
2453
|
+
<li class="covered" data-hits="12" data-linenumber="64">
|
2454
|
+
<span class="hits">12</span>
|
2273
2455
|
|
2274
2456
|
<code class="ruby"> @in_app = []</code>
|
2275
2457
|
</li>
|
2276
2458
|
|
2277
|
-
<li class="covered" data-hits="
|
2278
|
-
<span class="hits">
|
2459
|
+
<li class="covered" data-hits="12" data-linenumber="65">
|
2460
|
+
<span class="hits">12</span>
|
2279
2461
|
|
2280
2462
|
<code class="ruby"> if attributes['in_app']</code>
|
2281
2463
|
</li>
|
2282
2464
|
|
2283
|
-
<li class="covered" data-hits="
|
2284
|
-
<span class="hits">
|
2465
|
+
<li class="covered" data-hits="9" data-linenumber="66">
|
2466
|
+
<span class="hits">9</span>
|
2285
2467
|
|
2286
2468
|
<code class="ruby"> attributes['in_app'].each do |in_app_purchase_attributes|</code>
|
2287
2469
|
</li>
|
2288
2470
|
|
2289
|
-
<li class="covered" data-hits="
|
2290
|
-
<span class="hits">
|
2471
|
+
<li class="covered" data-hits="9" data-linenumber="67">
|
2472
|
+
<span class="hits">9</span>
|
2291
2473
|
|
2292
2474
|
<code class="ruby"> @in_app << InAppReceipt.new(in_app_purchase_attributes)</code>
|
2293
2475
|
</li>
|
2294
2476
|
|
2295
|
-
<li class="never" data-hits="" data-linenumber="
|
2477
|
+
<li class="never" data-hits="" data-linenumber="68">
|
2296
2478
|
|
2297
2479
|
|
2298
2480
|
<code class="ruby"> end</code>
|
2299
2481
|
</li>
|
2300
2482
|
|
2301
|
-
<li class="never" data-hits="" data-linenumber="
|
2483
|
+
<li class="never" data-hits="" data-linenumber="69">
|
2302
2484
|
|
2303
2485
|
|
2304
2486
|
<code class="ruby"> end</code>
|
2305
2487
|
</li>
|
2306
2488
|
|
2307
|
-
<li class="never" data-hits="" data-linenumber="
|
2489
|
+
<li class="never" data-hits="" data-linenumber="70">
|
2308
2490
|
|
2309
2491
|
|
2310
2492
|
<code class="ruby"></code>
|
2311
2493
|
</li>
|
2312
2494
|
|
2313
|
-
<li class="covered" data-hits="
|
2314
|
-
<span class="hits">
|
2495
|
+
<li class="covered" data-hits="12" data-linenumber="71">
|
2496
|
+
<span class="hits">12</span>
|
2315
2497
|
|
2316
2498
|
<code class="ruby"> @pending_renewal_info = []</code>
|
2317
2499
|
</li>
|
2318
2500
|
|
2319
|
-
<li class="covered" data-hits="
|
2320
|
-
<span class="hits">
|
2501
|
+
<li class="covered" data-hits="12" data-linenumber="72">
|
2502
|
+
<span class="hits">12</span>
|
2321
2503
|
|
2322
2504
|
<code class="ruby"> if original_json_response && original_json_response['pending_renewal_info']</code>
|
2323
2505
|
</li>
|
2324
2506
|
|
2325
|
-
<li class="covered" data-hits="6" data-linenumber="
|
2507
|
+
<li class="covered" data-hits="6" data-linenumber="73">
|
2326
2508
|
<span class="hits">6</span>
|
2327
2509
|
|
2328
2510
|
<code class="ruby"> original_json_response['pending_renewal_info'].each do |pending_renewal_attributes|</code>
|
2329
2511
|
</li>
|
2330
2512
|
|
2331
|
-
<li class="covered" data-hits="6" data-linenumber="
|
2513
|
+
<li class="covered" data-hits="6" data-linenumber="74">
|
2332
2514
|
<span class="hits">6</span>
|
2333
2515
|
|
2334
2516
|
<code class="ruby"> @pending_renewal_info << PendingRenewalInfo.new(pending_renewal_attributes)</code>
|
2335
2517
|
</li>
|
2336
2518
|
|
2337
|
-
<li class="never" data-hits="" data-linenumber="
|
2519
|
+
<li class="never" data-hits="" data-linenumber="75">
|
2338
2520
|
|
2339
2521
|
|
2340
2522
|
<code class="ruby"> end</code>
|
2341
2523
|
</li>
|
2342
2524
|
|
2343
|
-
<li class="never" data-hits="" data-linenumber="
|
2525
|
+
<li class="never" data-hits="" data-linenumber="76">
|
2344
2526
|
|
2345
2527
|
|
2346
2528
|
<code class="ruby"> end</code>
|
2347
2529
|
</li>
|
2348
2530
|
|
2349
|
-
<li class="never" data-hits="" data-linenumber="
|
2531
|
+
<li class="never" data-hits="" data-linenumber="77">
|
2350
2532
|
|
2351
2533
|
|
2352
2534
|
<code class="ruby"> end</code>
|
2353
2535
|
</li>
|
2354
2536
|
|
2355
|
-
<li class="never" data-hits="" data-linenumber="
|
2537
|
+
<li class="never" data-hits="" data-linenumber="78">
|
2356
2538
|
|
2357
2539
|
|
2358
2540
|
<code class="ruby"></code>
|
2359
2541
|
</li>
|
2360
2542
|
|
2361
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2543
|
+
<li class="covered" data-hits="1" data-linenumber="79">
|
2362
2544
|
<span class="hits">1</span>
|
2363
2545
|
|
2364
2546
|
<code class="ruby"> def to_hash</code>
|
2365
2547
|
</li>
|
2366
2548
|
|
2367
|
-
<li class="
|
2368
|
-
|
2549
|
+
<li class="never" data-hits="" data-linenumber="80">
|
2550
|
+
|
2369
2551
|
|
2370
2552
|
<code class="ruby"> {</code>
|
2371
2553
|
</li>
|
2372
2554
|
|
2373
|
-
<li class="
|
2374
|
-
|
2555
|
+
<li class="covered" data-hits="1" data-linenumber="81">
|
2556
|
+
<span class="hits">1</span>
|
2375
2557
|
|
2376
2558
|
<code class="ruby"> bundle_id: @bundle_id,</code>
|
2377
2559
|
</li>
|
2378
2560
|
|
2379
|
-
<li class="never" data-hits="" data-linenumber="
|
2561
|
+
<li class="never" data-hits="" data-linenumber="82">
|
2380
2562
|
|
2381
2563
|
|
2382
2564
|
<code class="ruby"> application_version: @application_version,</code>
|
2383
2565
|
</li>
|
2384
2566
|
|
2385
|
-
<li class="never" data-hits="" data-linenumber="
|
2567
|
+
<li class="never" data-hits="" data-linenumber="83">
|
2386
2568
|
|
2387
2569
|
|
2388
2570
|
<code class="ruby"> original_application_version: @original_application_version,</code>
|
2389
2571
|
</li>
|
2390
2572
|
|
2391
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2573
|
+
<li class="covered" data-hits="1" data-linenumber="84">
|
2392
2574
|
<span class="hits">1</span>
|
2393
2575
|
|
2394
2576
|
<code class="ruby"> original_purchase_date: (@original_purchase_date.httpdate rescue nil),</code>
|
2395
2577
|
</li>
|
2396
2578
|
|
2397
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2579
|
+
<li class="covered" data-hits="1" data-linenumber="85">
|
2398
2580
|
<span class="hits">1</span>
|
2399
2581
|
|
2400
2582
|
<code class="ruby"> expires_at: (@expires_at.httpdate rescue nil),</code>
|
2401
2583
|
</li>
|
2402
2584
|
|
2403
|
-
<li class="never" data-hits="" data-linenumber="
|
2585
|
+
<li class="never" data-hits="" data-linenumber="86">
|
2404
2586
|
|
2405
2587
|
|
2406
2588
|
<code class="ruby"> receipt_type: @receipt_type,</code>
|
2407
2589
|
</li>
|
2408
2590
|
|
2409
|
-
<li class="never" data-hits="" data-linenumber="
|
2591
|
+
<li class="never" data-hits="" data-linenumber="87">
|
2410
2592
|
|
2411
2593
|
|
2412
2594
|
<code class="ruby"> adam_id: @adam_id,</code>
|
2413
2595
|
</li>
|
2414
2596
|
|
2415
|
-
<li class="never" data-hits="" data-linenumber="
|
2597
|
+
<li class="never" data-hits="" data-linenumber="88">
|
2416
2598
|
|
2417
2599
|
|
2418
2600
|
<code class="ruby"> download_id: @download_id,</code>
|
2419
2601
|
</li>
|
2420
2602
|
|
2421
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2603
|
+
<li class="covered" data-hits="1" data-linenumber="89">
|
2422
2604
|
<span class="hits">1</span>
|
2423
2605
|
|
2424
2606
|
<code class="ruby"> requested_at: (@requested_at.httpdate rescue nil),</code>
|
2425
2607
|
</li>
|
2426
2608
|
|
2427
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2609
|
+
<li class="covered" data-hits="1" data-linenumber="90">
|
2428
2610
|
<span class="hits">1</span>
|
2429
2611
|
|
2430
2612
|
<code class="ruby"> receipt_created_at: (@receipt_created_at.httpdate rescue nil),</code>
|
2431
2613
|
</li>
|
2432
2614
|
|
2433
|
-
<li class="never" data-hits="" data-linenumber="
|
2615
|
+
<li class="never" data-hits="" data-linenumber="91">
|
2434
2616
|
|
2435
2617
|
|
2436
2618
|
<code class="ruby"> in_app: @in_app.map(&:to_h),</code>
|
2437
2619
|
</li>
|
2438
2620
|
|
2439
|
-
<li class="never" data-hits="" data-linenumber="
|
2621
|
+
<li class="never" data-hits="" data-linenumber="92">
|
2440
2622
|
|
2441
2623
|
|
2442
2624
|
<code class="ruby"> pending_renewal_info: @pending_renewal_info.map(&:to_h),</code>
|
2443
2625
|
</li>
|
2444
2626
|
|
2445
|
-
<li class="never" data-hits="" data-linenumber="
|
2627
|
+
<li class="never" data-hits="" data-linenumber="93">
|
2446
2628
|
|
2447
2629
|
|
2448
2630
|
<code class="ruby"> latest_receipt_info: @latest_receipt_info</code>
|
2449
2631
|
</li>
|
2450
2632
|
|
2451
|
-
<li class="never" data-hits="" data-linenumber="
|
2633
|
+
<li class="never" data-hits="" data-linenumber="94">
|
2452
2634
|
|
2453
2635
|
|
2454
2636
|
<code class="ruby"> }</code>
|
2455
2637
|
</li>
|
2456
2638
|
|
2457
|
-
<li class="never" data-hits="" data-linenumber="
|
2639
|
+
<li class="never" data-hits="" data-linenumber="95">
|
2458
2640
|
|
2459
2641
|
|
2460
2642
|
<code class="ruby"> end</code>
|
2461
2643
|
</li>
|
2462
2644
|
|
2463
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2645
|
+
<li class="covered" data-hits="1" data-linenumber="96">
|
2464
2646
|
<span class="hits">1</span>
|
2465
2647
|
|
2466
2648
|
<code class="ruby"> alias_method :to_h, :to_hash</code>
|
2467
2649
|
</li>
|
2468
2650
|
|
2469
|
-
<li class="never" data-hits="" data-linenumber="
|
2651
|
+
<li class="never" data-hits="" data-linenumber="97">
|
2470
2652
|
|
2471
2653
|
|
2472
2654
|
<code class="ruby"></code>
|
2473
2655
|
</li>
|
2474
2656
|
|
2475
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2657
|
+
<li class="covered" data-hits="1" data-linenumber="98">
|
2476
2658
|
<span class="hits">1</span>
|
2477
2659
|
|
2478
2660
|
<code class="ruby"> def to_json</code>
|
2479
2661
|
</li>
|
2480
2662
|
|
2481
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2663
|
+
<li class="missed" data-hits="0" data-linenumber="99">
|
2482
2664
|
|
2483
2665
|
|
2484
2666
|
<code class="ruby"> to_hash.to_json</code>
|
2485
2667
|
</li>
|
2486
2668
|
|
2487
|
-
<li class="never" data-hits="" data-linenumber="
|
2669
|
+
<li class="never" data-hits="" data-linenumber="100">
|
2488
2670
|
|
2489
2671
|
|
2490
2672
|
<code class="ruby"> end</code>
|
2491
2673
|
</li>
|
2492
2674
|
|
2493
|
-
<li class="never" data-hits="" data-linenumber="
|
2675
|
+
<li class="never" data-hits="" data-linenumber="101">
|
2494
2676
|
|
2495
2677
|
|
2496
2678
|
<code class="ruby"></code>
|
2497
2679
|
</li>
|
2498
2680
|
|
2499
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2681
|
+
<li class="covered" data-hits="1" data-linenumber="102">
|
2500
2682
|
<span class="hits">1</span>
|
2501
2683
|
|
2502
2684
|
<code class="ruby"> class << self</code>
|
2503
2685
|
</li>
|
2504
2686
|
|
2505
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2687
|
+
<li class="covered" data-hits="1" data-linenumber="103">
|
2506
2688
|
<span class="hits">1</span>
|
2507
2689
|
|
2508
2690
|
<code class="ruby"> def verify(data, options = {})</code>
|
2509
2691
|
</li>
|
2510
2692
|
|
2511
|
-
<li class="
|
2512
|
-
|
2693
|
+
<li class="missed" data-hits="0" data-linenumber="104">
|
2694
|
+
|
2513
2695
|
|
2514
2696
|
<code class="ruby"> verify!(data, options)</code>
|
2515
2697
|
</li>
|
2516
2698
|
|
2517
|
-
<li class="never" data-hits="" data-linenumber="
|
2699
|
+
<li class="never" data-hits="" data-linenumber="105">
|
2518
2700
|
|
2519
2701
|
|
2520
2702
|
<code class="ruby"> rescue VerificationError, Client::TimeoutError</code>
|
2521
2703
|
</li>
|
2522
2704
|
|
2523
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2705
|
+
<li class="missed" data-hits="0" data-linenumber="106">
|
2524
2706
|
|
2525
2707
|
|
2526
2708
|
<code class="ruby"> false</code>
|
2527
2709
|
</li>
|
2528
2710
|
|
2529
|
-
<li class="never" data-hits="" data-linenumber="
|
2711
|
+
<li class="never" data-hits="" data-linenumber="107">
|
2530
2712
|
|
2531
2713
|
|
2532
2714
|
<code class="ruby"> end</code>
|
2533
2715
|
</li>
|
2534
2716
|
|
2535
|
-
<li class="never" data-hits="" data-linenumber="
|
2717
|
+
<li class="never" data-hits="" data-linenumber="108">
|
2536
2718
|
|
2537
2719
|
|
2538
2720
|
<code class="ruby"></code>
|
2539
2721
|
</li>
|
2540
2722
|
|
2541
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2723
|
+
<li class="covered" data-hits="1" data-linenumber="109">
|
2542
2724
|
<span class="hits">1</span>
|
2543
2725
|
|
2544
2726
|
<code class="ruby"> def verify!(data, options = {})</code>
|
2545
2727
|
</li>
|
2546
2728
|
|
2547
|
-
<li class="covered" data-hits="
|
2548
|
-
<span class="hits">
|
2729
|
+
<li class="covered" data-hits="6" data-linenumber="110">
|
2730
|
+
<span class="hits">6</span>
|
2549
2731
|
|
2550
2732
|
<code class="ruby"> client = Client.production</code>
|
2551
2733
|
</li>
|
2552
2734
|
|
2553
|
-
<li class="never" data-hits="" data-linenumber="
|
2735
|
+
<li class="never" data-hits="" data-linenumber="111">
|
2554
2736
|
|
2555
2737
|
|
2556
2738
|
<code class="ruby"></code>
|
2557
2739
|
</li>
|
2558
2740
|
|
2559
|
-
<li class="covered" data-hits="
|
2560
|
-
<span class="hits">
|
2741
|
+
<li class="covered" data-hits="6" data-linenumber="112">
|
2742
|
+
<span class="hits">6</span>
|
2743
|
+
|
2744
|
+
<code class="ruby"> retry_count = 0</code>
|
2745
|
+
</li>
|
2746
|
+
|
2747
|
+
<li class="never" data-hits="" data-linenumber="113">
|
2748
|
+
|
2561
2749
|
|
2562
2750
|
<code class="ruby"> begin</code>
|
2563
2751
|
</li>
|
2564
2752
|
|
2565
|
-
<li class="covered" data-hits="
|
2566
|
-
<span class="hits">
|
2753
|
+
<li class="covered" data-hits="16" data-linenumber="114">
|
2754
|
+
<span class="hits">16</span>
|
2567
2755
|
|
2568
2756
|
<code class="ruby"> client.verify!(data, options)</code>
|
2569
2757
|
</li>
|
2570
2758
|
|
2571
|
-
<li class="
|
2572
|
-
|
2759
|
+
<li class="covered" data-hits="13" data-linenumber="115">
|
2760
|
+
<span class="hits">13</span>
|
2573
2761
|
|
2574
2762
|
<code class="ruby"> rescue VerificationError => error</code>
|
2575
2763
|
</li>
|
2576
2764
|
|
2577
|
-
<li class="
|
2578
|
-
|
2765
|
+
<li class="covered" data-hits="6" data-linenumber="116">
|
2766
|
+
<span class="hits">6</span>
|
2579
2767
|
|
2580
2768
|
<code class="ruby"> case error.code</code>
|
2581
2769
|
</li>
|
2582
2770
|
|
2583
|
-
<li class="never" data-hits="" data-linenumber="
|
2771
|
+
<li class="never" data-hits="" data-linenumber="117">
|
2584
2772
|
|
2585
2773
|
|
2586
2774
|
<code class="ruby"> when 21007</code>
|
2587
2775
|
</li>
|
2588
2776
|
|
2589
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2777
|
+
<li class="missed" data-hits="0" data-linenumber="118">
|
2590
2778
|
|
2591
2779
|
|
2592
2780
|
<code class="ruby"> client = Client.development</code>
|
2593
2781
|
</li>
|
2594
2782
|
|
2595
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2783
|
+
<li class="missed" data-hits="0" data-linenumber="119">
|
2596
2784
|
|
2597
2785
|
|
2598
2786
|
<code class="ruby"> retry</code>
|
2599
2787
|
</li>
|
2600
2788
|
|
2601
|
-
<li class="never" data-hits="" data-linenumber="
|
2789
|
+
<li class="never" data-hits="" data-linenumber="120">
|
2602
2790
|
|
2603
2791
|
|
2604
2792
|
<code class="ruby"> when 21008</code>
|
2605
2793
|
</li>
|
2606
2794
|
|
2607
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2795
|
+
<li class="missed" data-hits="0" data-linenumber="121">
|
2608
2796
|
|
2609
2797
|
|
2610
2798
|
<code class="ruby"> client = Client.production</code>
|
2611
2799
|
</li>
|
2612
2800
|
|
2613
|
-
<li class="missed" data-hits="0" data-linenumber="
|
2801
|
+
<li class="missed" data-hits="0" data-linenumber="122">
|
2614
2802
|
|
2615
2803
|
|
2616
2804
|
<code class="ruby"> retry</code>
|
2617
2805
|
</li>
|
2618
2806
|
|
2619
|
-
<li class="never" data-hits="" data-linenumber="
|
2807
|
+
<li class="never" data-hits="" data-linenumber="123">
|
2620
2808
|
|
2621
2809
|
|
2622
2810
|
<code class="ruby"> else</code>
|
2623
2811
|
</li>
|
2624
2812
|
|
2625
|
-
<li class="
|
2813
|
+
<li class="covered" data-hits="6" data-linenumber="124">
|
2814
|
+
<span class="hits">6</span>
|
2815
|
+
|
2816
|
+
<code class="ruby"> retry_count += 1</code>
|
2817
|
+
</li>
|
2818
|
+
|
2819
|
+
<li class="covered" data-hits="6" data-linenumber="125">
|
2820
|
+
<span class="hits">6</span>
|
2821
|
+
|
2822
|
+
<code class="ruby"> if error.retryable? && retry_count <= MAX_RE_VERIFY_COUNT</code>
|
2823
|
+
</li>
|
2824
|
+
|
2825
|
+
<li class="covered" data-hits="4" data-linenumber="126">
|
2826
|
+
<span class="hits">4</span>
|
2827
|
+
|
2828
|
+
<code class="ruby"> retry</code>
|
2829
|
+
</li>
|
2830
|
+
|
2831
|
+
<li class="never" data-hits="" data-linenumber="127">
|
2626
2832
|
|
2627
2833
|
|
2834
|
+
<code class="ruby"> end</code>
|
2835
|
+
</li>
|
2836
|
+
|
2837
|
+
<li class="never" data-hits="" data-linenumber="128">
|
2838
|
+
|
2839
|
+
|
2840
|
+
<code class="ruby"></code>
|
2841
|
+
</li>
|
2842
|
+
|
2843
|
+
<li class="covered" data-hits="2" data-linenumber="129">
|
2844
|
+
<span class="hits">2</span>
|
2845
|
+
|
2628
2846
|
<code class="ruby"> raise error</code>
|
2629
2847
|
</li>
|
2630
2848
|
|
2631
|
-
<li class="never" data-hits="" data-linenumber="
|
2849
|
+
<li class="never" data-hits="" data-linenumber="130">
|
2632
2850
|
|
2633
2851
|
|
2634
2852
|
<code class="ruby"> end</code>
|
2635
2853
|
</li>
|
2636
2854
|
|
2637
|
-
<li class="never" data-hits="" data-linenumber="
|
2855
|
+
<li class="never" data-hits="" data-linenumber="131">
|
2856
|
+
|
2857
|
+
|
2858
|
+
<code class="ruby"> rescue Net::ReadTimeout, Timeout::Error, OpenSSL::SSL::SSLError,</code>
|
2859
|
+
</li>
|
2860
|
+
|
2861
|
+
<li class="never" data-hits="" data-linenumber="132">
|
2862
|
+
|
2863
|
+
|
2864
|
+
<code class="ruby"> Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE</code>
|
2865
|
+
</li>
|
2866
|
+
|
2867
|
+
<li class="never" data-hits="" data-linenumber="133">
|
2868
|
+
|
2869
|
+
|
2870
|
+
<code class="ruby"> # verifyReceipt is idempotent so we can retry it.</code>
|
2871
|
+
</li>
|
2872
|
+
|
2873
|
+
<li class="never" data-hits="" data-linenumber="134">
|
2874
|
+
|
2875
|
+
|
2876
|
+
<code class="ruby"> # Net::Http has retry logic for some idempotent http methods but it verifyReceipt is POST.</code>
|
2877
|
+
</li>
|
2878
|
+
|
2879
|
+
<li class="covered" data-hits="7" data-linenumber="135">
|
2880
|
+
<span class="hits">7</span>
|
2881
|
+
|
2882
|
+
<code class="ruby"> retry_count += 1</code>
|
2883
|
+
</li>
|
2884
|
+
|
2885
|
+
<li class="covered" data-hits="7" data-linenumber="136">
|
2886
|
+
<span class="hits">7</span>
|
2887
|
+
|
2888
|
+
<code class="ruby"> retry if retry_count <= MAX_RE_VERIFY_COUNT</code>
|
2889
|
+
</li>
|
2890
|
+
|
2891
|
+
<li class="covered" data-hits="1" data-linenumber="137">
|
2892
|
+
<span class="hits">1</span>
|
2893
|
+
|
2894
|
+
<code class="ruby"> raise</code>
|
2895
|
+
</li>
|
2896
|
+
|
2897
|
+
<li class="never" data-hits="" data-linenumber="138">
|
2638
2898
|
|
2639
2899
|
|
2640
2900
|
<code class="ruby"> end</code>
|
2641
2901
|
</li>
|
2642
2902
|
|
2643
|
-
<li class="never" data-hits="" data-linenumber="
|
2903
|
+
<li class="never" data-hits="" data-linenumber="139">
|
2644
2904
|
|
2645
2905
|
|
2646
2906
|
<code class="ruby"> end</code>
|
2647
2907
|
</li>
|
2648
2908
|
|
2649
|
-
<li class="never" data-hits="" data-linenumber="
|
2909
|
+
<li class="never" data-hits="" data-linenumber="140">
|
2650
2910
|
|
2651
2911
|
|
2652
2912
|
<code class="ruby"></code>
|
2653
2913
|
</li>
|
2654
2914
|
|
2655
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2915
|
+
<li class="covered" data-hits="1" data-linenumber="141">
|
2656
2916
|
<span class="hits">1</span>
|
2657
2917
|
|
2658
2918
|
<code class="ruby"> alias :validate :verify</code>
|
2659
2919
|
</li>
|
2660
2920
|
|
2661
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2921
|
+
<li class="covered" data-hits="1" data-linenumber="142">
|
2662
2922
|
<span class="hits">1</span>
|
2663
2923
|
|
2664
2924
|
<code class="ruby"> alias :validate! :verify!</code>
|
2665
2925
|
</li>
|
2666
2926
|
|
2667
|
-
<li class="never" data-hits="" data-linenumber="
|
2927
|
+
<li class="never" data-hits="" data-linenumber="143">
|
2668
2928
|
|
2669
2929
|
|
2670
2930
|
<code class="ruby"> end</code>
|
2671
2931
|
</li>
|
2672
2932
|
|
2673
|
-
<li class="never" data-hits="" data-linenumber="
|
2933
|
+
<li class="never" data-hits="" data-linenumber="144">
|
2674
2934
|
|
2675
2935
|
|
2676
2936
|
<code class="ruby"></code>
|
2677
2937
|
</li>
|
2678
2938
|
|
2679
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2939
|
+
<li class="covered" data-hits="1" data-linenumber="145">
|
2680
2940
|
<span class="hits">1</span>
|
2681
2941
|
|
2682
2942
|
<code class="ruby"> class VerificationError < StandardError</code>
|
2683
2943
|
</li>
|
2684
2944
|
|
2685
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2945
|
+
<li class="covered" data-hits="1" data-linenumber="146">
|
2686
2946
|
<span class="hits">1</span>
|
2687
2947
|
|
2688
2948
|
<code class="ruby"> attr_accessor :json</code>
|
2689
2949
|
</li>
|
2690
2950
|
|
2691
|
-
<li class="never" data-hits="" data-linenumber="
|
2951
|
+
<li class="never" data-hits="" data-linenumber="147">
|
2692
2952
|
|
2693
2953
|
|
2694
2954
|
<code class="ruby"></code>
|
2695
2955
|
</li>
|
2696
2956
|
|
2697
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2957
|
+
<li class="covered" data-hits="1" data-linenumber="148">
|
2698
2958
|
<span class="hits">1</span>
|
2699
2959
|
|
2700
2960
|
<code class="ruby"> def initialize(json)</code>
|
2701
2961
|
</li>
|
2702
2962
|
|
2703
|
-
<li class="covered" data-hits="
|
2704
|
-
<span class="hits">
|
2963
|
+
<li class="covered" data-hits="8" data-linenumber="149">
|
2964
|
+
<span class="hits">8</span>
|
2705
2965
|
|
2706
2966
|
<code class="ruby"> @json = json</code>
|
2707
2967
|
</li>
|
2708
2968
|
|
2709
|
-
<li class="never" data-hits="" data-linenumber="
|
2969
|
+
<li class="never" data-hits="" data-linenumber="150">
|
2710
2970
|
|
2711
2971
|
|
2712
2972
|
<code class="ruby"> end</code>
|
2713
2973
|
</li>
|
2714
2974
|
|
2715
|
-
<li class="never" data-hits="" data-linenumber="
|
2975
|
+
<li class="never" data-hits="" data-linenumber="151">
|
2716
2976
|
|
2717
2977
|
|
2718
2978
|
<code class="ruby"></code>
|
2719
2979
|
</li>
|
2720
2980
|
|
2721
|
-
<li class="covered" data-hits="1" data-linenumber="
|
2981
|
+
<li class="covered" data-hits="1" data-linenumber="152">
|
2722
2982
|
<span class="hits">1</span>
|
2723
2983
|
|
2724
2984
|
<code class="ruby"> def code</code>
|
2725
2985
|
</li>
|
2726
2986
|
|
2727
|
-
<li class="covered" data-hits="
|
2728
|
-
<span class="hits">
|
2987
|
+
<li class="covered" data-hits="7" data-linenumber="153">
|
2988
|
+
<span class="hits">7</span>
|
2729
2989
|
|
2730
2990
|
<code class="ruby"> Integer(json['status'])</code>
|
2731
2991
|
</li>
|
2732
2992
|
|
2733
|
-
<li class="never" data-hits="" data-linenumber="
|
2993
|
+
<li class="never" data-hits="" data-linenumber="154">
|
2734
2994
|
|
2735
2995
|
|
2736
2996
|
<code class="ruby"> end</code>
|
2737
2997
|
</li>
|
2738
2998
|
|
2739
|
-
<li class="never" data-hits="" data-linenumber="
|
2999
|
+
<li class="never" data-hits="" data-linenumber="155">
|
2740
3000
|
|
2741
3001
|
|
2742
3002
|
<code class="ruby"></code>
|
2743
3003
|
</li>
|
2744
3004
|
|
2745
|
-
<li class="covered" data-hits="1" data-linenumber="
|
3005
|
+
<li class="covered" data-hits="1" data-linenumber="156">
|
2746
3006
|
<span class="hits">1</span>
|
2747
3007
|
|
2748
3008
|
<code class="ruby"> def retryable?</code>
|
2749
3009
|
</li>
|
2750
3010
|
|
2751
|
-
<li class="covered" data-hits="
|
2752
|
-
<span class="hits">
|
3011
|
+
<li class="covered" data-hits="8" data-linenumber="157">
|
3012
|
+
<span class="hits">8</span>
|
2753
3013
|
|
2754
3014
|
<code class="ruby"> json['is_retryable']</code>
|
2755
3015
|
</li>
|
2756
3016
|
|
2757
|
-
<li class="never" data-hits="" data-linenumber="
|
3017
|
+
<li class="never" data-hits="" data-linenumber="158">
|
2758
3018
|
|
2759
3019
|
|
2760
3020
|
<code class="ruby"> end</code>
|
2761
3021
|
</li>
|
2762
3022
|
|
2763
|
-
<li class="never" data-hits="" data-linenumber="
|
3023
|
+
<li class="never" data-hits="" data-linenumber="159">
|
2764
3024
|
|
2765
3025
|
|
2766
3026
|
<code class="ruby"></code>
|
2767
3027
|
</li>
|
2768
3028
|
|
2769
|
-
<li class="covered" data-hits="1" data-linenumber="
|
3029
|
+
<li class="covered" data-hits="1" data-linenumber="160">
|
2770
3030
|
<span class="hits">1</span>
|
2771
3031
|
|
2772
3032
|
<code class="ruby"> def message</code>
|
2773
3033
|
</li>
|
2774
3034
|
|
2775
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3035
|
+
<li class="missed" data-hits="0" data-linenumber="161">
|
2776
3036
|
|
2777
3037
|
|
2778
3038
|
<code class="ruby"> case code</code>
|
2779
3039
|
</li>
|
2780
3040
|
|
2781
|
-
<li class="never" data-hits="" data-linenumber="
|
3041
|
+
<li class="never" data-hits="" data-linenumber="162">
|
2782
3042
|
|
2783
3043
|
|
2784
3044
|
<code class="ruby"> when 21000</code>
|
2785
3045
|
</li>
|
2786
3046
|
|
2787
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3047
|
+
<li class="missed" data-hits="0" data-linenumber="163">
|
2788
3048
|
|
2789
3049
|
|
2790
3050
|
<code class="ruby"> 'The App Store could not read the JSON object you provided.'</code>
|
2791
3051
|
</li>
|
2792
3052
|
|
2793
|
-
<li class="never" data-hits="" data-linenumber="
|
3053
|
+
<li class="never" data-hits="" data-linenumber="164">
|
2794
3054
|
|
2795
3055
|
|
2796
3056
|
<code class="ruby"> when 21002</code>
|
2797
3057
|
</li>
|
2798
3058
|
|
2799
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3059
|
+
<li class="missed" data-hits="0" data-linenumber="165">
|
2800
3060
|
|
2801
3061
|
|
2802
3062
|
<code class="ruby"> 'The data in the receipt-data property was malformed.'</code>
|
2803
3063
|
</li>
|
2804
3064
|
|
2805
|
-
<li class="never" data-hits="" data-linenumber="
|
3065
|
+
<li class="never" data-hits="" data-linenumber="166">
|
2806
3066
|
|
2807
3067
|
|
2808
3068
|
<code class="ruby"> when 21003</code>
|
2809
3069
|
</li>
|
2810
3070
|
|
2811
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3071
|
+
<li class="missed" data-hits="0" data-linenumber="167">
|
2812
3072
|
|
2813
3073
|
|
2814
3074
|
<code class="ruby"> 'The receipt could not be authenticated.'</code>
|
2815
3075
|
</li>
|
2816
3076
|
|
2817
|
-
<li class="never" data-hits="" data-linenumber="
|
3077
|
+
<li class="never" data-hits="" data-linenumber="168">
|
2818
3078
|
|
2819
3079
|
|
2820
3080
|
<code class="ruby"> when 21004</code>
|
2821
3081
|
</li>
|
2822
3082
|
|
2823
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3083
|
+
<li class="missed" data-hits="0" data-linenumber="169">
|
2824
3084
|
|
2825
3085
|
|
2826
3086
|
<code class="ruby"> 'The shared secret you provided does not match the shared secret on file for your account.'</code>
|
2827
3087
|
</li>
|
2828
3088
|
|
2829
|
-
<li class="never" data-hits="" data-linenumber="
|
3089
|
+
<li class="never" data-hits="" data-linenumber="170">
|
2830
3090
|
|
2831
3091
|
|
2832
3092
|
<code class="ruby"> when 21005</code>
|
2833
3093
|
</li>
|
2834
3094
|
|
2835
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3095
|
+
<li class="missed" data-hits="0" data-linenumber="171">
|
2836
3096
|
|
2837
3097
|
|
2838
3098
|
<code class="ruby"> 'The receipt server is not currently available.'</code>
|
2839
3099
|
</li>
|
2840
3100
|
|
2841
|
-
<li class="never" data-hits="" data-linenumber="
|
3101
|
+
<li class="never" data-hits="" data-linenumber="172">
|
2842
3102
|
|
2843
3103
|
|
2844
3104
|
<code class="ruby"> when 21006</code>
|
2845
3105
|
</li>
|
2846
3106
|
|
2847
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3107
|
+
<li class="missed" data-hits="0" data-linenumber="173">
|
2848
3108
|
|
2849
3109
|
|
2850
3110
|
<code class="ruby"> 'This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response.'</code>
|
2851
3111
|
</li>
|
2852
3112
|
|
2853
|
-
<li class="never" data-hits="" data-linenumber="
|
3113
|
+
<li class="never" data-hits="" data-linenumber="174">
|
2854
3114
|
|
2855
3115
|
|
2856
3116
|
<code class="ruby"> when 21007</code>
|
2857
3117
|
</li>
|
2858
3118
|
|
2859
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3119
|
+
<li class="missed" data-hits="0" data-linenumber="175">
|
2860
3120
|
|
2861
3121
|
|
2862
3122
|
<code class="ruby"> 'This receipt is a sandbox receipt, but it was sent to the production service for verification.'</code>
|
2863
3123
|
</li>
|
2864
3124
|
|
2865
|
-
<li class="never" data-hits="" data-linenumber="
|
3125
|
+
<li class="never" data-hits="" data-linenumber="176">
|
2866
3126
|
|
2867
3127
|
|
2868
3128
|
<code class="ruby"> when 21008</code>
|
2869
3129
|
</li>
|
2870
3130
|
|
2871
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3131
|
+
<li class="missed" data-hits="0" data-linenumber="177">
|
2872
3132
|
|
2873
3133
|
|
2874
3134
|
<code class="ruby"> 'This receipt is a production receipt, but it was sent to the sandbox service for verification.'</code>
|
2875
3135
|
</li>
|
2876
3136
|
|
2877
|
-
<li class="never" data-hits="" data-linenumber="
|
3137
|
+
<li class="never" data-hits="" data-linenumber="178">
|
2878
3138
|
|
2879
3139
|
|
2880
3140
|
<code class="ruby"> when 21010</code>
|
2881
3141
|
</li>
|
2882
3142
|
|
2883
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3143
|
+
<li class="missed" data-hits="0" data-linenumber="179">
|
2884
3144
|
|
2885
3145
|
|
2886
3146
|
<code class="ruby"> 'This receipt could not be authorized. Treat this the same as if a purchase was never made.'</code>
|
2887
3147
|
</li>
|
2888
3148
|
|
2889
|
-
<li class="never" data-hits="" data-linenumber="
|
3149
|
+
<li class="never" data-hits="" data-linenumber="180">
|
2890
3150
|
|
2891
3151
|
|
2892
3152
|
<code class="ruby"> when 21100..21199</code>
|
2893
3153
|
</li>
|
2894
3154
|
|
2895
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3155
|
+
<li class="missed" data-hits="0" data-linenumber="181">
|
2896
3156
|
|
2897
3157
|
|
2898
3158
|
<code class="ruby"> 'Internal data access error.'</code>
|
2899
3159
|
</li>
|
2900
3160
|
|
2901
|
-
<li class="never" data-hits="" data-linenumber="
|
3161
|
+
<li class="never" data-hits="" data-linenumber="182">
|
2902
3162
|
|
2903
3163
|
|
2904
3164
|
<code class="ruby"> else</code>
|
2905
3165
|
</li>
|
2906
3166
|
|
2907
|
-
<li class="missed" data-hits="0" data-linenumber="
|
3167
|
+
<li class="missed" data-hits="0" data-linenumber="183">
|
2908
3168
|
|
2909
3169
|
|
2910
3170
|
<code class="ruby"> "Unknown Error: #{code}"</code>
|
2911
3171
|
</li>
|
2912
3172
|
|
2913
|
-
<li class="never" data-hits="" data-linenumber="
|
3173
|
+
<li class="never" data-hits="" data-linenumber="184">
|
2914
3174
|
|
2915
3175
|
|
2916
3176
|
<code class="ruby"> end</code>
|
2917
3177
|
</li>
|
2918
3178
|
|
2919
|
-
<li class="never" data-hits="" data-linenumber="
|
3179
|
+
<li class="never" data-hits="" data-linenumber="185">
|
2920
3180
|
|
2921
3181
|
|
2922
3182
|
<code class="ruby"> end</code>
|
2923
3183
|
</li>
|
2924
3184
|
|
2925
|
-
<li class="never" data-hits="" data-linenumber="
|
3185
|
+
<li class="never" data-hits="" data-linenumber="186">
|
2926
3186
|
|
2927
3187
|
|
2928
3188
|
<code class="ruby"> end</code>
|
2929
3189
|
</li>
|
2930
3190
|
|
2931
|
-
<li class="never" data-hits="" data-linenumber="
|
3191
|
+
<li class="never" data-hits="" data-linenumber="187">
|
2932
3192
|
|
2933
3193
|
|
2934
3194
|
<code class="ruby"> end</code>
|
2935
3195
|
</li>
|
2936
3196
|
|
2937
|
-
<li class="never" data-hits="" data-linenumber="
|
2938
|
-
|
2939
|
-
|
2940
|
-
<code class="ruby">end</code>
|
2941
|
-
</li>
|
2942
|
-
|
2943
|
-
</ol>
|
2944
|
-
</pre>
|
2945
|
-
</div>
|
2946
|
-
|
2947
|
-
|
2948
|
-
<div class="source_table" id="3ebfcfc298ce125918d25fd4c50e966d39734a2b">
|
2949
|
-
<div class="header">
|
2950
|
-
<h3>lib/venice/version.rb</h3>
|
2951
|
-
<h4><span class="green">100.0 %</span> covered</h4>
|
2952
|
-
<div>
|
2953
|
-
<b>2</b> relevant lines.
|
2954
|
-
<span class="green"><b>2</b> lines covered</span> and
|
2955
|
-
<span class="red"><b>0</b> lines missed.</span>
|
2956
|
-
</div>
|
2957
|
-
</div>
|
2958
|
-
|
2959
|
-
<pre>
|
2960
|
-
<ol>
|
2961
|
-
|
2962
|
-
<li class="covered" data-hits="1" data-linenumber="1">
|
2963
|
-
<span class="hits">1</span>
|
2964
|
-
|
2965
|
-
<code class="ruby">module Venice</code>
|
2966
|
-
</li>
|
2967
|
-
|
2968
|
-
<li class="covered" data-hits="1" data-linenumber="2">
|
2969
|
-
<span class="hits">1</span>
|
2970
|
-
|
2971
|
-
<code class="ruby"> VERSION = '0.5.0'</code>
|
2972
|
-
</li>
|
2973
|
-
|
2974
|
-
<li class="never" data-hits="" data-linenumber="3">
|
3197
|
+
<li class="never" data-hits="" data-linenumber="188">
|
2975
3198
|
|
2976
3199
|
|
2977
3200
|
<code class="ruby">end</code>
|