lib/payment/manager/client.rb in payment-manager-client-0.1.0 vs lib/payment/manager/client.rb in payment-manager-client-0.2.0

- old
+ new

@@ -32,9 +32,14 @@ } response = Payment::Manager::Request.get(config.api_url + '/api/plans', params) JSON.parse(response.body) end + + def valid_token?(token) + response = Payment::Manager::Request.get(config.api_url + "/api/tokens/validate/#{config.client_id}/#{token}", {}) + JSON.parse(response.body)['valid'] + end end end end end