Sha256: d2151dfd0f8afffa4d7ee0c159e6fab6586f3ba5165a4f6a8899594734dd05ce
Contents?: true
Size: 533 Bytes
Versions: 2
Compression:
Stored size: 533 Bytes
Contents
require 'json' module Braintree module ClientToken def self.generate(options={}) _validate_options(options) Configuration.gateway.client_token.generate(options) end def self._validate_options(options) [:make_default, :fail_on_duplicate_payment_method, :verify_card].each do |credit_card_option| if options[credit_card_option] raise ArgumentError.new("cannot specify #{credit_card_option} without a customer_id") unless options[:customer_id] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
braintree-2.31.0 | lib/braintree/client_token.rb |
braintree-2.30.2 | lib/braintree/client_token.rb |