Class: PFS::API::TransactionsService

Inherits:
Service
  • Object
show all
Defined in:
lib/pfs/api/transactions_service.rb

Instance Attribute Summary

Attributes inherited from Service

#client

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from PFS::API::Service

Instance Method Details

#history(account_id:, start_date:, end_date:) ⇒ Object



6
7
8
9
# File 'lib/pfs/api/transactions_service.rb', line 6

def history(account_id:, start_date:, end_date:)
  response = client.get("/Account/#{}/Transactions?StartDate=#{start_date}&EndDate=#{end_date}")
  Resources::Transactions::Transactions.new(response, response.body.dig(:data, :transactions))
end