JS API Reference

Class: Invoice

payment/invoice.Invoice

An Invoice is an artifact issued by the Provider to the Requestor, in the context of a specific Agreement. It indicates the total Amount owed by the Requestor in this Agreement. No further Debit Notes shall be issued after the Invoice is issued. The issue of Invoice signals the Termination of the Agreement (if it hasn't been terminated already). No Activity execution is allowed after the Invoice is issued.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Invoice(model, providerInfo): Invoice

Parameters

NameType
modelInvoice
providerInfoProviderInfo

Returns

Invoice

Overrides

BaseDocument.constructor

Defined in

src/payment/invoice.ts:30

Properties

activityIds

Optional Readonly activityIds: string[]

Activities IDs covered by this Invoice

Defined in

src/payment/invoice.ts:18


amount

Readonly amount: string

Amount in the invoice

Defined in

src/payment/invoice.ts:20


timestamp

Readonly timestamp: string

Invoice creation timestamp

Defined in

src/payment/invoice.ts:22


recipientId

Readonly recipientId: string

Recipient ID

Overrides

BaseDocument.recipientId

Defined in

src/payment/invoice.ts:24


model

Protected model: Invoice

Inherited from

BaseDocument.model

Defined in

src/payment/invoice.ts:31


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


id

Readonly id: string

Inherited from

BaseDocument.id

Defined in

src/payment/BaseDocument.ts:29


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/invoice.ts:41


isSameAs

isSameAs(invoice): boolean

Compares two invoices together and tells if they are the same thing

Parameters

NameType
invoiceInvoice

Returns

boolean

Defined in

src/payment/invoice.ts:48


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

Was this helpful?