ravelin 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/event.rb +14 -1
- data/lib/ravelin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50dd02ccda765ab9f311b5f6effe5a2c49422ad3d97b73b8b8664c73cb6615b8
|
4
|
+
data.tar.gz: ea95006dbd9d8ecd78e9f1df9b8b2dc19b469493714f756beb800e95c3f2a5f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d59f8679c6847bb6261c77af1dd88449913b934a2723b1dd8796ae5b8d6891bd4bfe557e7c1f1cbf1e7172a1cb9b5a1baf39039938706cbb842b33497cde57b
|
7
|
+
data.tar.gz: 1c610bc2c8d08a5c7473803756485255399a7e72641ea51f91b08b4a49c6f88832485463370cbc41b46ff95de72201290cf105979557450e92d44f9f9b4ad982
|
data/lib/ravelin/event.rb
CHANGED
@@ -21,7 +21,7 @@ module Ravelin
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
payload_hash.merge('timestamp' => timestamp)
|
24
|
+
payload_hash.merge('timestamp' => format_timestamp(timestamp))
|
25
25
|
end
|
26
26
|
|
27
27
|
def object_classes
|
@@ -44,6 +44,17 @@ module Ravelin
|
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
47
|
+
def format_timestamp(timestamp)
|
48
|
+
case name
|
49
|
+
when :login
|
50
|
+
timestamp * 1000
|
51
|
+
when :reclaim
|
52
|
+
Time.at(timestamp).utc.to_datetime.to_s
|
53
|
+
else
|
54
|
+
timestamp
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
47
58
|
private
|
48
59
|
|
49
60
|
def validate_top_level_payload_params
|
@@ -64,6 +75,8 @@ module Ravelin
|
|
64
75
|
when :checkout
|
65
76
|
validate_payload_inclusion_of :customer, :order,
|
66
77
|
:payment_method, :transaction
|
78
|
+
when :login
|
79
|
+
validate_payload_inclusion_of :login
|
67
80
|
when :reclaim
|
68
81
|
validate_payload_inclusion_of :customers, :source
|
69
82
|
end
|
data/lib/ravelin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravelin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|