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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f6b62c84fc36e42c5afedaece47c3a190092fd2
4
- data.tar.gz: a22a979b5c94556e8f7f8b8eed40649a91d82e53
3
+ metadata.gz: 8149be22bff618a5fa9e1b5e84337b6106dfa519
4
+ data.tar.gz: 640853f128afafa3b824d609ce2635543c2797cc
5
5
  SHA512:
6
- metadata.gz: 460a193f7a8ae4cea0afe0103b59eb7ea86fd645dff289a46cff2ae559752c368bebbf8527db6e5d7c8453c6d4e97d2be0c720bb9f3cb33f471c8ef4273d7bea
7
- data.tar.gz: bc1f563c71e2e3f6e7a81456150d930a45a808c4819a7394566076693abb02bca378628b738c90611f853ee24aa143de1603d10451553a1c330b05bd8f9bcc98
6
+ metadata.gz: d50f55e61004a07eb15b0663c7ba5f7c89ca45d66683a992ca408f94b3a3e27120f25fc49c7922489d1d38862c63f4c1eccb52c6f78ec3fef45b298d59b4417f
7
+ data.tar.gz: 59643bd260b039007b014c2826541e77045f2d4d9836f46d4926050094149c2705b1e3ce0ad5660e1170d369dac63d496dc37dcd91493c76495fa5fe48b23595
data/lib/ravelin.rb CHANGED
@@ -21,6 +21,7 @@ require 'ravelin/order'
21
21
  require 'ravelin/payment_method'
22
22
  require 'ravelin/pre_transaction'
23
23
  require 'ravelin/transaction'
24
+ require 'ravelin/voucher'
24
25
  require 'ravelin/label'
25
26
 
26
27
  require 'ravelin/event'
@@ -9,12 +9,13 @@ module Ravelin
9
9
  :gender,
10
10
  :email,
11
11
  :email_verified_time,
12
- :user_name,
12
+ :username,
13
13
  :telephone,
14
14
  :telephone_verified_time,
15
15
  :telephone_country,
16
16
  :location,
17
17
  :country,
18
+ :market,
18
19
  :custom
19
20
 
20
21
  attr_required :customer_id
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
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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.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-06-29 00:00:00.000000000 Z
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: