Method: ProcessOut::Token#find
- Defined in:
- lib/processout/token.rb
#find(customer_id, token_id, options = {}) ⇒ Object
Find a customer’s token by its ID. Params:
customer_id-
ID of the customer
token_id-
ID of the token
options-
Hashof options
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/processout/token.rb', line 394 def find(customer_id, token_id, = {}) self.prefill() request = Request.new(@client) path = "/customers/" + CGI.escape(customer_id) + "/tokens/" + CGI.escape(token_id) + "" data = { } response = Response.new(request.get(path, data, )) return_values = Array.new body = response.body body = body["token"] obj = Token.new(@client) return_values.push(obj.fill_with_data(body)) return_values[0] end |