SudoSOS Back-end API / payout-requests / PayoutRequest
Class: PayoutRequest ​
Extends ​
PdfAbleClass<typeofdefault,this> &BasePayout<this>
Constructors ​
Constructor ​
ts
new PayoutRequest(): PayoutRequest;Returns ​
PayoutRequest
Inherited from ​
ts
PdfAble(BasePayout).constructorProperties ​
| Property | Modifier | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|---|
amount | public | Dinero | - | - | PdfAble(BasePayout).amount |
approvedBy? | public | User | - | - | - |
bankAccountName | public | string | - | - | - |
bankAccountNumber | public | string | - | - | - |
createdAt | readonly | Date | - | - | PdfAble(BasePayout).createdAt |
id | readonly | number | - | - | PdfAble(BasePayout).id |
payoutRequestStatus | public | PayoutRequestStatus[] | - | - | - |
pdf? | public | PayoutRequestPdf | The Pdf file. | PdfAble(BasePayout).pdf | - |
pdfId? | public | number | The id of the Pdf file. | PdfAble(BasePayout).pdfId | - |
pdfService | public | PayoutRequestPdfService | The service that creates the Pdf file. Can be either a byte-producing service plus optionally a stored-entity service. | PdfAble(BasePayout).pdfService | - |
requestedBy | public | User | - | - | PdfAble(BasePayout).requestedBy |
transfer? | public | Transfer | - | - | PdfAble(BasePayout).transfer |
updatedAt | readonly | Date | - | - | PdfAble(BasePayout).updatedAt |
version | readonly | number | - | - | 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).createPdfgetOrCreatePdf() ​
ts
getOrCreatePdf(force?): Promise<Pdf>;Get the Pdf file. If the Pdf file is not current, create it.
Parameters ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
force | boolean | false | If true, always create the Pdf file. |
Returns ​
Promise<Pdf>
Inherited from ​
ts
PdfAble(BasePayout).getOrCreatePdfgetOwner() ​
ts
abstract getOwner(): Promise<User>;Get the owner of the Pdf file.
Returns ​
Promise<User>
Inherited from ​
ts
PdfAble(BasePayout).getOwnergetPdfParamHash() ​
ts
getPdfParamHash(): Promise<string>;Get the hash of the parameters of the Pdf file.
Returns ​
Promise<string>
Inherited from ​
ts
PdfAble(BasePayout).getPdfParamHashvalidatePdfHash() ​
ts
validatePdfHash(): Promise<boolean>;Validates if the Pdf matches the stored hash.
Returns ​
Promise<boolean>
Inherited from ​
ts
PdfAble(BasePayout).validatePdfHash