Liking cljdoc? Tell your friends :D

brazilian-utils.boleto.internal

Internal helper functions for boleto validation and processing.

Pure functions for DV calculation, digit parsing, and data extraction.

Internal helper functions for boleto validation and processing.

Pure functions for DV calculation, digit parsing, and data extraction.
raw docstring

arrecadacao-block-sizeclj/s

source

arrecadacao-blocksclj/s

(arrecadacao-blocks digits)

Splits arrecadação digits into blocks of 12.

Splits arrecadação digits into blocks of 12.
sourceraw docstring

arrecadacao-data-sizeclj/s

source

arrecadacao-lengthclj/s

source

bancario-fieldsclj/s

Definition of partial sections for 47-digit boleto validation.

Definition of partial sections for 47-digit boleto validation.
sourceraw docstring

bancario-lengthclj/s

source

calculate-due-dateclj/s

(calculate-due-date due-date-factor)

Calculates due date from factor (days since 1997-10-07).

Args: due-date-factor - Integer days since base date

Returns: ISO date string (YYYY-MM-DD) or nil if factor is 0 or negative

Calculates due date from factor (days since 1997-10-07).

Args:
  due-date-factor - Integer days since base date

Returns:
  ISO date string (YYYY-MM-DD) or nil if factor is 0 or negative
sourceraw docstring

coerce-bancario-digitsclj/s

(coerce-bancario-digits digits)

Pad a 46-digit bank boleto by inserting one zero at position 38 so it matches 47 digits; otherwise return unchanged.

Pad a 46-digit bank boleto by inserting one zero at position 38 so it matches 47 digits; otherwise return unchanged.
sourceraw docstring

digit-atclj/s

(digit-at digits position)

Gets digit value at position in string, or nil if out of bounds.

Gets digit value at position in string, or nil if out of bounds.
sourceraw docstring

dv-mod10clj/s

(dv-mod10 digits)

Calcula DV usando Módulo 10 (Luhn alternado 2-1).

Calcula DV usando Módulo 10 (Luhn alternado 2-1).
sourceraw docstring

dv-mod10-arrecclj/s

(dv-mod10-arrec digits)

Cálculo Módulo 10 para Arrecadação (Luhn 2-1).

Cálculo Módulo 10 para Arrecadação (Luhn 2-1).
sourceraw docstring

dv-mod11-arrecclj/s

(dv-mod11-arrec digits)

Cálculo Módulo 11 para Arrecadação (Pesos 2-9).

Cálculo Módulo 11 para Arrecadação (Pesos 2-9).
sourceraw docstring

dv-mod11-bankclj/s

(dv-mod11-bank digits)

Calcula DV usando Módulo 11 para boletos bancários (pesos 2-9).

Calcula DV usando Módulo 11 para boletos bancários (pesos 2-9).
sourceraw docstring

extract-bank-infoclj/s

(extract-bank-info digits)

Extracts bank code and currency from boleto digits.

Args: digits - Boleto digit string (minimum 4 digits)

Returns: Map with :bank-code (3 digits) and :currency (1 digit)

Extracts bank code and currency from boleto digits.

Args:
  digits - Boleto digit string (minimum 4 digits)

Returns:
  Map with :bank-code (3 digits) and :currency (1 digit)
sourceraw docstring

extract-due-date-factorclj/s

(extract-due-date-factor digits)

Extracts due date factor from boleto digits.

The factor represents days since base date (1997-10-07).

Args: digits - Boleto digit string (minimum 37 digits)

Returns: Integer representing days since base date

Extracts due date factor from boleto digits.

The factor represents days since base date (1997-10-07).

Args:
  digits - Boleto digit string (minimum 37 digits)

Returns:
  Integer representing days since base date
sourceraw docstring

extract-valueclj/s

(extract-value digits)

Extracts boleto value in cents from boleto digits.

Args: digits - Boleto digit string (minimum 47 digits)

Returns: Long integer representing value in cents

Extracts boleto value in cents from boleto digits.

Args:
  digits - Boleto digit string (minimum 47 digits)

Returns:
  Long integer representing value in cents
sourceraw docstring

linha->barcodeclj/s

(linha->barcode digits)

Converts a digitable line to boleto/barcode format (44 digits).

Converts a digitable line to boleto/barcode format (44 digits).
sourceraw docstring

parse-digitclj/s

(parse-digit ch)

Converts a character to its numeric value (0-9).

Converts a character to its numeric value (0-9).
sourceraw docstring

resolve-arrecadacao-dvclj/s

(resolve-arrecadacao-dv digits)

Define o algoritmo baseado no 3º dígito (Identificador de Valor).

Define o algoritmo baseado no 3º dígito (Identificador de Valor).
sourceraw docstring

valid-arrecadacao-block?clj/s

(valid-arrecadacao-block? block dv-fn)

Validates a single arrecadação block using provided DV function.

Validates a single arrecadação block using provided DV function.
sourceraw docstring

valid-field?clj/s

(valid-field? {:keys [range dv-pos]} digits)

Validates a single bancário field against its DV.

Validates a single bancário field against its DV.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close