tangocard 3.2.2 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tangocard/order.rb +6 -4
- data/lib/tangocard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 533aedba21b3ae4f82f13ec71336e66f48f4dce9
|
4
|
+
data.tar.gz: 6fb20c318df7d572d17bbabab427446e65272931
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fe99b03cb14b041163ad5e7f492f7f5d0e406f39d30daba49d373b3a675ec190c919024180977aea1ebc051a7b745dbceb8462312dbd22e96fe7962c516f4f
|
7
|
+
data.tar.gz: 3fd86852f0fa396624d36ec4f3a3f70c5de8ea56fdbef5a11edc33276bde73c545cc0e7ffb261e520641aada6790edd983f0d4fc27758d644fb3633832698bf2
|
data/lib/tangocard/order.rb
CHANGED
@@ -8,7 +8,8 @@ class Tangocard::Order
|
|
8
8
|
:reward_from,
|
9
9
|
:delivered_at,
|
10
10
|
:recipient,
|
11
|
-
:reward
|
11
|
+
:reward,
|
12
|
+
:raw_response
|
12
13
|
|
13
14
|
private_class_method :new
|
14
15
|
|
@@ -40,7 +41,7 @@ class Tangocard::Order
|
|
40
41
|
def self.find(order_id)
|
41
42
|
response = Tangocard::Raas.show_order({'order_id' => order_id})
|
42
43
|
if response.success?
|
43
|
-
new(response.parsed_response['order'])
|
44
|
+
new(response.parsed_response['order'], response)
|
44
45
|
else
|
45
46
|
raise Tangocard::OrderNotFoundException, "#{response.error_message}"
|
46
47
|
end
|
@@ -57,13 +58,13 @@ class Tangocard::Order
|
|
57
58
|
def self.create(params)
|
58
59
|
response = Tangocard::Raas.create_order(params)
|
59
60
|
if response.success?
|
60
|
-
new(response.parsed_response['order'])
|
61
|
+
new(response.parsed_response['order'], response)
|
61
62
|
else
|
62
63
|
raise Tangocard::OrderCreateFailedException, "#{response.error_message}"
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
66
|
-
def initialize(params)
|
67
|
+
def initialize(params, raw_response = nil)
|
67
68
|
@order_id = params['order_id']
|
68
69
|
@account_identifier = params['account_identifier']
|
69
70
|
@customer = params['customer']
|
@@ -75,6 +76,7 @@ class Tangocard::Order
|
|
75
76
|
@delivered_at = params['delivered_at']
|
76
77
|
@recipient = params['recipient']
|
77
78
|
@reward = params['reward'] || {}
|
79
|
+
@raw_response = raw_response
|
78
80
|
end
|
79
81
|
|
80
82
|
def reward
|
data/lib/tangocard/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tangocard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raphael Crawford-Marks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|