Class: PFS::API::StatementsService
- Inherits:
-
Service
- Object
- Service
- PFS::API::StatementsService
show all
- Defined in:
- lib/pfs/api/statements_service.rb
Instance Attribute Summary
Attributes inherited from Service
#client
Instance Method Summary
collapse
Methods inherited from Service
#initialize
Instance Method Details
#by_id(account_id:, statement_id:, inward_outward:, processor:) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/pfs/api/statements_service.rb', line 6
def by_id(account_id:, statement_id:, inward_outward:, processor:)
response = client.get(
"/BankPayment/#{account_id}/StatementById?statementitemid=#{statement_id}&InwardOutward=#{inward_outward}&Processor=#{processor}"
)
Resources::Statements::Statement.new(response, response.body.dig(:data, :transaction))
end
|
#history(account_id:, start_date:, end_date:, inward_outward:, processor:) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/pfs/api/statements_service.rb', line 13
def history(account_id:, start_date:, end_date:, inward_outward:, processor:)
response = client.get(
"/BankPayment/#{account_id}/Statement?StartDate=#{start_date}&EndDate=#{end_date}&InwardOutward=#{inward_outward}&Processor=#{processor}"
)
Resources::Statements::Statements.new(response, response.body.dig(:data, :transactions))
end
|