payment-manager-client 0.1.0 → 0.2.0

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: f6894cb3dafb61d11682a21d922183c4d3303d40
4
- data.tar.gz: 77f06d59750c42a16f4b212958c57e9a3f9d8efa
3
+ metadata.gz: c399d0336423ed9916451406bd1611b57185734e
4
+ data.tar.gz: 516b3250021a7874bf2179ba3068b7aa70812772
5
5
  SHA512:
6
- metadata.gz: f00a89088ff3db26e8c668c2c040b120c10621eb06ad80536c8463e4f2db00785f47f30cd4251857905d3b7b117a1e376637a53a92a69ac71fc55426bec4eb8a
7
- data.tar.gz: ec6a344d8ab01b199e1b403a5b49915670d26439d91b33793046fddef39f19f78bbbe7fcfb530c138a2e73034a31199c83ecf57bc3311d21bfe0243e3bc731a5
6
+ metadata.gz: 602b3bb4fd2a79892f3059fd4e077b4ce31a53da936a072d7820ffd88b932eba14ea937e247e8466ee3651889060cecfe411063a733fb91550215699c193f602
7
+ data.tar.gz: d7a0019d5381b16c81c676a60994ab281d7e7e4adcc7fbcbe047d044da107f16e25b741a94373e2eb1aaf950353f4484939fb4bb2cd9c326ef4324619f5d319b
@@ -34,6 +34,11 @@ module Payment
34
34
  response = Payment::Manager::Request.get(config.api_url + '/api/plans', params)
35
35
  JSON.parse(response.body)
36
36
  end
37
+
38
+ def valid_token?(token)
39
+ response = Payment::Manager::Request.get(config.api_url + "/api/tokens/validate/#{config.client_id}/#{token}", {})
40
+ JSON.parse(response.body)['valid']
41
+ end
37
42
  end
38
43
  end
39
44
  end
@@ -1,7 +1,7 @@
1
1
  module Payment
2
2
  module Manager
3
3
  module Client
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payment-manager-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaio Magalhães
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-20 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler