Sha256: d1b2a4c30149065a0876e8c0dae35aade017dbb45ed25689844da66161f585e3

Contents?: true

Size: 1.19 KB

Versions: 8

Compression:

Stored size: 1.19 KB

Contents

module Braintree
  class SuccessfulResult
    include BaseModule

    attr_reader :address
    attr_reader :apple_pay_options
    attr_reader :credentials
    attr_reader :credit_card
    attr_reader :credit_card_verification
    attr_reader :customer
    attr_reader :disputes
    attr_reader :document_upload
    attr_reader :evidence
    attr_reader :exchange_rate_quote_payload
    attr_reader :merchant
    attr_reader :merchant_account
    attr_reader :merchant_accounts
    attr_reader :payment_method
    attr_reader :payment_method_nonce
    attr_reader :paypal_account
    attr_reader :plan
    attr_reader :settlement_batch_summary
    attr_reader :subscription
    attr_reader :supported_networks
    attr_reader :transaction
    attr_reader :us_bank_account_verification

    def initialize(attributes = {})
      @attrs = attributes.keys
      attributes.each do |key, value|
        instance_variable_set("@#{key}", value)
      end
      @credit_card_verification = @verification
    end

    def inspect
      inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" }
      "#<#{self.class} #{inspected_attributes.join(" ")}>"
    end

    def success?
      true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
braintree-4.23.0 lib/braintree/successful_result.rb
braintree-4.22.0 lib/braintree/successful_result.rb
braintree-4.21.0 lib/braintree/successful_result.rb
braintree-4.20.0 lib/braintree/successful_result.rb
braintree-4.19.0 lib/braintree/successful_result.rb
braintree-4.18.0 lib/braintree/successful_result.rb
braintree-4.17.0 lib/braintree/successful_result.rb
braintree-4.16.0 lib/braintree/successful_result.rb