Module: Unit::Statement

Defined in:
lib/unit/models/statement/statement.rb,
lib/unit/models/statement/get_pdf_by_id_request.rb,
lib/unit/models/statement/list_statement_params.rb,
lib/unit/models/statement/get_html_by_id_request.rb,
lib/unit/models/statement/get_bank_verification_pdf.rb

Defined Under Namespace

Classes: GetBankVerificationPdf, GetHtmlByIdRequest, GetPdfByIdRequest, ListStatementParams

Constant Summary collapse

STATEMENT_LIST_LIMIT =
100
STATEMENT_LIST_OFFSET =
0

Class Method Summary collapse

Class Method Details

.get_bank_verification_pdf(account_id:, include_proof_of_funds: false) ⇒ Object

Get a bank verification pdf

Parameters:

  • account_id (String)
  • include_proof_of_funds (Boolean) (defaults to: false)

See Also:



49
50
51
52
# File 'lib/unit/models/statement/statement.rb', line 49

def get_bank_verification_pdf(account_id:, include_proof_of_funds: false)
  request = GetBankVerificationPdf.new(, include_proof_of_funds: include_proof_of_funds)
  Unit::Resource::StatementResource.get_bank_verification(request)
end

.get_html_by_id(statement_id:, customer_id:, language: nil) ⇒ Object

Get statement html by id

Parameters:

  • customer_id (String)
  • language (String) (defaults to: nil)

See Also:



40
41
42
43
# File 'lib/unit/models/statement/statement.rb', line 40

def get_html_by_id(statement_id:, customer_id:, language: nil)
  request = GetHtmlByIdRequest.new(statement_id, customer_id, language)
  Unit::Resource::StatementResource.get_html_by_id(request)
end

.get_pdf_by_id(statement_id:, customer_id:, language: nil) ⇒ Object

Get statement pdf by id

Parameters:

  • customer_id (String)
  • language (String) (defaults to: nil)

See Also:



31
32
33
34
# File 'lib/unit/models/statement/statement.rb', line 31

def get_pdf_by_id(statement_id:, customer_id:, language: nil)
  request = GetPdfByIdRequest.new(statement_id, customer_id, language)
  Unit::Resource::StatementResource.get_pdf_by_id(request)
end

.list_statements(limit: STATEMENT_LIST_LIMIT, offset: STATEMENT_LIST_OFFSET, account_id: nil, customer_id: nil, period: nil, sort: nil) ⇒ Object

List statements

Parameters:

  • limit (Integer) (defaults to: STATEMENT_LIST_LIMIT)
  • offset (Integer) (defaults to: STATEMENT_LIST_OFFSET)
  • account_id (String) (defaults to: nil)
  • customer_id (String) (defaults to: nil)
  • period (String) (defaults to: nil)
  • sort (String) (defaults to: nil)

See Also:



21
22
23
24
25
# File 'lib/unit/models/statement/statement.rb', line 21

def list_statements(limit: STATEMENT_LIST_LIMIT, offset: STATEMENT_LIST_OFFSET,
                    account_id: nil, customer_id: nil, period: nil, sort: nil)
  params = ListStatementParams.new(limit, offset, , customer_id, period, sort)
  Unit::Resource::StatementResource.list(params)
end