Sha256: b408994f273af486d439bf010ce08c27a29d4f45dbb8d81565d724897573cd15

Contents?: true

Size: 959 Bytes

Versions: 1

Compression:

Stored size: 959 Bytes

Contents

module Braintree
  class CreditCardVerification
    include BaseModule

    attr_reader :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code,
      :cvv_response_code, :merchant_account_id, :processor_response_code, :processor_response_text, :status

    def initialize(attributes) # :nodoc:
      set_instance_variables_from_hash(attributes)
    end

    def inspect # :nodoc:
      attr_order = [
        :status, :processor_response_code, :processor_response_text,
        :cvv_response_code, :avs_error_response_code,
        :avs_postal_code_response_code, :avs_street_address_response_code,
        :merchant_account_id
      ]
      formatted_attrs = attr_order.map do |attr|
        "#{attr}: #{send(attr).inspect}"
      end
      "#<#{self.class} #{formatted_attrs.join(", ")}>"
    end

    class << self
      protected :new
    end

    def self._new(*args) # :nodoc:
      self.new *args
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
braintree-2.3.1 lib/braintree/credit_card_verification.rb