ravelin 0.1.24 → 0.1.25

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: 50dd02ccda765ab9f311b5f6effe5a2c49422ad3d97b73b8b8664c73cb6615b8
4
- data.tar.gz: ea95006dbd9d8ecd78e9f1df9b8b2dc19b469493714f756beb800e95c3f2a5f9
3
+ metadata.gz: 2ca30db8a09466a96d2042c91b177bfc4a1478c063cdc848cf80bee5762a9ac4
4
+ data.tar.gz: 6248744866c0924db62099bf3b2029b0ce8868a1acc4568b60e16c1bf5a27d5e
5
5
  SHA512:
6
- metadata.gz: 2d59f8679c6847bb6261c77af1dd88449913b934a2723b1dd8796ae5b8d6891bd4bfe557e7c1f1cbf1e7172a1cb9b5a1baf39039938706cbb842b33497cde57b
7
- data.tar.gz: 1c610bc2c8d08a5c7473803756485255399a7e72641ea51f91b08b4a49c6f88832485463370cbc41b46ff95de72201290cf105979557450e92d44f9f9b4ad982
6
+ metadata.gz: 06fe356e63f52fbae095cea6b997950e8990a847cd9c34a168f5a000bf21d981edc8e43834388a4e08def5a643253cac4494761539dd7ee73abbd405282e45db
7
+ data.tar.gz: 82dd34a7c4e9d9d7018bd2af3c0ce466112289faa1f9d2d6ba4c2986cf39f1b78d6abb31143fda0840e143a2b8687de65d53f80157b10b467d8e3b8d71947170
@@ -3,6 +3,7 @@ module Ravelin
3
3
  attr_accessor :name, :timestamp, :payload
4
4
 
5
5
  def initialize(name:, payload:, timestamp: nil)
6
+ @internal_name = name
6
7
  @name = convert_event_name(name)
7
8
  @payload = convert_to_ravelin_objects(payload)
8
9
  @timestamp = timestamp.nil? ? Time.now.to_i : convert_to_epoch(timestamp)
@@ -45,10 +46,10 @@ module Ravelin
45
46
  end
46
47
 
47
48
  def format_timestamp(timestamp)
48
- case name
49
- when :login
49
+ case @internal_name
50
+ when :ato_login
50
51
  timestamp * 1000
51
- when :reclaim
52
+ when :ato_reclaim
52
53
  Time.at(timestamp).utc.to_datetime.to_s
53
54
  else
54
55
  timestamp
@@ -60,14 +61,14 @@ module Ravelin
60
61
  def validate_top_level_payload_params
61
62
  validate_customer_id_presence_on :order, :paymentmethod,
62
63
  :pretransaction, :transaction, :label
63
- case name
64
+ case @internal_name
64
65
  when :customer
65
66
  validate_payload_inclusion_of :customer
66
67
  when :voucher
67
68
  validate_payload_inclusion_of :voucher
68
69
  when :'paymentmethod/voucher'
69
70
  validate_payload_inclusion_of :'voucher_redemption'
70
- when :pretransaction, :transaction
71
+ when :pre_transaction, :transaction
71
72
  validate_payload_must_include_one_of(
72
73
  :payment_method_id, :payment_method
73
74
  )
@@ -76,8 +77,10 @@ module Ravelin
76
77
  validate_payload_inclusion_of :customer, :order,
77
78
  :payment_method, :transaction
78
79
  when :login
80
+ validate_payload_inclusion_of :username, :success, :authentication_mechanism
81
+ when :ato_login
79
82
  validate_payload_inclusion_of :login
80
- when :reclaim
83
+ when :ato_reclaim
81
84
  validate_payload_inclusion_of :customers, :source
82
85
  end
83
86
  end
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = "0.1.24"
2
+ VERSION = "0.1.25"
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.24
4
+ version: 0.1.25
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-04-07 00:00:00.000000000 Z
14
+ date: 2020-04-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday