Class: PFS::API::StatementsService

Inherits:
Service
  • Object
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

Constructor Details

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

Instance Method Details

#by_id(account_id:, statement_id:, inward_outward:, processor:) ⇒ Object



4
5
6
7
8
9
# File 'lib/pfs/api/statements_service.rb', line 4

def by_id(account_id:, statement_id:, inward_outward:, processor:)
  response = client.get(
    "/BankPayment/#{}/StatementById?statementitemid=#{statement_id}&InwardOutward=#{inward_outward}&Processor=#{processor}"
  )
  Resources::Statements::Statement.new(response, response.body.dig(:data, :transaction))
end