ravelin 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin.rb +1 -0
- data/lib/ravelin/event.rb +3 -1
- data/lib/ravelin/version.rb +1 -1
- data/lib/ravelin/voucher_redemption.rb +23 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 020ada105c6edf6d2265ea0f7b15d107669fa073
|
4
|
+
data.tar.gz: ddb667cfb451bcd593dbf698954d09f7ed417426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4d6c275a47387ace45c8704d310fd1687fcf3d90b5626a253eec5a035cd208be08a79e8e94b97c4d48673dec8ab251cbca505b5222dac2e74c18fe15613cf44
|
7
|
+
data.tar.gz: f54036d815a9746bf3bf7ce0cd33c864ebe5145da56c63639fee8ca21994d0acb0c5ce3234cf876de50a7869580641021b7b819ecaed29a5f965c553effdcc1b
|
data/lib/ravelin.rb
CHANGED
data/lib/ravelin/event.rb
CHANGED
@@ -32,6 +32,7 @@ module Ravelin
|
|
32
32
|
location: Location,
|
33
33
|
order: Order,
|
34
34
|
payment_method: PaymentMethod,
|
35
|
+
voucher_redemption: VoucherRedemption,
|
35
36
|
transaction: self.name == :pretransaction ? PreTransaction : Transaction,
|
36
37
|
label: Label,
|
37
38
|
voucher: Voucher,
|
@@ -43,12 +44,13 @@ module Ravelin
|
|
43
44
|
def validate_top_level_payload_params
|
44
45
|
validate_customer_id_presence_on :order, :paymentmethod,
|
45
46
|
:pretransaction, :transaction, :label
|
46
|
-
|
47
47
|
case self.name
|
48
48
|
when :customer
|
49
49
|
validate_payload_inclusion_of :customer
|
50
50
|
when :voucher
|
51
51
|
validate_payload_inclusion_of :voucher
|
52
|
+
when :'paymentmethod/voucher'
|
53
|
+
validate_payload_inclusion_of :'voucher_redemption'
|
52
54
|
when :pretransaction, :transaction
|
53
55
|
validate_payload_inclusion_of :order_id, :payment_method_id
|
54
56
|
when :login
|
data/lib/ravelin/version.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Ravelin
|
2
|
+
class VoucherRedemption < RavelinObject
|
3
|
+
attr_accessor :payment_method_id,
|
4
|
+
:voucher_code,
|
5
|
+
:referrer_id,
|
6
|
+
:expiry,
|
7
|
+
:value,
|
8
|
+
:currency,
|
9
|
+
:voucher_type,
|
10
|
+
:redemption_time,
|
11
|
+
:success,
|
12
|
+
:failure_source,
|
13
|
+
:failure_reason,
|
14
|
+
:custom
|
15
|
+
|
16
|
+
attr_required :payment_method_id, :voucher_code, :referrer_id, :value, :currency, :voucher_type, :redemption_time, :success
|
17
|
+
|
18
|
+
def location=(obj)
|
19
|
+
@location = Ravelin::Location.new(obj)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
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.3
|
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: 2016-
|
14
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/ravelin/transaction.rb
|
130
130
|
- lib/ravelin/version.rb
|
131
131
|
- lib/ravelin/voucher.rb
|
132
|
+
- lib/ravelin/voucher_redemption.rb
|
132
133
|
homepage: https://developer.ravelin.com
|
133
134
|
licenses:
|
134
135
|
- MIT
|