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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcfb07b46dca3f2d6595dabad54d783e74f0e4fc1a108089f07e918de00740e8
4
- data.tar.gz: 691bd80b5483b309c0820295121cb321ca20ea6b250356b7341dad7de57ed25e
3
+ metadata.gz: 50dd02ccda765ab9f311b5f6effe5a2c49422ad3d97b73b8b8664c73cb6615b8
4
+ data.tar.gz: ea95006dbd9d8ecd78e9f1df9b8b2dc19b469493714f756beb800e95c3f2a5f9
5
5
  SHA512:
6
- metadata.gz: 3cf2f3b8c1a5648a76271514fbf0ba9c22f7cd550d4c49560cbed7b1181ba40626c79eaed4a9d0b6b6be2ed7d2d136fbbaec0807e5b49db07f7841728072c4c4
7
- data.tar.gz: 663b4dcc677062a1b8a8f76a53e6ca5a86909cf0f3dcc355df7e02410fbe5033069b80262b6a0896137c575722f559319e3ee2f4d593f8108f58d6455dededc3
6
+ metadata.gz: 2d59f8679c6847bb6261c77af1dd88449913b934a2723b1dd8796ae5b8d6891bd4bfe557e7c1f1cbf1e7172a1cb9b5a1baf39039938706cbb842b33497cde57b
7
+ data.tar.gz: 1c610bc2c8d08a5c7473803756485255399a7e72641ea51f91b08b4a49c6f88832485463370cbc41b46ff95de72201290cf105979557450e92d44f9f9b4ad982
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = "0.1.23"
2
+ VERSION = "0.1.24"
3
3
  end
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.23
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-03-31 00:00:00.000000000 Z
14
+ date: 2020-04-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday