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: 8c19dff720370589fb90015944b4b0ff8520b047f280c7968c91d083216d46e2
4
- data.tar.gz: 93390c30dfb4a274be691396e18870132e1a6783cd03f8f443ce6fa344fb5244
3
+ metadata.gz: d6d281277b2c252a2550718ee1eca14ca5868845f4008bf7f89de77b3980e9ee
4
+ data.tar.gz: 4e29392a6455a4c8d87215323bd39cca9889fb6a73b7366879955676b9a331ea
5
5
  SHA512:
6
- metadata.gz: 459cbd3cfd663b13fa2864c6b68614fd89407664859f94f0684cc816314cb150f070302038942c71f302d11c55fc3197552ebb690627e800b3b9da730b07070e
7
- data.tar.gz: 8d7d650d1715e8567245358a4b624889e719f7ed98ec4a62cbde3d902c5d9d4784322cd7f89a610e09d9c0b512a9dc292a0b2f150ea24336ea581d939250527a
6
+ metadata.gz: ed49ac4883933bc287f90f170481c8d5a685c8176c21da787bcb81d31dde31fb6cc517329a394fb6f3869279e65b274319348ed89014b74515e3b1951421a8b5
7
+ data.tar.gz: a4e7c9923fa962a922c6534391809c5166dcb30a108a1c5fa15f40abfa46977ad7f5c123a1e1a15da3374403eeac7cd4d3e69b2b86315deb9138f0a3ca8d6d89
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- compensated (0.1.0.pre7)
4
+ compensated (0.1.0.pre8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- {sku: receipt_data(data)[:product_id]},
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
 
@@ -26,6 +26,7 @@ module Compensated
26
26
  email: data["email"],
27
27
  name: data["full_name"],
28
28
  },
29
+ timestamp: DateTime.parse(data["sale_timestamp"]),
29
30
  }.compact
30
31
  end
31
32
 
@@ -17,6 +17,7 @@ module Compensated
17
17
  payment_processor: :stripe,
18
18
  amount: amount(data),
19
19
  customer: customer(data),
20
+ timestamp: Time.at(data[:created]),
20
21
  }
21
22
  end
22
23
 
@@ -1,3 +1,3 @@
1
1
  module Compensated
2
- VERSION = "0.1.0.pre7"
2
+ VERSION = "0.1.0.pre8"
3
3
  end
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.pre7
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-14 00:00:00.000000000 Z
11
+ date: 2019-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler