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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb29e103e970f53672c6f453da330bd1bf0b5d8e
4
- data.tar.gz: abbaa0d59df394630be3b979fc04f5ecbd0137b6
3
+ metadata.gz: 533aedba21b3ae4f82f13ec71336e66f48f4dce9
4
+ data.tar.gz: 6fb20c318df7d572d17bbabab427446e65272931
5
5
  SHA512:
6
- metadata.gz: 4f89c1dbaedec7244c84fb198a52653703daacd38be65b4e50eef3d655aa7e6d4330c3b168aaee47b7a48d1a030f7a56b12f68b3db7dce39359c2c15b84ae739
7
- data.tar.gz: f74a4d66608ae73067c694a0cf4a8f45f6cbdd4b28adc104860f590c151adcd7a56c2d3ea3126fad1e0d845681c1eb03f7dd097545c0cbaa74e0946bebea32b8
6
+ metadata.gz: f2fe99b03cb14b041163ad5e7f492f7f5d0e406f39d30daba49d373b3a675ec190c919024180977aea1ebc051a7b745dbceb8462312dbd22e96fe7962c516f4f
7
+ data.tar.gz: 3fd86852f0fa396624d36ec4f3a3f70c5de8ea56fdbef5a11edc33276bde73c545cc0e7ffb261e520641aada6790edd983f0d4fc27758d644fb3633832698bf2
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tangocard
2
- VERSION = '3.2.2'
2
+ VERSION = '3.3.2'
3
3
  end
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.2.2
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-10 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty