JS API Reference

Class: DebitNote

payment/debit_note.DebitNote

A Debit Note is an artifact issued by the Provider to the Requestor, in the context of a specific Activity. It is a notification of Total Amount Due incurred by the Activity until the moment the Debit Note is issued. This is expected to be used as trigger for payment in upfront-payment or pay-as-you-go scenarios. NOTE: Only Debit Notes with non-null paymentDueDate are expected to trigger payments. NOTE: Debit Notes flag the current Total Amount Due, which is accumulated from the start of Activity. Debit Notes are expected to trigger payments, therefore payment amount for the newly received Debit Note is expected to be determined by difference of Total Payments for the Agreement vs Total Amount Due.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DebitNote(model, providerInfo): DebitNote

Parameters

NameType
modelDebitNote
providerInfoProviderInfo

Returns

DebitNote

Overrides

BaseDocument.constructor

Defined in

src/payment/debit_note.ts:26

Properties

id

Readonly id: string

Overrides

BaseDocument.id

Defined in

src/payment/debit_note.ts:14


previousDebitNoteId

Optional Readonly previousDebitNoteId: string

Defined in

src/payment/debit_note.ts:15


timestamp

Readonly timestamp: string

Defined in

src/payment/debit_note.ts:16


activityId

Readonly activityId: string

Defined in

src/payment/debit_note.ts:17


totalAmountDue

Readonly totalAmountDue: string

Defined in

src/payment/debit_note.ts:18


usageCounterVector

Optional Readonly usageCounterVector: object

Defined in

src/payment/debit_note.ts:19


model

Protected model: DebitNote

Inherited from

BaseDocument.model

Defined in

src/payment/debit_note.ts:27


recipientId

Readonly recipientId: string

Inherited from

BaseDocument.recipientId

Defined in

src/payment/BaseDocument.ts:19


payeeAddr

Readonly payeeAddr: string

Inherited from

BaseDocument.payeeAddr

Defined in

src/payment/BaseDocument.ts:20


requestorWalletAddress

Readonly requestorWalletAddress: string

Inherited from

BaseDocument.requestorWalletAddress

Defined in

src/payment/BaseDocument.ts:21


paymentPlatform

Readonly paymentPlatform: string

Inherited from

BaseDocument.paymentPlatform

Defined in

src/payment/BaseDocument.ts:22


agreementId

Readonly agreementId: string

Inherited from

BaseDocument.agreementId

Defined in

src/payment/BaseDocument.ts:23


paymentDueDate

Optional Readonly paymentDueDate: string

Inherited from

BaseDocument.paymentDueDate

Defined in

src/payment/BaseDocument.ts:24


status

Protected status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED"

Inherited from

BaseDocument.status

Defined in

src/payment/BaseDocument.ts:26


provider

Readonly provider: ProviderInfo

Inherited from

BaseDocument.provider

Defined in

src/payment/BaseDocument.ts:31

Methods

getPreciseAmount

getPreciseAmount(): Decimal

Returns

Decimal

Defined in

src/payment/debit_note.ts:38


getStatus

getStatus(): "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED"

Tells what's the current status of the document

Returns

"ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED"

Inherited from

BaseDocument.getStatus

Defined in

src/payment/BaseDocument.ts:45