JS API Reference

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

NameType
agreementAgreement
allocationAllocation
filtersObject
filters.invoiceFilterInvoiceFilter
filters.debitNoteFilterDebitNoteFilter
logger?Logger

Returns

AgreementPaymentProcess

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

NameType
invoiceFilterInvoiceFilter
debitNoteFilterDebitNoteFilter

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

NameType
debitNoteDebitNote

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

NameType
invoiceInvoice

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

Defined in

src/payment/agreement_payment_process.ts:57

Was this helpful?