compensated 0.1.0.pre10 → 0.1.0.pre11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/compensated.gemspec +1 -1
- data/lib/compensated/apple_iap/event_parser.rb +10 -2
- data/lib/compensated/version.rb +1 -1
- metadata +3 -4
- data/Gemfile.lock +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1454c1dc1fb00eb18f19f349434b8a66ac06d785f48addf22d3e2e301c0902b4
|
4
|
+
data.tar.gz: dea5812f96e6dfcba08ae5bf50eb38e85e8cce9c6e858133294c2ac6b9280a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b364b04efd1219362586d73b30f86dbd067e9ec323ddc027d55248c8781a452e4edadd5279f9f1e1e6dbc018481927521ab9ebc0c7d44229896530829aeb6929
|
7
|
+
data.tar.gz: 26d5b42bdd9aa6aee198e4b38300604e261a7c7ec519154025e626ca5a6dacdd356f7e771b42a9ac93c0d3103fb6eac5d90a96d4f386310f89afa9c77c786b6e
|
data/.gitignore
CHANGED
data/compensated.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "compensated"
|
7
7
|
spec.version = Compensated::VERSION
|
8
8
|
spec.authors = ["Zee"]
|
9
|
-
spec.email = ["zee@
|
9
|
+
spec.email = ["zee@zinc.coop"]
|
10
10
|
|
11
11
|
spec.summary = "Provide value (In Ruby!). Get paid."
|
12
12
|
spec.description = "Compensated makes handling transactions slightly less of a nightmare."
|
@@ -2,7 +2,7 @@ require "compensated/event_parser"
|
|
2
2
|
module Compensated
|
3
3
|
module AppleIap
|
4
4
|
class EventParser < Compensated::EventParser
|
5
|
-
SUPPORTED_TYPES = ["INTERACTIVE_RENEWAL", "RENEWAL", "INITIAL_BUY", "DID_CHANGE_RENEWAL_STATUS"]
|
5
|
+
SUPPORTED_TYPES = ["CANCEL", "DID_CHANGE_RENEWAL_PREF", "DID_FAIL_TO_RENEW", "DID_RECOVER", "INTERACTIVE_RENEWAL", "RENEWAL", "INITIAL_BUY", "DID_CHANGE_RENEWAL_STATUS"]
|
6
6
|
def parses?(request)
|
7
7
|
return false unless request.data
|
8
8
|
request.data[:notification_type] &&
|
@@ -36,7 +36,8 @@ module Compensated
|
|
36
36
|
sku: receipt_data(data)[:product_id],
|
37
37
|
purchased: DateTime.parse(receipt_data(data)[:purchase_date]),
|
38
38
|
expiration: DateTime.parse(receipt_data(data)[:expires_date_formatted]),
|
39
|
-
|
39
|
+
cancelled: cancellation_date(data),
|
40
|
+
}.compact,
|
40
41
|
]
|
41
42
|
end
|
42
43
|
|
@@ -45,6 +46,13 @@ module Compensated
|
|
45
46
|
id: receipt_data(data)[:original_transaction_id],
|
46
47
|
}
|
47
48
|
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def cancellation_date(data)
|
53
|
+
return unless receipt_data(data)[:cancellation_date]
|
54
|
+
DateTime.parse(receipt_data(data)[:cancellation_date])
|
55
|
+
end
|
48
56
|
end
|
49
57
|
end
|
50
58
|
event_parsers.push(AppleIap::EventParser.new)
|
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.pre11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '0'
|
69
69
|
description: Compensated makes handling transactions slightly less of a nightmare.
|
70
70
|
email:
|
71
|
-
- zee@
|
71
|
+
- zee@zinc.coop
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -76,7 +76,6 @@ files:
|
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rspec"
|
78
78
|
- Gemfile
|
79
|
-
- Gemfile.lock
|
80
79
|
- LICENSE.md
|
81
80
|
- README.md
|
82
81
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
compensated (0.1.0.pre10)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
diff-lcs (1.3)
|
10
|
-
rack (2.0.7)
|
11
|
-
rake (10.5.0)
|
12
|
-
rspec (3.8.0)
|
13
|
-
rspec-core (~> 3.8.0)
|
14
|
-
rspec-expectations (~> 3.8.0)
|
15
|
-
rspec-mocks (~> 3.8.0)
|
16
|
-
rspec-core (3.8.2)
|
17
|
-
rspec-support (~> 3.8.0)
|
18
|
-
rspec-expectations (3.8.4)
|
19
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
-
rspec-support (~> 3.8.0)
|
21
|
-
rspec-mocks (3.8.1)
|
22
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.8.0)
|
24
|
-
rspec-support (3.8.2)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
bundler (~> 2.0)
|
31
|
-
compensated!
|
32
|
-
rack
|
33
|
-
rake (~> 10.0)
|
34
|
-
rspec (~> 3.0)
|
35
|
-
|
36
|
-
BUNDLED WITH
|
37
|
-
2.0.2
|