Sha256: 17e04c9ac44461044d074cea4822715e7564f7cbceb4848edaa4a58c6e3dc6fa

Contents?: true

Size: 861 Bytes

Versions: 8

Compression:

Stored size: 861 Bytes

Contents

module RockRMS
  class Client
    module TransactionDetail
      def list_transaction_details(options = {})
        res = get(transaction_detail_path, options)
        Response::TransactionDetail.format(res)
      end

      def find_transaction_detail(id)
        res = get(transaction_detail_path(id))
        Response::TransactionDetail.format(res)
      end

      def update_transaction_detail(id, fund_id: nil, amount: nil, fee_amount: nil)
        options = {}
        options['AccountId'] = fund_id    if fund_id
        options['Amount']    = amount     if amount
        options['FeeAmount'] = fee_amount if fee_amount

        patch(transaction_detail_path(id), options)
      end

      private

      def transaction_detail_path(id = nil)
        id ? "FinancialTransactionDetails/#{id}" : 'FinancialTransactionDetails'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rock_rms-5.9.0 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.8.1 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.8.0 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.7.1 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.7.0 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.6.0 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.5.0 lib/rock_rms/resources/transaction_detail.rb
rock_rms-5.4.0 lib/rock_rms/resources/transaction_detail.rb