From 0d68eadf84b599eac844bf37f592cb1e9edae9a1 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 16 Feb 2024 14:51:14 +0200 Subject: [PATCH] docs: add ignore tag to isPaymentProcessor (#6410) - Add ignore tags to `isPaymentProcessor` method and property - Generate payment reference to move the associated section. --- docs-util/typedoc-json-output/payment.json | 67 ------------------- .../src/interfaces/payment-processor.ts | 6 ++ .../src/payment/abstract-payment-provider.ts | 6 ++ .../payment.AbstractPaymentProcessor.mdx | 10 --- 4 files changed, 12 insertions(+), 77 deletions(-) diff --git a/docs-util/typedoc-json-output/payment.json b/docs-util/typedoc-json-output/payment.json index e7fe2d0398..4e2b966fb2 100644 --- a/docs-util/typedoc-json-output/payment.json +++ b/docs-util/typedoc-json-output/payment.json @@ -2515,55 +2515,6 @@ "package": "typescript" } }, - { - "id": 62, - "name": "_isPaymentProcessor", - "variant": "declaration", - "kind": 1024, - "flags": { - "isStatic": true - }, - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "true" - }, - { - "id": 63, - "name": "isPaymentProcessor", - "variant": "declaration", - "kind": 2048, - "flags": { - "isStatic": true - }, - "signatures": [ - { - "id": 64, - "name": "isPaymentProcessor", - "variant": "signature", - "kind": 4096, - "flags": {}, - "parameters": [ - { - "id": 65, - "name": "object", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, { "id": 66, "name": "identifier", @@ -4207,14 +4158,12 @@ "children": [ 71, 72, - 62, 66 ] }, { "title": "Methods", "children": [ - 63, 75, 78, 85, @@ -4543,22 +4492,6 @@ "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", "qualifiedName": "AbstractPaymentProcessor" }, - "62": { - "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", - "qualifiedName": "AbstractPaymentProcessor._isPaymentProcessor" - }, - "63": { - "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", - "qualifiedName": "AbstractPaymentProcessor.isPaymentProcessor" - }, - "64": { - "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", - "qualifiedName": "AbstractPaymentProcessor.isPaymentProcessor" - }, - "65": { - "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", - "qualifiedName": "object" - }, "66": { "sourceFileName": "../../../packages/medusa/src/interfaces/payment-processor.ts", "qualifiedName": "AbstractPaymentProcessor.identifier" diff --git a/packages/medusa/src/interfaces/payment-processor.ts b/packages/medusa/src/interfaces/payment-processor.ts index 6e9eb03614..9bbc175810 100644 --- a/packages/medusa/src/interfaces/payment-processor.ts +++ b/packages/medusa/src/interfaces/payment-processor.ts @@ -676,8 +676,14 @@ export abstract class AbstractPaymentProcessor implements PaymentProcessor { protected readonly config?: Record // eslint-disable-next-line @typescript-eslint/no-empty-function ) {} + /** + * @ignore + */ static _isPaymentProcessor = true + /** + * @ignore + */ static isPaymentProcessor(object): boolean { return object?.constructor?._isPaymentProcessor } diff --git a/packages/utils/src/payment/abstract-payment-provider.ts b/packages/utils/src/payment/abstract-payment-provider.ts index fafb9defa9..32b3c04fe3 100644 --- a/packages/utils/src/payment/abstract-payment-provider.ts +++ b/packages/utils/src/payment/abstract-payment-provider.ts @@ -41,8 +41,14 @@ export abstract class AbstractPaymentProvider implements IPaymentProvider { protected readonly config?: Record // eslint-disable-next-line @typescript-eslint/no-empty-function ) {} + /** + * @ignore + */ static _isPaymentProvider = true + /** + * @ignore + */ static isPaymentProvider(object): boolean { return object?.constructor?._isPaymentProvider } diff --git a/www/apps/docs/content/references/payment/classes/payment.AbstractPaymentProcessor.mdx b/www/apps/docs/content/references/payment/classes/payment.AbstractPaymentProcessor.mdx index 86e9def7d5..93f18180f7 100644 --- a/www/apps/docs/content/references/payment/classes/payment.AbstractPaymentProcessor.mdx +++ b/www/apps/docs/content/references/payment/classes/payment.AbstractPaymentProcessor.mdx @@ -143,16 +143,6 @@ ___ ## Methods -### isPaymentProcessor - -#### Parameters - - - -#### Returns - - - ### capturePayment This method is used to capture the payment amount of an order. This is typically triggered manually by the store operator from the admin.