Method: ProcessOut::Token#fetch_customer_tokens

Defined in:
lib/processout/token.rb

#fetch_customer_tokens(customer_id, options = {}) ⇒ Object

Get the customer’s tokens. Params:

customer_id

ID of the customer

options

Hash of options



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/processout/token.rb', line 362

def fetch_customer_tokens(customer_id, options = {})
  self.prefill(options)

  request = Request.new(@client)
  path    = "/customers/" + CGI.escape(customer_id) + "/tokens"
  data    = {

  }

  response = Response.new(request.get(path, data, options))
  return_values = Array.new
  
  a    = Array.new
  body = response.body
  for v in body['tokens']
    tmp = Token.new(@client)
    tmp.fill_with_data(v)
    a.push(tmp)
  end

  return_values.push(a)
  

  
  return_values[0]
end