Skip to content

SudoSOS Back-end API / payout-requests / PayoutRequest

Class: PayoutRequest ​

Extends ​

  • PdfAbleClass<typeof default, this> & BasePayout<this>

Constructors ​

Constructor ​

ts
new PayoutRequest(): PayoutRequest;

Returns ​

PayoutRequest

Inherited from ​

ts
PdfAble(BasePayout).constructor

Properties ​

PropertyModifierTypeDescriptionOverridesInherited from
amountpublicDinero--PdfAble(BasePayout).amount
approvedBy?publicUser---
bankAccountNamepublicstring---
bankAccountNumberpublicstring---
createdAtreadonlyDate--PdfAble(BasePayout).createdAt
idreadonlynumber--PdfAble(BasePayout).id
payoutRequestStatuspublicPayoutRequestStatus[]---
pdf?publicPayoutRequestPdfThe Pdf file.PdfAble(BasePayout).pdf-
pdfId?publicnumberThe id of the Pdf file.PdfAble(BasePayout).pdfId-
pdfServicepublicPayoutRequestPdfServiceThe service that creates the Pdf file. Can be either a byte-producing service plus optionally a stored-entity service.PdfAble(BasePayout).pdfService-
requestedBypublicUser--PdfAble(BasePayout).requestedBy
transfer?publicTransfer--PdfAble(BasePayout).transfer
updatedAtreadonlyDate--PdfAble(BasePayout).updatedAt
versionreadonlynumber--PdfAble(BasePayout).version

Methods ​

createPdf() ​

ts
createPdf(): Promise<Pdf>;

Create and persist the Pdf file, returning the Pdf entity. The configured pdfService must implement createPdfWithEntity, otherwise this throws.

Returns ​

Promise<Pdf>

Inherited from ​

ts
PdfAble(BasePayout).createPdf

getOrCreatePdf() ​

ts
getOrCreatePdf(force?): Promise<Pdf>;

Get the Pdf file. If the Pdf file is not current, create it.

Parameters ​

ParameterTypeDefault valueDescription
forcebooleanfalseIf true, always create the Pdf file.

Returns ​

Promise<Pdf>

Inherited from ​

ts
PdfAble(BasePayout).getOrCreatePdf

getOwner() ​

ts
abstract getOwner(): Promise<User>;

Get the owner of the Pdf file.

Returns ​

Promise<User>

Inherited from ​

ts
PdfAble(BasePayout).getOwner

getPdfParamHash() ​

ts
getPdfParamHash(): Promise<string>;

Get the hash of the parameters of the Pdf file.

Returns ​

Promise<string>

Inherited from ​

ts
PdfAble(BasePayout).getPdfParamHash

validatePdfHash() ​

ts
validatePdfHash(): Promise<boolean>;

Validates if the Pdf matches the stored hash.

Returns ​

Promise<boolean>

Inherited from ​

ts
PdfAble(BasePayout).validatePdfHash