# Statements

This object represents line of credit (e.g. credit card) or loan (e.g. personal installment) statement. Each statement is
associated with one due date.

For lines of credit, statements are created one calendar day after the period end date. The number of dates between a
statement creation and a due date can be configured by lenders, but are normally 14 or 21 days.

For installments, there are two options for when statements can be created:
1. One calendar day after the period end date, which is also the due date. In this case, the statement date and due date are the same.
2. A number of calendar days before the period end date. The offset (as number of calendar days) can be configured by lenders.
   In this case, a statement is created and sent before the period ends, which means some of the statement details are calculated
   based on partial period data (e.g. amount of interest accrued in the period.)


## Generate statement

 - [POST /people/{personId}/loans/{loanId}/periods/{periodId}/generate-statement](https://docs.peachfinance.com/api-docs/api-public/statements/peach.statements.handlers.generate_statement.md): Generates a statement, and if one already exists, replaces the older one as the active one.
If sync=true is passed, the server will try to wait up to 20 seconds for the statement
creation to finish. If it finishes in time, it will return the statement object.
Otherwise, it will return nothing.

## Get statements

 - [GET /people/{personId}/loans/{loanId}/statements](https://docs.peachfinance.com/api-docs/api-public/statements/peach.statements.handlers.get_statements.md)

## Update statement

 - [PUT /people/{personId}/loans/{loanId}/statements/{statementId}](https://docs.peachfinance.com/api-docs/api-public/statements/peach.statements.handlers.update_statement.md)

## Get statement details

 - [GET /people/{personId}/loans/{loanId}/statements/{statementId}/details](https://docs.peachfinance.com/api-docs/api-public/statements/peach.statements.handlers.get_statement_details.md)

