Sha256: bc55fb6b06e2c43510ec47a2f4d7e9b5a77f0a229c02d190c03cd297b5a6577b

Contents?: true

Size: 1.08 KB

Versions: 18

Compression:

Stored size: 1.08 KB

Contents

module Braintree
  class PaymentMethodNonce
    include BaseModule # :nodoc:

    def self.create(*args)
      Configuration.gateway.payment_method_nonce.create(*args)
    end

    def self.create!(*args)
      Configuration.gateway.payment_method_nonce.create!(*args)
    end

    def self.find(*args)
      Configuration.gateway.payment_method_nonce.find(*args)
    end

    attr_reader :bin_data
    attr_reader :details
    attr_reader :nonce
    attr_reader :three_d_secure_info
    attr_reader :type

    def initialize(gateway, attributes) # :nodoc:
      @gateway = gateway
      @nonce = attributes.fetch(:nonce)
      @type = attributes.fetch(:type)
      @details = attributes.fetch(:details)
      @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info]
      @bin_data = BinData.new(attributes[:bin_data]) if attributes[:bin_data]
    end

    def to_s # :nodoc:
      nonce
    end

    class << self
      protected :new
    end

    def self._new(gateway, attributes) # :nodoc:
      new(gateway, attributes)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
braintree-2.101.0 lib/braintree/payment_method_nonce.rb
braintree-2.100.0 lib/braintree/payment_method_nonce.rb
braintree-2.99.0 lib/braintree/payment_method_nonce.rb
braintree-2.98.0 lib/braintree/payment_method_nonce.rb
braintree-2.97.0 lib/braintree/payment_method_nonce.rb
braintree-2.96.0 lib/braintree/payment_method_nonce.rb
braintree-2.95.0 lib/braintree/payment_method_nonce.rb
braintree-2.94.0 lib/braintree/payment_method_nonce.rb
braintree-2.93.0 lib/braintree/payment_method_nonce.rb
braintree-2.92.0 lib/braintree/payment_method_nonce.rb
braintree-2.91.0 lib/braintree/payment_method_nonce.rb
braintree-2.90.0 lib/braintree/payment_method_nonce.rb
braintree-2.89.0 lib/braintree/payment_method_nonce.rb
braintree-2.88.0 lib/braintree/payment_method_nonce.rb
braintree-2.87.0 lib/braintree/payment_method_nonce.rb
braintree-2.86.0 lib/braintree/payment_method_nonce.rb
braintree-2.85.0 lib/braintree/payment_method_nonce.rb
braintree-2.84.0 lib/braintree/payment_method_nonce.rb