docs: add TSDoc for payment processor + generate docs (#5917)

* added tsdocs for payment processor

* generated reference for payment processor
This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-12-18 14:02:18 +02:00
1 parent e63f4e6c7a
commit ddc6cc13a0
73 files changed
+34162 -17470

No files matched your search

@@ -24,13 +24,15 @@ import { AbstractFulfillmentService } from "@medusajs/medusa"
class MyFulfillmentService extends AbstractFulfillmentService {
// methods here...
}
export default MyFulfillmentService
```
---
## Identifier Property
The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the class is used when the fulfillment provider is created in the database.
The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the fulfillment provider service is used when the fulfillment provider is added to the database.
The value of this property is also used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin#regions\_postregionsregionfulfillmentproviders) to a region.
@@ -54,8 +56,15 @@ Additionally, if you’re creating your fulfillment provider as an external plug
```ts
class MyFulfillmentService extends AbstractFulfillmentService {
static identifier = "my-fulfillment"
// ...
constructor(container, options) {
super(container)
// you can access options here
// you can also initialize a client that
// communicates with a third-party service.
this.client = new Client(options)
}
// ...
}
```