Sha256: 136b8cabbf103f449089c86a3f7451dbb71a7b69fe50681dd8afdf146293076a

Contents?: true

Size: 829 Bytes

Versions: 27

Compression:

Stored size: 829 Bytes

Contents

module Braintree
  class Transaction
    class Installment
      class Adjustment
        include BaseModule

        module Kind
          Refund = "REFUND"
          Dispute = "DISPUTE"
        end

        attr_reader :amount
        attr_reader :kind
        attr_reader :projected_disbursement_date
        attr_reader :actual_disbursement_date

        def initialize(attributes)
          set_instance_variables_from_hash attributes unless attributes.nil?
          @amount = Util.to_big_decimal(amount)
        end

        def inspect
          attrs = [:amount, :kind, :projected_disbursement_date, :actual_disbursement_date]
          formatted_attrs = attrs.map do |attr|
            "#{attr}: #{send(attr).inspect}"
          end

          "#<#{formatted_attrs.join(", ")}>"
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
braintree-4.23.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.22.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.21.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.20.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.19.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.18.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.17.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.16.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.15.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.14.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.13.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.12.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.11.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.10.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.9.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.8.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.7.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.6.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.5.0 lib/braintree/transaction/installment/adjustment.rb
braintree-4.4.0 lib/braintree/transaction/installment/adjustment.rb