Method: ProcessOut::Token#save
- Defined in:
- lib/processout/token.rb
#save(options = {}) ⇒ Object
Save the updated customer attributes. Params:
options-
Hashof options
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/processout/token.rb', line 467 def save( = {}) self.prefill() request = Request.new(@client) path = "/customers/" + CGI.escape(@customer_id) + "/tokens/" + CGI.escape(@id) + "" data = { "source" => .fetch(:source, nil), "settings" => .fetch(:settings, nil), "device" => .fetch(:device, nil), "verify" => .fetch(:verify, nil), "verify_metadata" => .fetch(:verify_metadata, nil), "set_default" => .fetch(:set_default, nil), "verify_statement_descriptor" => .fetch(:verify_statement_descriptor, nil), "invoice_return_url" => .fetch(:invoice_return_url, nil), "gateway_configuration_id" => .fetch(:gateway_configuration_id, nil) } response = Response.new(request.put(path, data, )) return_values = Array.new return_values.push(response.success) return_values[0] end |