Class: AgreementPaymentProcess
payment/agreement_payment_process.AgreementPaymentProcess
Process manager that controls the logic behind processing events related to an agreement which result with payments
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new AgreementPaymentProcess(agreement, allocation, filters, logger?): AgreementPaymentProcess
Parameters
| Name | Type |
|---|---|
agreement | Agreement |
allocation | Allocation |
filters | Object |
filters.invoiceFilter | InvoiceFilter |
filters.debitNoteFilter | DebitNoteFilter |
logger? | Logger |
Returns
Defined in
src/payment/agreement_payment_process.ts:28
Properties
logger
• Readonly logger: Logger
Defined in
src/payment/agreement_payment_process.ts:26
agreement
• Readonly agreement: Agreement
Defined in
src/payment/agreement_payment_process.ts:29
allocation
• Readonly allocation: Allocation
Defined in
src/payment/agreement_payment_process.ts:30
filters
• Readonly filters: Object
Type declaration
| Name | Type |
|---|---|
invoiceFilter | InvoiceFilter |
debitNoteFilter | DebitNoteFilter |
Defined in
src/payment/agreement_payment_process.ts:31
Methods
addDebitNote
▸ addDebitNote(debitNote): Promise<boolean>
Adds the debit note to the process avoiding race conditions
Parameters
| Name | Type |
|---|---|
debitNote | DebitNote |
Returns
Promise<boolean>
Defined in
src/payment/agreement_payment_process.ts:43
addInvoice
▸ addInvoice(invoice): Promise<boolean>
Adds the invoice to the process avoiding race conditions
Parameters
| Name | Type |
|---|---|
invoice | Invoice |
Returns
Promise<boolean>
Defined in
src/payment/agreement_payment_process.ts:50
isFinished
▸ isFinished(): boolean
Tells if the process reached a point in which we can consider it as "finished"
Returns
boolean