mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { Transformer } from '@/modules/Transformer/Transformer';
|
||||
import { PUBLIC_PAYMENT_LINK } from '../constants';
|
||||
|
||||
export class GeneratePaymentLinkTransformer extends Transformer {
|
||||
/**
|
||||
* Exclude these attributes from payment link object.
|
||||
* @returns {Array}
|
||||
*/
|
||||
public excludeAttributes = (): string[] => {
|
||||
return ['linkId'];
|
||||
};
|
||||
|
||||
/**
|
||||
* Included attributes.
|
||||
* @returns {string[]}
|
||||
*/
|
||||
public includeAttributes = (): string[] => {
|
||||
return ['link'];
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the public/private payment linl
|
||||
* @returns {string}
|
||||
*/
|
||||
public link(link) {
|
||||
return PUBLIC_PAYMENT_LINK?.replace('{PAYMENT_LINK_ID}', link.linkId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user