Sha256: 7717479494866e9d53c3f33ddafe543b0b300b78800820e9141050b7c83ab7fb

Contents?: true

Size: 1.2 KB

Versions: 14

Compression:

Stored size: 1.2 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 :default
    attr_reader :details
    attr_reader :nonce
    attr_reader :three_d_secure_info
    attr_reader :type
    attr_reader :authentication_insight

    def initialize(gateway, attributes) # :nodoc:
      @gateway = gateway
      set_instance_variables_from_hash(attributes)
      @details = PaymentMethodNonceDetails.new(attributes[:details]) if attributes[: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 default?
      @default
    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

14 entries across 14 versions & 1 rubygems

Version Path
braintree-4.15.0 lib/braintree/payment_method_nonce.rb
braintree-4.14.0 lib/braintree/payment_method_nonce.rb
braintree-4.13.0 lib/braintree/payment_method_nonce.rb
braintree-4.12.0 lib/braintree/payment_method_nonce.rb
braintree-4.11.0 lib/braintree/payment_method_nonce.rb
braintree-4.10.0 lib/braintree/payment_method_nonce.rb
braintree-4.9.0 lib/braintree/payment_method_nonce.rb
braintree-4.8.0 lib/braintree/payment_method_nonce.rb
braintree-4.7.0 lib/braintree/payment_method_nonce.rb
braintree-4.6.0 lib/braintree/payment_method_nonce.rb
braintree-4.5.0 lib/braintree/payment_method_nonce.rb
braintree-4.4.0 lib/braintree/payment_method_nonce.rb
braintree-4.3.0 lib/braintree/payment_method_nonce.rb
braintree-4.2.0 lib/braintree/payment_method_nonce.rb