mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: listen to stripe account updated webhook
This commit is contained in:
@@ -10,7 +10,7 @@ import { initalizeTenantServices } from '@/api/middleware/TenantDependencyInject
|
||||
@Service()
|
||||
export class GetInvoicePaymentLinkMetadata {
|
||||
@Inject()
|
||||
tenancy: HasTenancyService;
|
||||
private tenancy: HasTenancyService;
|
||||
|
||||
@Inject()
|
||||
private transformer: TransformerInjectable;
|
||||
@@ -23,12 +23,9 @@ export class GetInvoicePaymentLinkMetadata {
|
||||
async getInvoicePaymentLinkMeta(linkId: string) {
|
||||
const paymentLink = await PaymentLink.query()
|
||||
.findOne('linkId', linkId)
|
||||
.where('resourceType', 'SaleInvoice')
|
||||
.throwIfNotFound();
|
||||
|
||||
//
|
||||
if (paymentLink.resourceType !== 'SaleInvoice') {
|
||||
throw new ServiceError('');
|
||||
}
|
||||
|
||||
// Validate the expiry at date.
|
||||
if (paymentLink.expiryAt) {
|
||||
const currentDate = moment();
|
||||
|
||||
@@ -82,7 +82,7 @@ class GetInvoicePaymentLinkEntryMetaTransformer extends ItemEntryTransformer {
|
||||
];
|
||||
};
|
||||
|
||||
itemName(entry) {
|
||||
public itemName(entry) {
|
||||
return entry.item.name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user