chore(docs): Generated References (automated) (#9567)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
f8e8b276bd
commit
f2d662efca
61 files changed
+1345553
-1345196
No files matched your search
+40
@@ -0,0 +1,40 @@
|
||||
---
|
||||
displayed_sidebar: fulfillmentReference
|
||||
slug: /references/fulfillment/validateFulfillmentData
|
||||
sidebar_label: validateFulfillmentData
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# validateFulfillmentData - Fulfillment Module Reference
|
||||
|
||||
This documentation provides a reference to the `validateFulfillmentData` method. This belongs to the Fulfillment Module.
|
||||
|
||||
This method validates fulfillment data with the provider it belongs to.
|
||||
e.g. if the shipping option requires a drop point, the data you pass to create the
|
||||
shipping method must contain a drop point ID. This method can be used to
|
||||
validate that.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const isValid =
|
||||
await fulfillmentModuleService.validateFulfillmentData(
|
||||
"webshipper",
|
||||
{
|
||||
requires_drop_point: true,
|
||||
},
|
||||
{
|
||||
drop_point_id: "dp_123",
|
||||
},
|
||||
{}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"providerId","type":"`string`","description":"The fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionData","type":"`Record<string, unknown>`","description":"The fulfillment option data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The fulfillment data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context to validate the fulfillment option data in.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<Record<string, unknown>>","optional":false,"defaultValue":"","description":"Whether the fulfillment option data is valid with the specified provider.","expandable":false,"children":[{"name":"Record","type":"`Record<string, unknown>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"unknown","type":"`unknown`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
+1
@@ -76,5 +76,6 @@ The main service interface for the Fulfillment Module.
|
||||
- [cancelFulfillment](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.cancelFulfillment/page.mdx)
|
||||
- [retrieveFulfillmentOptions](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.retrieveFulfillmentOptions/page.mdx)
|
||||
- [validateFulfillmentOption](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateFulfillmentOption/page.mdx)
|
||||
- [validateFulfillmentData](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateFulfillmentData/page.mdx)
|
||||
- [validateShippingOption](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateShippingOption/page.mdx)
|
||||
- [listFulfillmentProviders](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.listFulfillmentProviders/page.mdx)
|
||||
Reference in new issue
Block a user