tokenex 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96764e702c130abd8c3f9a160011737dabb01cfc
4
- data.tar.gz: c0046bd54846d65dc01f82ec5f66b7ed0d3c0919
3
+ metadata.gz: b0876095eaf84ab5fab6c2287ea20562be89add3
4
+ data.tar.gz: db6c639798126650347a840c429ff468144fe96c
5
5
  SHA512:
6
- metadata.gz: 28ca7cc2a2417094c881b06e44de2183fdbf2bc3f5efd7a982bd4b6a7277f1e04fccf8880959ff2fff13162ca5c4018562ec2a94b52599b627ae1ba3e557fb03
7
- data.tar.gz: fb10761a372e04be9b421a3b035a6d4b51d98d4a40d71f811489f2ce78cc4d59fce7f5b2234f62a79e1682bd4d1d6ebb05b8c391887c117a83c62262597f0f50
6
+ metadata.gz: cf95c4ddde89888a465b7d2032bf8c7fee34673b17237c876ff3b31871840e7164675f026aa2e8bf4eb345af647f57569f9018bd86575256e378befd9b187bca
7
+ data.tar.gz: 27d866587f69302442753c6e914f588b1150b01b631401cbfb5f8891f9bc472e5cc02217d755a4b42248e9c77cf42ab206fc8d26c0ada14ba65e485578fd3eab
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Tokenex [![Build Status](https://travis-ci.org/cliffom/tokenex-gem.svg?branch=master)](https://travis-ci.org/cliffom/tokenex-gem)
1
+ # Tokenex [![Build Status](https://travis-ci.org/cliffom/tokenex-gem.svg?branch=master)](https://travis-ci.org/cliffom/tokenex-gem) [![Gem Version](https://badge.fury.io/rb/tokenex.svg)](https://badge.fury.io/rb/tokenex)
2
2
 
3
3
  A convenient Ruby wrapper for the TokenEx API.
4
4
 
@@ -24,7 +24,7 @@ module Tokenex
24
24
  return response['Token']
25
25
  end
26
26
 
27
- def ccnum_from_token(token)
27
+ def detokenize(token)
28
28
  action = "Detokenize"
29
29
  data = {
30
30
  "Token" => token
@@ -36,6 +36,30 @@ module Tokenex
36
36
  return response['Value']
37
37
  end
38
38
 
39
+ def validate_token(token)
40
+ action = "ValidateToken"
41
+ data = {
42
+ "Token" => token
43
+ }
44
+
45
+ response = send_request(action, data)
46
+ throw :tokenex_invalid_token unless is_valid_response(response)
47
+
48
+ return response['Valid']
49
+ end
50
+
51
+ def delete_token(token)
52
+ action = "DeleteToken"
53
+ data = {
54
+ "Token" => token
55
+ }
56
+
57
+ response = send_request(action, data)
58
+ throw :tokenex_invalid_token unless is_valid_response(response)
59
+
60
+ return response['Success']
61
+ end
62
+
39
63
  private
40
64
  def headers
41
65
  {
@@ -1,3 +1,3 @@
1
1
  module Tokenex
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tokenex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Clifford