synapse_pay_rest 2.2.0 → 2.2.1

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: 4c6efa02c0a05bc9450793c2988d145d2b9d6179
4
- data.tar.gz: b620267e190dfefb5d2cde8f0247ee7fd432d30b
3
+ metadata.gz: 2fd4eeec4259c9f37867f82f51e96a371d23d994
4
+ data.tar.gz: f058a5fd3a2bc83721edb2ea3c03c07cabfe032e
5
5
  SHA512:
6
- metadata.gz: beb7d951f9faca9e76120ba2e4f2de687af5dbc82f5ec53d486d7003fe39562b8e1fec62eb97f3dddccb2972be38f5260d4b49eefd3179f957a3af0ce45e5fc1
7
- data.tar.gz: b0ea2ebef0446b633cb84b290d3805922c8a91e3e145640a714bc4ff00aeaae3519abf7ead1a29ee0453adf6df1ec3e07c772bc9e03b787dec615ba2a01a1122
6
+ metadata.gz: 945eb2be10590e418d8654f0c0e6d869755153cc754811c61b84eb3558f0d3846557d09ab7ec8fe52b614be2af18794b421e9904681cf7247f4e2b862e0c45b2
7
+ data.tar.gz: e036132fda81f02a4e5a47f57fdc8ad258e4c74714ef08d1d417d0d37d975d732cbe8d4dbad8c5cdca0a3bdcf42a18bfff04400fcfe18190c8ca8a66bd8d24a4
@@ -88,8 +88,7 @@ module SynapsePayRest
88
88
  # @return [SynapsePayRest::Error]
89
89
  def error_from_response(body, code)
90
90
  # require 'pry'; binding.pry
91
- code = code.to_i
92
- klass = ERRORS[code] || SynapsePayRest::Error
91
+ klass = ERRORS[code.to_i] || SynapsePayRest::Error
93
92
  message, error_code = parse_error(body)
94
93
  klass.new(message: message, code: error_code, response: body)
95
94
  end
@@ -323,7 +323,7 @@ module SynapsePayRest
323
323
  raise ArgumentError, 'fingerprint must be a String' unless fingerprint.is_a?(String)
324
324
 
325
325
  client.http_client.update_headers(fingerprint: fingerprint)
326
- response = client.users.refresh(payload: payload_for_refresh)
326
+ response = client.users.refresh(user_id: id, payload: payload_for_refresh)
327
327
  response['phone_numbers']
328
328
  end
329
329
 
@@ -29,7 +29,8 @@ module SynapsePayRest
29
29
  #
30
30
  # @todo should raise error if any questions aren't answered yet.
31
31
  def submit_kba
32
- user = base_document.user
32
+ user = base_document.user
33
+ user.authenticate()
33
34
  response = user.client.users.update(user_id: user.id, payload: payload_for_kba)
34
35
  user = User.from_response(user.client, response)
35
36
  base_doc = user.base_documents.find { |doc| doc.id == base_document.id }
@@ -1,4 +1,4 @@
1
1
  module SynapsePayRest
2
2
  # gem version:
3
- VERSION = '2.2.0'.freeze
3
+ VERSION = '2.2.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapse_pay_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Broderick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-12-09 00:00:00.000000000 Z
12
+ date: 2016-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client