compensated 0.1.0.pre7 → 0.1.0.pre8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6d281277b2c252a2550718ee1eca14ca5868845f4008bf7f89de77b3980e9ee
|
4
|
+
data.tar.gz: 4e29392a6455a4c8d87215323bd39cca9889fb6a73b7366879955676b9a331ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed49ac4883933bc287f90f170481c8d5a685c8176c21da787bcb81d31dde31fb6cc517329a394fb6f3869279e65b274319348ed89014b74515e3b1951421a8b5
|
7
|
+
data.tar.gz: a4e7c9923fa962a922c6534391809c5166dcb30a108a1c5fa15f40abfa46977ad7f5c123a1e1a15da3374403eeac7cd4d3e69b2b86315deb9138f0a3ca8d6d89
|
data/Gemfile.lock
CHANGED
@@ -18,16 +18,25 @@ module Compensated
|
|
18
18
|
payment_processor: :apple_iap,
|
19
19
|
customer: customer(data),
|
20
20
|
products: products(data),
|
21
|
+
timestamp: timestamp(data),
|
21
22
|
}.compact
|
22
23
|
end
|
23
24
|
|
25
|
+
def timestamp(data)
|
26
|
+
DateTime.parse(data[:auto_renew_status_change_date] || receipt_data(data)[:purchase_date])
|
27
|
+
end
|
28
|
+
|
24
29
|
def receipt_data(data)
|
25
30
|
data[:latest_expired_receipt_info] || data[:latest_receipt_info]
|
26
31
|
end
|
27
32
|
|
28
33
|
def products(data)
|
29
34
|
[
|
30
|
-
{
|
35
|
+
{
|
36
|
+
sku: receipt_data(data)[:product_id],
|
37
|
+
purchased: DateTime.parse(receipt_data(data)[:purchase_date]),
|
38
|
+
expiration: DateTime.parse(receipt_data(data)[:expires_date_formatted]),
|
39
|
+
},
|
31
40
|
]
|
32
41
|
end
|
33
42
|
|
data/lib/compensated/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compensated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|