ravelin 0.1.1 → 0.1.2
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/customer.rb +2 -1
- data/lib/ravelin/event.rb +3 -0
- data/lib/ravelin/version.rb +1 -1
- data/lib/ravelin/voucher.rb +20 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8149be22bff618a5fa9e1b5e84337b6106dfa519
|
4
|
+
data.tar.gz: 640853f128afafa3b824d609ce2635543c2797cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50f55e61004a07eb15b0663c7ba5f7c89ca45d66683a992ca408f94b3a3e27120f25fc49c7922489d1d38862c63f4c1eccb52c6f78ec3fef45b298d59b4417f
|
7
|
+
data.tar.gz: 59643bd260b039007b014c2826541e77045f2d4d9836f46d4926050094149c2705b1e3ce0ad5660e1170d369dac63d496dc37dcd91493c76495fa5fe48b23595
|
data/lib/ravelin.rb
CHANGED
data/lib/ravelin/customer.rb
CHANGED
data/lib/ravelin/event.rb
CHANGED
@@ -34,6 +34,7 @@ module Ravelin
|
|
34
34
|
payment_method: PaymentMethod,
|
35
35
|
transaction: self.name == :pretransaction ? PreTransaction : Transaction,
|
36
36
|
label: Label,
|
37
|
+
voucher: Voucher,
|
37
38
|
}
|
38
39
|
end
|
39
40
|
|
@@ -46,6 +47,8 @@ module Ravelin
|
|
46
47
|
case self.name
|
47
48
|
when :customer
|
48
49
|
validate_payload_inclusion_of :customer
|
50
|
+
when :voucher
|
51
|
+
validate_payload_inclusion_of :voucher
|
49
52
|
when :pretransaction, :transaction
|
50
53
|
validate_payload_inclusion_of :order_id, :payment_method_id
|
51
54
|
when :login
|
data/lib/ravelin/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
module Ravelin
|
2
|
+
class Voucher < RavelinObject
|
3
|
+
attr_accessor :voucher_id,
|
4
|
+
:voucher_code,
|
5
|
+
:referrer_id,
|
6
|
+
:expiry,
|
7
|
+
:value,
|
8
|
+
:currency,
|
9
|
+
:voucher_type,
|
10
|
+
:referral_value,
|
11
|
+
:creation_time,
|
12
|
+
:custom
|
13
|
+
|
14
|
+
attr_required :voucher_code, :referrer_id, :expiry, :value, :currency, :voucher_type, :referral_value, :creation_time
|
15
|
+
|
16
|
+
def location=(obj)
|
17
|
+
@location = Ravelin::Location.new(obj)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
8
8
|
- Tommy Palmer
|
9
9
|
- Gurkan Oluc
|
10
|
+
- Mathilda Thompson
|
10
11
|
autorequire:
|
11
12
|
bindir: exe
|
12
13
|
cert_chain: []
|
13
|
-
date: 2016-
|
14
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: faraday
|
@@ -101,6 +102,7 @@ email:
|
|
101
102
|
- sam.levy@deliveroo.co.uk
|
102
103
|
- tommy.palmer@deliveroo.co.uk
|
103
104
|
- gurkan.oluc@deliveroo.co.uk
|
105
|
+
- mathilda.thompson@deliveroo.co.uk
|
104
106
|
executables: []
|
105
107
|
extensions: []
|
106
108
|
extra_rdoc_files: []
|
@@ -126,6 +128,7 @@ files:
|
|
126
128
|
- lib/ravelin/response.rb
|
127
129
|
- lib/ravelin/transaction.rb
|
128
130
|
- lib/ravelin/version.rb
|
131
|
+
- lib/ravelin/voucher.rb
|
129
132
|
homepage: https://developer.ravelin.com
|
130
133
|
licenses:
|
131
134
|
- MIT
|
@@ -151,4 +154,3 @@ signing_key:
|
|
151
154
|
specification_version: 4
|
152
155
|
summary: Ruby bindings for the Ravelin API
|
153
156
|
test_files: []
|
154
|
-
has_rdoc:
|