SudoSOS Back-end API / internal/pdf/seller-payout-pdf-service / SellerPayoutPdfService
Class: SellerPayoutPdfService ​
A PdfService whose output is a record we send to people. Once stored, the PDF is frozen (#141): it is returned as-is, and only re-rendered when force is set or its hash was cleared to mark it stale.
Extends ​
Constructors ​
Constructor ​
ts
new SellerPayoutPdfService(manager?): SellerPayoutPdfService;Parameters ​
| Parameter | Type |
|---|---|
manager? | EntityManager |
Returns ​
SellerPayoutPdfService
Inherited from ​
Properties ​
| Property | Modifier | Type | Default value | Overrides | Inherited from |
|---|---|---|---|---|---|
location | readonly | "./data/seller_payouts" | SELLER_PAYOUT_PDF_LOCATION | StoredPdfService.location | - |
manager | protected | EntityManager | undefined | - | StoredPdfService.manager |
pdfConstructor | readonly | typeof SellerPayoutPdf | SellerPayoutPdf | StoredPdfService.pdfConstructor | - |
render | public | (options) => string | createSellerPayoutPdf | StoredPdfService.render | - |
Methods ​
compile() ​
ts
protected compile(params): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
params | ISellerPayoutPdf |
Returns ​
Promise<Buffer<ArrayBufferLike>>
Inherited from ​
configureLogger() ​
ts
protected configureLogger(logger): void;Parameters ​
| Parameter | Type |
|---|---|
logger | Logger |
Returns ​
void
Inherited from ​
StoredPdfService.configureLogger
getOrCreate() ​
ts
getOrCreate(entity, force?): Promise<SellerPayoutPdf>;Parameters ​
| Parameter | Type | Default value |
|---|---|---|
entity | SellerPayout | undefined |
force | boolean | false |
Returns ​
Promise<SellerPayoutPdf>
Inherited from ​
getOwner() ​
ts
getOwner(entity): User;Parameters ​
| Parameter | Type |
|---|---|
entity | SellerPayout |
Returns ​
Overrides ​
getParameters() ​
ts
getParameters(entity): Promise<ISellerPayoutPdf>;Parameters ​
| Parameter | Type |
|---|---|
entity | SellerPayout |
Returns ​
Promise<ISellerPayoutPdf>
Overrides ​
StoredPdfService.getParameters
html() ​
ts
html(entity): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | SellerPayout |
Returns ​
Promise<Buffer<ArrayBufferLike>>
Inherited from ​
output() ​
ts
output(entity, fileType): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | SellerPayout |
fileType | ReturnFileType |
Returns ​
Promise<Buffer<ArrayBufferLike>>
Inherited from ​
pdf() ​
ts
pdf(entity): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | SellerPayout |
Returns ​
Promise<Buffer<ArrayBufferLike>>