docs: enhance how references are generated (#5805)

* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-12-05 15:29:41 +02:00
1 parent a418e6cebc
commit 892d737c1f
4358 files changed
+947876 -534760

No files matched your search

@@ -1 +0,0 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -1,565 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AbstractBatchJobStrategy
## Implements
- [IBatchJobStrategy](../interfaces/IBatchJobStrategy.mdx)
## constructor
`Protected **new AbstractBatchJobStrategy**(__container__, __configModule__?, __moduleDeclaration__?)`
### Parameters
<ParameterTypes parameters={[
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "batchJobService_",
"type": "[BatchJobService](BatchJobService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager_",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager_",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "batchType",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "identifier",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TError",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
___
### buildTemplate
`Abstract **buildTemplate**(): Promise&#60;string&#62;`
Builds and returns a template file that can be downloaded and filled in
#### Returns
Promise&#60;string&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;string&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### handleProcessingError
`Protected **handleProcessingError**<TypeParameter T>(batchJobId, err, result): Promise&#60;void&#62;`
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "batchJobId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "err",
"type": "`unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "result",
"type": "`T`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### preProcessBatchJob
`**preProcessBatchJob**(batchJobId): Promise&#60;void&#62;`
Method for pre-processing a batch job
#### Parameters
<ParameterTypes parameters={[
{
"name": "batchJobId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### prepareBatchJobForProcessing
`**prepareBatchJobForProcessing**(batchJob, req): Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;`
Method for preparing a batch job for processing
#### Parameters
<ParameterTypes parameters={[
{
"name": "batchJob",
"type": "[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "req",
"type": "`Request`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### processJob
`Abstract **processJob**(batchJobId): Promise&#60;void&#62;`
Method does the actual processing of the job. Should report back on the progress of the operation.
#### Parameters
<ParameterTypes parameters={[
{
"name": "batchJobId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### shouldRetryOnProcessingError
`Protected **shouldRetryOnProcessingError**(batchJob, err): Promise&#60;boolean&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "batchJob",
"type": "[BatchJob](BatchJob.mdx)",
"description": "A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "err",
"type": "`unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;boolean&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;boolean&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "`Record<string, unknown>` \\| ``{ code: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
`**withTransaction**(transactionManager?): [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)
<ParameterTypes parameters={[
{
"name": "AbstractBatchJobStrategy",
"type": "[AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,342 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AbstractEventBusModuleService
## Implements
- [IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)
## constructor
`**new AbstractEventBusModuleService**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "eventToSubscribersMap_",
"type": "Map&#60;string \\| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### eventToSubscribersMap
`get**eventToSubscribersMap**(): Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;`
#### Returns
Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Map",
"type": "Map&#60;string \\| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### emit
`Abstract **emit**<TypeParameter T>(eventName, data, options): Promise&#60;void&#62;`
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`T`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Abstract **emit**<TypeParameter T>(data): Promise&#60;void&#62;`
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[EmitData](../types/EmitData.mdx)&#60;T&#62;[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### storeSubscribers
`Protected **storeSubscribers**(«destructured»): void`
#### Parameters
<ParameterTypes parameters={[
{
"name": "__namedParameters",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__namedParameters.event",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__namedParameters.subscriber",
"type": "[Subscriber](../types/Subscriber.mdx)&#60;unknown&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__namedParameters.subscriberId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### subscribe
`**subscribe**(eventName, subscriber, context?): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/Subscriber.mdx)&#60;unknown&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/SubscriberContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
<ParameterTypes parameters={[
{
"name": "AbstractEventBusModuleService",
"type": "[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### unsubscribe
`**unsubscribe**(eventName, subscriber, context): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/Subscriber.mdx)&#60;unknown&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/SubscriberContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
<ParameterTypes parameters={[
{
"name": "AbstractEventBusModuleService",
"type": "[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,507 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AbstractPaymentProcessor
Payment processor in charge of creating , managing and processing a payment
## Implements
- [PaymentProcessor](../interfaces/PaymentProcessor.mdx)
## constructor
`Protected **new AbstractPaymentProcessor**(container, config?)`
### Parameters
<ParameterTypes parameters={[
{
"name": "container",
"type": "[MedusaContainer](../types/MedusaContainer-1.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "config",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "container",
"type": "[MedusaContainer](../types/MedusaContainer-1.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "identifier",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### authorizePayment
`Abstract **authorizePayment**(paymentSessionData, context): Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| &#123; data: Record&#60;string, unknown&#62; ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;`
Authorize an existing session if it is not already authorized
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| &#123; data: Record&#60;string, unknown&#62; ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \\| &#123; data: Record&#60;string, unknown&#62; ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### cancelPayment
`Abstract **cancelPayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Cancel an existing session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### capturePayment
`Abstract **capturePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Capture an existing session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### deletePayment
`Abstract **deletePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Delete an existing session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### getIdentifier
`**getIdentifier**(): string`
Return a unique identifier to retrieve the payment plugin provider
#### Returns
`string`
<ParameterTypes parameters={[
{
"name": "string",
"type": "`string`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### getPaymentStatus
`Abstract **getPaymentStatus**(paymentSessionData): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
Return the status of the session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### initiatePayment
`Abstract **initiatePayment**(context): Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;`
Initiate a payment session with the external provider
#### Parameters
<ParameterTypes parameters={[
{
"name": "context",
"type": "[PaymentProcessorContext](../types/PaymentProcessorContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \\| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### refundPayment
`Abstract **refundPayment**(paymentSessionData, refundAmount): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Refund an existing session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refundAmount",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### retrievePayment
`Abstract **retrievePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Retrieve an existing session
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### updatePayment
`Abstract **updatePayment**(context): Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;`
Update an existing payment session
#### Parameters
<ParameterTypes parameters={[
{
"name": "context",
"type": "[PaymentProcessorContext](../types/PaymentProcessorContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \\| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### updatePaymentData
`Abstract **updatePaymentData**(sessionId, data): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Update the session data for a payment session
#### Parameters
<ParameterTypes parameters={[
{
"name": "sessionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,903 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AbstractPaymentService
This will be
## Deprecated
in the near future use the AbstractPaymentProcessor instead
## Implements
- ["medusa-interfaces"](../modules/medusa_interfaces_.mdx)
## constructor
`Protected **new AbstractPaymentService**(container, config?)`
### Parameters
<ParameterTypes parameters={[
{
"name": "container",
"type": "`unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager_",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager_",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "identifier",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TError",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
___
### authorizePayment
`Abstract **authorizePayment**(paymentSession, context): Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSession",
"type": "[PaymentSession](PaymentSession.mdx)",
"description": "A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
___
### cancelPayment
`Abstract **cancelPayment**(payment): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "payment",
"type": "[Payment](Payment.mdx)",
"description": "A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### capturePayment
`Abstract **capturePayment**(payment): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "payment",
"type": "[Payment](Payment.mdx)",
"description": "A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### createPayment
`Abstract **createPayment**(context): Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "context",
"type": "[Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)",
"description": "The type of this argument is meant to be temporary and once the previous method signature will be removed, the type will only be PaymentContext instead of Cart & PaymentContext",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Abstract **createPayment**(cart): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future use `createPayment(context: Cart & PaymentContext): Promise<PaymentSessionResponse>` instead
___
### deletePayment
`Abstract **deletePayment**(paymentSession): Promise&#60;void&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSession",
"type": "[PaymentSession](PaymentSession.mdx)",
"description": "A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### getIdentifier
`**getIdentifier**(): string`
#### Returns
`string`
<ParameterTypes parameters={[
{
"name": "string",
"type": "`string`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### getPaymentData
`Abstract **getPaymentData**(paymentSession): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSession",
"type": "[PaymentSession](PaymentSession.mdx)",
"description": "A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
___
### getStatus
`Abstract **getStatus**(data): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### refundPayment
`Abstract **refundPayment**(payment, refundAmount): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "payment",
"type": "[Payment](Payment.mdx)",
"description": "A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refundAmount",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### retrievePayment
`Abstract **retrievePayment**(paymentData): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentData",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
___
### retrieveSavedMethods
`**retrieveSavedMethods**(customer): Promise&#60;[Data](../types/Data.mdx)[]&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "customer",
"type": "[Customer](Customer.mdx)",
"description": "A customer can make purchases in your store and manage their profile.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future
___
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "`Record<string, unknown>` \\| ``{ code: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### updatePayment
`Abstract **updatePayment**(paymentSessionData, context): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)",
"description": "The type of this argument is meant to be temporary and once the previous method signature will be removed, the type will only be PaymentContext instead of Cart & PaymentContext",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;Record&#60;string, unknown&#62; \\| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "it return either a PaymentSessionResponse or PaymentSessionResponse[\"session\\_data\"] to maintain backward compatibility",
"expandable": false,
"children": []
}
]} />
`Abstract **updatePayment**(paymentSessionData, cart): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
in the near future use `updatePayment(paymentSessionData: PaymentSessionData, context: Cart & PaymentContext): Promise<PaymentSessionResponse>` instead
___
### updatePaymentData
`Abstract **updatePaymentData**(paymentSessionData, data): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "paymentSessionData",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "[Data](../types/Data.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[Data](../types/Data.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Deprecated
___
### withTransaction
`**withTransaction**(transactionManager?): [AbstractPaymentService](AbstractPaymentService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[AbstractPaymentService](AbstractPaymentService.mdx)
<ParameterTypes parameters={[
{
"name": "AbstractPaymentService",
"type": "[AbstractPaymentService](AbstractPaymentService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,474 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AbstractSearchService
## Implements
- [ISearchService](../interfaces/ISearchService.mdx)
## constructor
`Protected **new AbstractSearchService**(container, options)`
### Parameters
<ParameterTypes parameters={[
{
"name": "container",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "isDefault",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options_",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### options
`get**options**(): Record&#60;string, unknown&#62;`
#### Returns
`Record<string, unknown>`
<ParameterTypes parameters={[
{
"name": "Record",
"type": "`Record<string, unknown>`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### addDocuments
`Abstract **addDocuments**(indexName, documents, type): unknown`
Used to index documents by the search engine provider
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "documents",
"type": "`unknown`",
"description": "documents array to be indexed",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "`string`",
"description": "of documents to be added (e.g: products, regions, orders, etc)",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### createIndex
`Abstract **createIndex**(indexName, options): unknown`
Used to create an index
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`unknown`",
"description": "the options",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### deleteAllDocuments
`Abstract **deleteAllDocuments**(indexName): unknown`
Used to delete all documents
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### deleteDocument
`Abstract **deleteDocument**(indexName, document_id): unknown`
Used to delete document
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "document_id",
"type": "`string` \\| `number`",
"description": "the id of the document",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### getIndex
`Abstract **getIndex**(indexName): unknown`
Used to get an index
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### replaceDocuments
`Abstract **replaceDocuments**(indexName, documents, type): unknown`
Used to replace documents
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "documents",
"type": "`unknown`",
"description": "array of document objects that will replace existing documents",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "`string`",
"description": "type of documents to be replaced (e.g: products, regions, orders, etc)",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### search
`Abstract **search**(indexName, query, options): unknown`
Used to search for a document in an index
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "query",
"type": "`null` \\| `string`",
"description": "the search query",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`unknown`",
"description": "any options passed to the request object other than the query and indexName - additionalOptions contain any provider specific options",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
___
### updateSettings
`Abstract **updateSettings**(indexName, settings): unknown`
Used to update the settings of an index
#### Parameters
<ParameterTypes parameters={[
{
"name": "indexName",
"type": "`string`",
"description": "the index name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "settings",
"type": "`unknown`",
"description": "settings object",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`unknown`
<ParameterTypes parameters={[
{
"name": "unknown",
"type": "`unknown`",
"optional": true,
"defaultValue": "",
"description": "returns response from search engine provider",
"expandable": false,
"children": []
}
]} />
@@ -1,208 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Address
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
## constructor
`**new Address**()`
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
___
## Properties
<ParameterTypes parameters={[
{
"name": "address_1",
"type": "`null` \\| `string`",
"description": "Address line 1",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "address_2",
"type": "`null` \\| `string`",
"description": "Address line 2",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "city",
"type": "`null` \\| `string`",
"description": "City",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "company",
"type": "`null` \\| `string`",
"description": "Company name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "country",
"type": "`null` \\| [Country](Country.mdx)",
"description": "A country object.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "country_code",
"type": "`null` \\| `string`",
"description": "The 2 character ISO code of the country in lower case",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer",
"type": "`null` \\| [Customer](Customer.mdx)",
"description": "Available if the relation `customer` is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_id",
"type": "`null` \\| `string`",
"description": "ID of the customer this address belongs to",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "first_name",
"type": "`null` \\| `string`",
"description": "First name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "ID of the address",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "last_name",
"type": "`null` \\| `string`",
"description": "Last name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "phone",
"type": "`null` \\| `string`",
"description": "Phone Number",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "postal_code",
"type": "`null` \\| `string`",
"description": "Postal Code",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "province",
"type": "`null` \\| `string`",
"description": "Province",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,121 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AddressCreatePayload
Address fields used when creating an address.
## constructor
`**new AddressCreatePayload**()`
Address fields used when creating an address.
___
## Properties
<ParameterTypes parameters={[
{
"name": "address_1",
"type": "`string`",
"description": "Address line 1",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "address_2",
"type": "`string`",
"description": "Address line 2",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "city",
"type": "`string`",
"description": "City",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "company",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "country_code",
"type": "`string`",
"description": "The 2 character ISO code of the country in lower case",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "first_name",
"type": "`string`",
"description": "First name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "last_name",
"type": "`string`",
"description": "Last name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`object`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "phone",
"type": "`string`",
"description": "Phone Number",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "postal_code",
"type": "`string`",
"description": "Postal Code",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "province",
"type": "`string`",
"description": "Province",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,121 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AddressPayload
Address fields used when creating/updating an address.
## constructor
`**new AddressPayload**()`
Address fields used when creating/updating an address.
___
## Properties
<ParameterTypes parameters={[
{
"name": "address_1",
"type": "`string`",
"description": "Address line 1",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "address_2",
"type": "`string`",
"description": "Address line 2",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "city",
"type": "`string`",
"description": "City",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "company",
"type": "`string`",
"description": "Company",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "country_code",
"type": "`string`",
"description": "The 2 character ISO code of the country in lower case",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "first_name",
"type": "`string`",
"description": "First name",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "last_name",
"type": "`string`",
"description": "Last name",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "phone",
"type": "`string`",
"description": "Phone Number",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "postal_code",
"type": "`string`",
"description": "Postal Code",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "province",
"type": "`string`",
"description": "Province",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,38 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AdminGetDiscountsDiscountRuleParams
Filters to apply on discounts' rules.
## constructor
`**new AdminGetDiscountsDiscountRuleParams**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "allocation",
"type": "[AllocationType](../enums/AllocationType.mdx)",
"description": "Allocation to filter discount rules by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[DiscountRuleType](../enums/DiscountRuleType.mdx)",
"description": "Type to filter discount rules by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,72 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AdminPriceListPricesCreateReq
## constructor
`**new AdminPriceListPricesCreateReq**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "max_quantity",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "min_quantity",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,81 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AdminPriceListPricesUpdateReq
## constructor
`**new AdminPriceListPricesUpdateReq**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "max_quantity",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "min_quantity",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,107 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AnalyticsConfig
Base abstract entity for all entities
## constructor
`**new AnalyticsConfig**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "anonymize",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "opt_out",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "user_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,47 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# BaseEntity
Base abstract entity for all entities
## constructor
`**new BaseEntity**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,245 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# BatchJob
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
## constructor
`**new BatchJob**()`
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
___
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date of the concellation.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "completed_at",
"type": "`Date`",
"description": "The date of the completion.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "confirmed_at",
"type": "`Date`",
"description": "The date when the confirmation has been done.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "`Record<string, unknown>`",
"description": "The context of the batch job, the type of the batch job determines what the context should contain.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`null` \\| `string`",
"description": "The unique identifier of the user that created the batch job.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by_user",
"type": "[User](User.mdx)",
"description": "The details of the user that created the batch job.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "dry_run",
"type": "`boolean`",
"description": "Specify if the job must apply the modifications or not.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "failed_at",
"type": "`Date`",
"description": "The date when the job failed.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The unique identifier for the batch job.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "pre_processed_at",
"type": "`Date`",
"description": "The date from which the job has been pre-processed.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "processing_at",
"type": "`Date`",
"description": "The date the job is processing at.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "result",
"type": "``{ advancement_count?: number ; count?: number ; errors?: (string \\| [BatchJobResultError](../types/BatchJobResultError.mdx))[] ; file_key?: string ; file_size?: number ; progress?: number ; stat_descriptors?: [BatchJobResultStatDescriptor](../types/BatchJobResultStatDescriptor.mdx)[] }`` & `Record<string, unknown>`",
"description": "The result of the batch job.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[BatchJobStatus](../enums/BatchJobStatus.mdx)",
"description": "The status of the batch job.",
"optional": false,
"defaultValue": "created",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "`string`",
"description": "The type of batch job.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was last updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### loadStatus
`**loadStatus**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### toJSON
`**toJSON**(): [BatchJob](BatchJob.mdx)`
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
#### Returns
[BatchJob](BatchJob.mdx)
<ParameterTypes parameters={[
{
"name": "BatchJob",
"type": "[BatchJob](BatchJob.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,446 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Cart
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
## constructor
`**new Cart**()`
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
___
## Properties
<ParameterTypes parameters={[
{
"name": "billing_address",
"type": "[Address](Address.mdx)",
"description": "The details of the billing address associated with the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "billing_address_id",
"type": "`string`",
"description": "The billing address's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "completed_at",
"type": "`Date`",
"description": "The date with timezone at which the cart was completed.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "`Record<string, unknown>`",
"description": "The context of the cart which can include info like IP or user agent.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer",
"type": "[Customer](Customer.mdx)",
"description": "The details of the customer the cart belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "customer_id",
"type": "`string`",
"description": "The customer's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_total",
"type": "`number`",
"description": "The total of discount rounded",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discounts",
"type": "[Discount](Discount.mdx)[]",
"description": "An array of details of all discounts applied to the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "email",
"type": "`string`",
"description": "The email associated with the cart",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_tax_total",
"type": "`number`",
"description": "The total of gift cards with taxes",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_total",
"type": "`number`",
"description": "The total of gift cards",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_cards",
"type": "[GiftCard](GiftCard.mdx)[]",
"description": "An array of details of all gift cards applied to the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The cart's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of a cart in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item_tax_total",
"type": "`null` \\| `number`",
"description": "The total of items with taxes",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The line items added to the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "object",
"type": "`\"cart\"`",
"description": "",
"optional": false,
"defaultValue": "\"cart\"",
"expandable": false,
"children": []
},
{
"name": "payment",
"type": "[Payment](Payment.mdx)",
"description": "The details of the payment associated with the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payment_authorized_at",
"type": "`Date`",
"description": "The date with timezone at which the payment was authorized.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_id",
"type": "`string`",
"description": "The payment's ID if available",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_session",
"type": "`null` \\| [PaymentSession](PaymentSession.mdx)",
"description": "The details of the selected payment session in the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payment_sessions",
"type": "[PaymentSession](PaymentSession.mdx)[]",
"description": "The details of all payment sessions created on the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "raw_discount_total",
"type": "`number`",
"description": "The total of discount",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refundable_amount",
"type": "`number`",
"description": "The amount that can be refunded",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refunded_total",
"type": "`number`",
"description": "The total amount refunded if the order associated with this cart is returned.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region associated with the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The region's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sales_channel",
"type": "[SalesChannel](SalesChannel.mdx)",
"description": "The details of the sales channel associated with the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "sales_channel_id",
"type": "`null` \\| `string`",
"description": "The sales channel ID the cart is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_address",
"type": "`null` \\| [Address](Address.mdx)",
"description": "The details of the shipping address associated with the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_address_id",
"type": "`string`",
"description": "The shipping address's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_methods",
"type": "[ShippingMethod](ShippingMethod.mdx)[]",
"description": "The details of the shipping methods added to the cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_tax_total",
"type": "`null` \\| `number`",
"description": "The total of shipping with taxes",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_total",
"type": "`number`",
"description": "The total of shipping",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`number`",
"description": "The subtotal of the cart",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_total",
"type": "`null` \\| `number`",
"description": "The total of tax",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`number`",
"description": "The total amount of the cart",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[CartType](../enums/CartType.mdx)",
"description": "The cart's type.",
"optional": false,
"defaultValue": "default",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### afterLoad
`Private **afterLoad**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,118 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimImage
The details of an image attached to a claim.
## constructor
`**new ClaimImage**()`
The details of an image attached to a claim.
___
## Properties
<ParameterTypes parameters={[
{
"name": "claim_item",
"type": "[ClaimItem](ClaimItem.mdx)",
"description": "The details of the claim item this image is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_item_id",
"type": "`string`",
"description": "The ID of the claim item associated with the image",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The claim image's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "The URL of the image",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,190 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimItem
A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded.
## constructor
`**new ClaimItem**()`
A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded.
___
## Properties
<ParameterTypes parameters={[
{
"name": "claim_order",
"type": "[ClaimOrder](ClaimOrder.mdx)",
"description": "The details of the claim this item belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_order_id",
"type": "`string`",
"description": "The ID of the claim this item is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The claim item's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[ClaimImage](ClaimImage.mdx)[]",
"description": "The claim images that are attached to the claim item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the line item in the original order that this claim item refers to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item_id",
"type": "`string`",
"description": "The ID of the line item that the claim item refers to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "note",
"type": "`string`",
"description": "An optional note about the claim, for additional information",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "quantity",
"type": "`number`",
"description": "The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reason",
"type": "[ClaimReason](../enums/ClaimReason.mdx)",
"description": "The reason for the claim",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ClaimTag](ClaimTag.mdx)[]",
"description": "User defined tags for easy filtering and grouping.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariant](ProductVariant.mdx)",
"description": "The details of the product variant to potentially replace the item in the original order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "The ID of the product variant that is claimed.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,235 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimOrder
A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment.
## constructor
`**new ClaimOrder**()`
A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment.
___
## Properties
<ParameterTypes parameters={[
{
"name": "additional_items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The details of the new items to be shipped when the claim's type is `replace`",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date with timezone at which the claim was canceled.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "claim_items",
"type": "[ClaimItem](ClaimItem.mdx)[]",
"description": "The details of the items that should be replaced or refunded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "fulfillment_status",
"type": "[ClaimFulfillmentStatus](../enums/ClaimFulfillmentStatus.mdx)",
"description": "The claim's fulfillment status",
"optional": false,
"defaultValue": "not_fulfilled",
"expandable": false,
"children": []
},
{
"name": "fulfillments",
"type": "[Fulfillment](Fulfillment.mdx)[]",
"description": "The fulfillments of the new items to be shipped",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The claim's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of the cart associated with the claim in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification",
"type": "`boolean`",
"description": "Flag for describing whether or not notifications related to this should be send.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that this claim was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the claim comes from.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_status",
"type": "[ClaimPaymentStatus](../enums/ClaimPaymentStatus.mdx)",
"description": "The status of the claim's payment",
"optional": false,
"defaultValue": "na",
"expandable": false,
"children": []
},
{
"name": "refund_amount",
"type": "`number`",
"description": "The amount that will be refunded in conjunction with the claim",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_order",
"type": "[Return](Return.mdx)",
"description": "The details of the return associated with the claim if the claim's type is `replace`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_address",
"type": "[Address](Address.mdx)",
"description": "The details of the address that new items should be shipped to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_address_id",
"type": "`string`",
"description": "The ID of the address that the new items should be shipped to",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_methods",
"type": "[ShippingMethod](ShippingMethod.mdx)[]",
"description": "The details of the shipping methods that the claim order will be shipped with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "type",
"type": "[ClaimType](../enums/ClaimType.mdx)",
"description": "The claim's type",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,100 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimTag
Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.
## constructor
`**new ClaimTag**()`
Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The claim tag's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value that the claim tag holds",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,94 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Country
Country details
## constructor
`**new Country**()`
Country details
___
## Properties
<ParameterTypes parameters={[
{
"name": "display_name",
"type": "`string`",
"description": "The country name appropriate for display.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`number`",
"description": "The country's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "iso_2",
"type": "`string`",
"description": "The 2 character ISO code of the country in lower case",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "iso_3",
"type": "`string`",
"description": "The 2 character ISO code of the country in lower case",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The normalized country name in upper case.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "num_code",
"type": "`number`",
"description": "The numerical ISO code for the country.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region the country is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`null` \\| `string`",
"description": "The region ID this country is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,68 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Currency
Currency
## constructor
`**new Currency**()`
Currency
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`string`",
"description": "The 3 character ISO code for the currency.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Whether the currency prices include tax",
"optional": true,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The written name of the currency",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "symbol",
"type": "`string`",
"description": "The symbol used to indicate the currency.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "symbol_native",
"type": "`string`",
"description": "The native symbol used to indicate the currency.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,136 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomShippingOption
Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option.
## constructor
`**new CustomShippingOption**()`
Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option.
___
## Properties
<ParameterTypes parameters={[
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart this shipping option belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the Cart that the custom shipping option is attached to",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The custom shipping option's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price",
"type": "`number`",
"description": "The custom price set that will override the shipping option's original price",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_option",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "The details of the overridden shipping options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_option_id",
"type": "`string`",
"description": "The ID of the Shipping Option that the custom shipping option overrides",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,190 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Customer
A customer can make purchases in your store and manage their profile.
## constructor
`**new Customer**()`
A customer can make purchases in your store and manage their profile.
___
## Properties
<ParameterTypes parameters={[
{
"name": "billing_address",
"type": "[Address](Address.mdx)",
"description": "The details of the billing address associated with the customer.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "billing_address_id",
"type": "`null` \\| `string`",
"description": "The customer's billing address ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "email",
"type": "`string`",
"description": "The customer's email",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "first_name",
"type": "`string`",
"description": "The customer's first name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "groups",
"type": "[CustomerGroup](CustomerGroup.mdx)[]",
"description": "The customer groups the customer belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "has_account",
"type": "`boolean`",
"description": "Whether the customer has an account or not",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The customer's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "last_name",
"type": "`string`",
"description": "The customer's last name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "orders",
"type": "[Order](Order.mdx)[]",
"description": "The details of the orders this customer placed.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "password_hash",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "phone",
"type": "`string`",
"description": "The customer's phone number",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_addresses",
"type": "[Address](Address.mdx)[]",
"description": "The details of the shipping addresses associated with the customer.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,118 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomerGroup
A customer group that can be used to organize customers into groups of similar traits.
## constructor
`**new CustomerGroup**()`
A customer group that can be used to organize customers into groups of similar traits.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customers",
"type": "[Customer](Customer.mdx)[]",
"description": "The details of the customers that belong to the customer group.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The customer group's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the customer group",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price_lists",
"type": "[PriceList](PriceList.mdx)[]",
"description": "The price lists that are associated with the customer group.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,36 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomerGroupUpdate
## constructor
`**new CustomerGroupUpdate**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,56 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DateComparisonOperator
Fields used to apply flexible filters on dates.
## constructor
`**new DateComparisonOperator**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "gt",
"type": "`Date`",
"description": "The filtered date must be greater than this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gte",
"type": "`Date`",
"description": "The filtered date must be greater than or equal to this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "lt",
"type": "`Date`",
"description": "The filtered date must be less than this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "lte",
"type": "`Date`",
"description": "The filtered date must be less than or equal to this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,31 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Discount
A discount can be applied to a cart for promotional purposes.
## constructor
`**new Discount**()`
A discount can be applied to a cart for promotional purposes.
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`string`",
"description": "A unique code for the discount - this will be used by the customer to apply the discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,208 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Discount
A discount can be applied to a cart for promotional purposes.
## constructor
`**new Discount**()`
A discount can be applied to a cart for promotional purposes.
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`string`",
"description": "A unique code for the discount - this will be used by the customer to apply the discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ends_at",
"type": "`null` \\| `Date`",
"description": "The time at which the discount can no longer be used.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The discount's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_disabled",
"type": "`boolean`",
"description": "Whether the Discount has been disabled. Disabled discounts cannot be applied to carts",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_dynamic",
"type": "`boolean`",
"description": "A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_discount",
"type": "[Discount](Discount.mdx)",
"description": "The details of the parent discount that this discount was created from.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "parent_discount_id",
"type": "`string`",
"description": "The Discount that the discount was created from. This will always be a dynamic discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "regions",
"type": "[Region](Region.mdx)[]",
"description": "The details of the regions in which the Discount can be used.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rule",
"type": "[DiscountRule](DiscountRule.mdx)",
"description": "The details of the discount rule that defines how the discount will be applied to a cart..",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rule_id",
"type": "`string`",
"description": "The ID of the discount rule that defines how the discount will be applied to a cart.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "starts_at",
"type": "`Date`",
"description": "The time at which the discount can be used.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "usage_count",
"type": "`number`",
"description": "The number of times a discount has been used.",
"optional": false,
"defaultValue": "0",
"expandable": false,
"children": []
},
{
"name": "usage_limit",
"type": "`null` \\| `number`",
"description": "The maximum number of times that a discount can be used.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "valid_duration",
"type": "`null` \\| `string`",
"description": "Duration the discount runs between",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### upperCaseCodeAndTrim
`Private **upperCaseCodeAndTrim**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,172 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountCondition
Holds rule conditions for when a discount is applicable
## constructor
`**new DiscountCondition**()`
Holds rule conditions for when a discount is applicable
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_groups",
"type": "[CustomerGroup](CustomerGroup.mdx)[]",
"description": "Customer groups associated with this condition if `type` is `customer\\_groups`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_rule",
"type": "[DiscountRule](DiscountRule.mdx)",
"description": "The details of the discount rule associated with the condition.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "discount_rule_id",
"type": "`string`",
"description": "The ID of the discount rule associated with the condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The discount condition's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "operator",
"type": "[DiscountConditionOperator](../enums/DiscountConditionOperator.mdx)",
"description": "The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_collections",
"type": "[ProductCollection](ProductCollection.mdx)[]",
"description": "Product collections associated with this condition if `type` is `product\\_collections`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_tags",
"type": "[ProductTag](ProductTag.mdx)[]",
"description": "Product tags associated with this condition if `type` is `product\\_tags`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_types",
"type": "[ProductType](ProductType.mdx)[]",
"description": "Product types associated with this condition if `type` is `product\\_types`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "products",
"type": "[Product](Product.mdx)[]",
"description": "products associated with this condition if `type` is `products`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "type",
"type": "[DiscountConditionType](../enums/DiscountConditionType.mdx)",
"description": "The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionCustomerGroup
Associates a discount condition with a customer group
## constructor
`**new DiscountConditionCustomerGroup**()`
Associates a discount condition with a customer group
___
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_group",
"type": "[CustomerGroup](CustomerGroup.mdx)",
"description": "Available if the relation `customer\\_group` is expanded.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_group_id",
"type": "`string`",
"description": "The ID of the Product Tag",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](DiscountCondition.mdx)",
"description": "Available if the relation `discount\\_condition` is expanded.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionProduct
This represents the association between a discount condition and a product
## constructor
`**new DiscountConditionProduct**()`
This represents the association between a discount condition and a product
___
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](DiscountCondition.mdx)",
"description": "The details of the discount condition.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[Product](Product.mdx)",
"description": "The details of the product.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the Product Tag",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionProductCollection
This represents the association between a discount condition and a product collection
## constructor
`**new DiscountConditionProductCollection**()`
This represents the association between a discount condition and a product collection
___
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](DiscountCondition.mdx)",
"description": "The details of the discount condition.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_collection",
"type": "[ProductCollection](ProductCollection.mdx)",
"description": "The details of the product collection.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_collection_id",
"type": "`string`",
"description": "The ID of the Product Collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionProductTag
This represents the association between a discount condition and a product tag
## constructor
`**new DiscountConditionProductTag**()`
This represents the association between a discount condition and a product tag
___
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](DiscountCondition.mdx)",
"description": "The details of the discount condition.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_tag",
"type": "[ProductTag](ProductTag.mdx)",
"description": "The details of the product tag.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_tag_id",
"type": "`string`",
"description": "The ID of the Product Tag",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionProductType
This represents the association between a discount condition and a product type
## constructor
`**new DiscountConditionProductType**()`
This represents the association between a discount condition and a product type
___
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](DiscountCondition.mdx)",
"description": "The details of the discount condition.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_type",
"type": "[ProductType](ProductType.mdx)",
"description": "The details of the product type.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_type_id",
"type": "`string`",
"description": "The ID of the Product Tag",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,476 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionService
Provides layer to manipulate discount conditions.
## Implements
## constructor
`**new DiscountConditionService**(«destructured»)`
### Parameters
<ParameterTypes parameters={[
{
"name": "__namedParameters",
"type": "[InjectedDependencies](../types/InjectedDependencies-8.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountConditionRepository_",
"type": "Repository&#60;[DiscountCondition](DiscountCondition.mdx)&#62; & ``{ addConditionResources: Method addConditionResources ; canApplyForCustomer: Method canApplyForCustomer ; findOneWithDiscount: Method findOneWithDiscount ; getJoinTableResourceIdentifiers: Method getJoinTableResourceIdentifiers ; isValidForProduct: Method isValidForProduct ; queryConditionTable: Method queryConditionTable ; removeConditionResources: Method removeConditionResources }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "eventBus_",
"type": "[EventBusService](EventBusService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager_",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager_",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TError",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
___
### delete
`**delete**(discountConditionId): Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discountConditionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void \\| [DiscountCondition](DiscountCondition.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### removeResources
`**removeResources**(data): Promise&#60;void&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[Omit](../types/Omit.mdx)&#60;[DiscountConditionInput](../types/DiscountConditionInput.mdx), \"id\"&#62; & ``{ id: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### retrieve
`**retrieve**(conditionId, config?): Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "conditionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[DiscountCondition](DiscountCondition.mdx)&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "`Record<string, unknown>` \\| ``{ code: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### upsertCondition
`**upsertCondition**(data, overrideExisting?): Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[DiscountConditionInput](../types/DiscountConditionInput.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "overrideExisting",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \\| [DiscountConditionProductType](DiscountConditionProductType.mdx) \\| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \\| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \\| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
`**withTransaction**(transactionManager?): [DiscountConditionService](DiscountConditionService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[DiscountConditionService](DiscountConditionService.mdx)
<ParameterTypes parameters={[
{
"name": "DiscountConditionService",
"type": "[DiscountConditionService](DiscountConditionService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### resolveConditionType\_
`Static Protected **resolveConditionType_**(data): undefined \| &#123; resource_ids: (string \| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) &#125;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[DiscountConditionInput](../types/DiscountConditionInput.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`undefined` \| ``{ resource_ids: (string \| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }``
<ParameterTypes parameters={[
{
"name": "undefined \\| &#123; resource_ids: (string \\| &#123; id: string &#125;)[] ; type: DiscountConditionType &#125;",
"type": "`undefined` \\| ``{ resource_ids: (string \\| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }``",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,136 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountRule
A discount rule defines how a Discount is calculated when applied to a Cart.
## constructor
`**new DiscountRule**()`
A discount rule defines how a Discount is calculated when applied to a Cart.
___
## Properties
<ParameterTypes parameters={[
{
"name": "allocation",
"type": "[AllocationType](../enums/AllocationType.mdx)",
"description": "The scope that the discount should apply to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "conditions",
"type": "[DiscountCondition](DiscountCondition.mdx)[]",
"description": "The details of the discount conditions associated with the rule. They can be used to limit when the discount can be used.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "A short description of the discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The discount rule's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[DiscountRuleType](../enums/DiscountRuleType.mdx)",
"description": "The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free\\_shipping` for shipping vouchers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`number`",
"description": "The value that the discount represents; this will depend on the type of the discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,172 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DraftOrder
A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order.
## constructor
`**new DraftOrder**()`
A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date the draft order was canceled at.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart associated with the draft order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart associated with the draft order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "completed_at",
"type": "`Date`",
"description": "The date the draft order was completed at.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "display_id",
"type": "`number`",
"description": "The draft order's display ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The draft order's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification_order",
"type": "`boolean`",
"description": "Whether to send the customer notifications regarding order updates.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order created from the draft order when its payment is captured.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order created from the draft order when its payment is captured.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[DraftOrderStatus](../enums/DraftOrderStatus.mdx)",
"description": "The status of the draft order. It's changed to `completed` when it's transformed to an order.",
"optional": false,
"defaultValue": "open",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): Promise&#60;void&#62;`
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,72 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableBatchJobProps
## constructor
`**new FilterableBatchJobProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[BatchJobStatus](../enums/BatchJobStatus.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "`string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,45 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableCartProps
## constructor
`**new FilterableCartProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,63 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableDiscountProps
## constructor
`**new FilterableDiscountProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_disabled",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_dynamic",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "q",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rule",
"type": "[AdminGetDiscountsDiscountRuleParams](AdminGetDiscountsDiscountRuleParams.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,72 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableLineItemAdjustmentProps
## constructor
`**new FilterableLineItemAdjustmentProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item_id",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "resource_id",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,110 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterablePriceListProps
Filters to apply on the retrieved price lists.
## constructor
`**new FilterablePriceListProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the price lists' `created_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_groups",
"type": "`string`[]",
"description": "Filter price lists by their associated customer groups.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the price lists' `deleted_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "Description to filter price lists by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "IDs to filter price lists by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "Name to filter price lists by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "q",
"type": "`string`",
"description": "Search terms to search price lists' description, name, and customer group's name.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[PriceListStatus](../enums/PriceListStatus-1.mdx)[]",
"description": "Statuses to filter price lists by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[PriceListType](../enums/PriceListType-1.mdx)[]",
"description": "Types to filter price lists by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the price lists' `updated_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,183 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableProductProps
Filters to apply on retrieved products.
## constructor
`**new FilterableProductProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "category_id",
"type": "`string`[]",
"description": "Filter products by their associated product category's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "collection_id",
"type": "`string`[]",
"description": "Filter products by their associated product collection's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the products' `created_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the products' `deleted_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "Description to filter products by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition_id",
"type": "`string`",
"description": "Filter products by their associated discount condition's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "Handle to filter products by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[]",
"description": "IDs to filter products by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "include_category_children",
"type": "`boolean`",
"description": "Whether to include product category children in the response.",
"optional": true,
"defaultValue": "",
"expandable": false,
"featureFlag": "product_categories",
"children": []
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Filter products by whether they're gift cards.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price_list_id",
"type": "`string`[]",
"description": "Filter products by their associated price lists' ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "q",
"type": "`string`",
"description": "Search term to search products' title, description, variants' title and sku, and collections' title.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sales_channel_id",
"type": "`string`[]",
"description": "Filter products by their associated sales channels' ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/ProductStatus.mdx)[]",
"description": "Statuses to filter products by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "`string`[]",
"description": "Filter products by their associated tags' value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "Title to filter products by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type_id",
"type": "`string`[]",
"description": "Filter products by their associated product type's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "Date filters to apply on the products' `updated_at` date.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,207 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableProductVariantProps
## constructor
`**new FilterableProductVariantProps**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "origin_country",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "q",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string` \\| `string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "[DateComparisonOperator](DateComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,164 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FlagRouter
## Implements
- [IFlagRouter](../interfaces/IFlagRouter.mdx)
## constructor
`**new FlagRouter**(flags)`
### Parameters
<ParameterTypes parameters={[
{
"name": "flags",
"type": "`Record<string, boolean \\| Record&#60;string, boolean&#62;>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "flags",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### isFeatureEnabled
`**isFeatureEnabled**(flag): boolean`
Check if a feature flag is enabled.
There are two ways of using this method:
1. `isFeatureEnabled("myFeatureFlag")`
2. `isFeatureEnabled({ myNestedFeatureFlag: "someNestedFlag" })`
We use 1. for top-level feature flags and 2. for nested feature flags. Almost all flags are top-level.
An example of a nested flag is workflows. To use it, you would do:
`isFeatureEnabled({ workflows: Workflows.CreateCart })`
#### Parameters
<ParameterTypes parameters={[
{
"name": "flag",
"type": "`string` \\| `Record<string, string>`",
"description": "The flag to check",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "- Whether the flag is enabled or not",
"expandable": false,
"children": []
}
]} />
___
### listFlags
`**listFlags**(): [FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx)`
#### Returns
[FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx)
<ParameterTypes parameters={[
{
"name": "FeatureFlagsResponse",
"type": "``{ key: string ; value: boolean \\| Record&#60;string, boolean&#62; }``[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
### setFlag
`**setFlag**(key, value): void`
Sets a feature flag.
Flags take two shapes:
`setFlag("myFeatureFlag", true)`
`setFlag("myFeatureFlag", { nestedFlag: true })`
These shapes are used for top-level and nested flags respectively, as explained in isFeatureEnabled.
#### Parameters
<ParameterTypes parameters={[
{
"name": "key",
"type": "`string`",
"description": "The key of the flag to set.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`boolean` \\| ``{ [key: string]: boolean; }``",
"description": "The value of the flag to set.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "- void",
"expandable": false,
"children": []
}
]} />
@@ -1,235 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Fulfillment
A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.
## constructor
`**new Fulfillment**()`
A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.
___
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date with timezone at which the Fulfillment was canceled.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "claim_order",
"type": "[ClaimOrder](ClaimOrder.mdx)",
"description": "The details of the claim that the fulfillment may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_order_id",
"type": "`string`",
"description": "The ID of the Claim that the Fulfillment belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "This contains all the data necessary for the Fulfillment provider to handle the fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The fulfillment's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of the fulfillment in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[FulfillmentItem](FulfillmentItem.mdx)[]",
"description": "The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "location_id",
"type": "`null` \\| `string`",
"description": "The ID of the stock location the fulfillment will be shipped from",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification",
"type": "`boolean`",
"description": "Flag for describing whether or not notifications related to this should be sent.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the fulfillment may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the Order that the Fulfillment belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "provider",
"type": "[FulfillmentProvider](FulfillmentProvider.mdx)",
"description": "The details of the fulfillment provider responsible for handling the fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "provider_id",
"type": "`string`",
"description": "The ID of the Fulfillment Provider responsible for handling the fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipped_at",
"type": "`Date`",
"description": "The date with timezone at which the Fulfillment was shipped.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "swap",
"type": "[Swap](Swap.mdx)",
"description": "The details of the swap that the fulfillment may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "swap_id",
"type": "`string`",
"description": "The ID of the Swap that the Fulfillment belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tracking_links",
"type": "[TrackingLink](TrackingLink.mdx)[]",
"description": "The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tracking_numbers",
"type": "`string`[]",
"description": "The tracking numbers that can be used to track the status of the fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,67 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FulfillmentItem
This represents the association between a Line Item and a Fulfillment.
## constructor
`**new FulfillmentItem**()`
This represents the association between a Line Item and a Fulfillment.
___
## Properties
<ParameterTypes parameters={[
{
"name": "fulfillment",
"type": "[Fulfillment](Fulfillment.mdx)",
"description": "The details of the fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "fulfillment_id",
"type": "`string`",
"description": "The ID of the Fulfillment that the Fulfillment Item belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the line item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item_id",
"type": "`string`",
"description": "The ID of the Line Item that the Fulfillment Item references.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "quantity",
"type": "`number`",
"description": "The quantity of the Line Item that is included in the Fulfillment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,40 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FulfillmentProvider
A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status.
## constructor
`**new FulfillmentProvider**()`
A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status.
___
## Properties
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the fulfillment provider as given by the fulfillment service.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "Whether the fulfillment service is installed in the current version. If a fulfillment service is no longer installed, the `is\\_installed` attribute is set to `false`.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
}
]} />
@@ -1,31 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# GiftCard
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
## constructor
`**new GiftCard**()`
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`string`",
"description": "The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,181 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# GiftCard
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
## constructor
`**new GiftCard**()`
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "balance",
"type": "`number`",
"description": "The remaining value on the Gift Card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "code",
"type": "`string`",
"description": "The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ends_at",
"type": "`Date`",
"description": "The time at which the Gift Card can no longer be used.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The gift card's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_disabled",
"type": "`boolean`",
"description": "Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the gift card was purchased in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the gift card was purchased in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region this gift card is available in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The ID of the region this gift card is available in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "`null` \\| `number`",
"description": "The gift card's tax rate that will be applied on calculating totals",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`number`",
"description": "The value that the Gift Card represents.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# GiftCardTransaction
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
## constructor
`**new GiftCardTransaction**()`
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount that was used from the Gift Card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card",
"type": "[GiftCard](GiftCard.mdx)",
"description": "The details of the gift card associated used in this transaction.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "gift_card_id",
"type": "`string`",
"description": "The ID of the Gift Card that was used in the transaction.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The gift card transaction's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_taxable",
"type": "`boolean`",
"description": "Whether the transaction is taxable or not.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the gift card was used for payment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the gift card was used for payment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "`null` \\| `number`",
"description": "The tax rate of the transaction",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,136 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IdempotencyKey
Idempotency Key is used to continue a process in case of any failure that might occur.
## constructor
`**new IdempotencyKey**()`
Idempotency Key is used to continue a process in case of any failure that might occur.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "Date which the idempotency key was locked.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The idempotency key's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "The unique randomly generated key used to determine the state of a process.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "locked_at",
"type": "`Date`",
"description": "Date which the idempotency key was locked.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "recovery_point",
"type": "`string`",
"description": "Where to continue from.",
"optional": false,
"defaultValue": "started",
"expandable": false,
"children": []
},
{
"name": "request_method",
"type": "`string`",
"description": "The method of the request",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "request_params",
"type": "`Record<string, unknown>`",
"description": "The parameters passed to the request",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "request_path",
"type": "`string`",
"description": "The request's path",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "response_body",
"type": "`Record<string, unknown>`",
"description": "The response's body",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "response_code",
"type": "`number`",
"description": "The response's code.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,100 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Image
An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service.
## constructor
`**new Image**()`
An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The image's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "The URL at which the image file can be found.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,478 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# LineItem
Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.
## constructor
`**new LineItem**()`
Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.
___
## Properties
<ParameterTypes parameters={[
{
"name": "adjustments",
"type": "[LineItemAdjustment](LineItemAdjustment.mdx)[]",
"description": "The details of the item's adjustments, which are available when a discount is applied on the item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "allow_discounts",
"type": "`boolean`",
"description": "Flag to indicate if the Line Item should be included when doing discount calculations.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart that the line item may belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart that the line item may belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "claim_order",
"type": "[ClaimOrder](ClaimOrder.mdx)",
"description": "The details of the claim that the line item may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_order_id",
"type": "`string`",
"description": "The ID of the claim that the line item may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "A more detailed description of the contents of the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_total",
"type": "`null` \\| `number`",
"description": "The total of discount of the line item rounded",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "fulfilled_quantity",
"type": "`null` \\| `number`",
"description": "The quantity of the Line Item that has been fulfilled.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_total",
"type": "`null` \\| `number`",
"description": "The total of the gift card of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "has_shipping",
"type": "`null` \\| `boolean`",
"description": "Flag to indicate if the Line Item has fulfillment associated with it.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The line item's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Indicates if the line item unit\\_price include tax",
"optional": false,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Flag to indicate if the Line Item is a Gift Card.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "is_return",
"type": "`boolean`",
"description": "Is the item being returned",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the line item may belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_edit",
"type": "`null` \\| [OrderEdit](OrderEdit.mdx)",
"description": "The details of the order edit.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_edit_id",
"type": "`null` \\| `string`",
"description": "The ID of the order edit that the item may belong to.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order_id",
"type": "`null` \\| `string`",
"description": "The ID of the order that the line item may belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "original_item_id",
"type": "`null` \\| `string`",
"description": "The ID of the original line item. This is useful if the line item belongs to a resource that references an order, such as a return or an order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "original_tax_total",
"type": "`null` \\| `number`",
"description": "The original tax total amount of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "original_total",
"type": "`null` \\| `number`",
"description": "The original total amount of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`null` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "quantity",
"type": "`number`",
"description": "The quantity of the content in the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "raw_discount_total",
"type": "`null` \\| `number`",
"description": "The total of discount of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refundable",
"type": "`null` \\| `number`",
"description": "The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "returned_quantity",
"type": "`null` \\| `number`",
"description": "The quantity of the Line Item that has been returned.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipped_quantity",
"type": "`null` \\| `number`",
"description": "The quantity of the Line Item that has been shipped.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "should_merge",
"type": "`boolean`",
"description": "Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`null` \\| `number`",
"description": "The subtotal of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "swap",
"type": "[Swap](Swap.mdx)",
"description": "The details of the swap that the line item may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "swap_id",
"type": "`string`",
"description": "The ID of the swap that the line item may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_lines",
"type": "[LineItemTaxLine](LineItemTaxLine.mdx)[]",
"description": "The details of the item's tax lines.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tax_total",
"type": "`null` \\| `number`",
"description": "The total of tax of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "A URL string to a small image of the contents of the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`null` \\| `number`",
"description": "The total amount of the line item",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "unit_price",
"type": "`number`",
"description": "The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariant](ProductVariant.mdx)",
"description": "The details of the product variant that this item was created from.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "variant_id",
"type": "`null` \\| `string`",
"description": "The id of the Product Variant contained in the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### afterUpdateOrLoad
`**afterUpdateOrLoad**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeUpdate
`**beforeUpdate**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,118 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# LineItemAdjustment
A Line Item Adjustment includes details on discounts applied on a line item.
## constructor
`**new LineItemAdjustment**()`
A Line Item Adjustment includes details on discounts applied on a line item.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The adjustment amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The line item's adjustment description",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount",
"type": "[Discount](Discount.mdx)",
"description": "The details of the discount associated with the adjustment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "discount_id",
"type": "`string`",
"description": "The ID of the discount associated with the adjustment",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The Line Item Adjustment's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the line item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item_id",
"type": "`string`",
"description": "The ID of the line item",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# LineItemTaxLine
A Line Item Tax Line represents the taxes applied on a line item.
## constructor
`**new LineItemTaxLine**()`
A Line Item Tax Line represents the taxes applied on a line item.
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`null` \\| `string`",
"description": "A code to identify the tax type by",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The line item tax line's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the line item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item_id",
"type": "`string`",
"description": "The ID of the line item",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "A human friendly name for the tax",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rate",
"type": "`number`",
"description": "The numeric rate to charge tax by",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,234 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# MoneyAmount
A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.
## constructor
`**new MoneyAmount**()`
A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency that the money amount may belong to.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The 3 character currency code that the money amount may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The money amount's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "max_quantity",
"type": "`null` \\| `number`",
"description": "The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "min_quantity",
"type": "`null` \\| `number`",
"description": "The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price_list",
"type": "`null` \\| [PriceList](PriceList.mdx)",
"description": "The details of the price list that the money amount may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "price_list_id",
"type": "`null` \\| `string`",
"description": "The ID of the price list that the money amount may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region that the money amount may belong to.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`null` \\| `string`",
"description": "The region's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariant](ProductVariant.mdx)",
"description": "The details of the product variant that the money amount may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "The ID of the Product Variant contained in the Line Item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariant](ProductVariant.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### afterLoad
`Private **afterLoad**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeInsert
`Private **beforeInsert**(): undefined \| void`
#### Returns
`undefined` \| `void`
<ParameterTypes parameters={[
{
"name": "undefined \\| void",
"type": "`undefined` \\| `void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeUpdate
`Private **beforeUpdate**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,136 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Note
A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders.
## constructor
`**new Note**()`
A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders.
___
## Properties
<ParameterTypes parameters={[
{
"name": "author",
"type": "[User](User.mdx)",
"description": "The details of the user that created the note.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "author_id",
"type": "`string`",
"description": "The ID of the user that created the note.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The note's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "resource_id",
"type": "`string`",
"description": "The ID of the resource that the Note refers to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "resource_type",
"type": "`string`",
"description": "The type of resource that the Note refers to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The contents of the note.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,181 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Notification
A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent.
## constructor
`**new Notification**()`
A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer",
"type": "[Customer](Customer.mdx)",
"description": "The details of the customer that this notification was sent to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "customer_id",
"type": "`null` \\| `string`",
"description": "The ID of the customer that this notification was sent to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "event_name",
"type": "`string`",
"description": "The name of the event that the notification was sent for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The notification's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_id",
"type": "`string`",
"description": "The notification's parent ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_notification",
"type": "[Notification](Notification.mdx)",
"description": "The details of the parent notification.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "provider",
"type": "[NotificationProvider](NotificationProvider.mdx)",
"description": "The notification provider used to send the notification.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "provider_id",
"type": "`string`",
"description": "The ID of the notification provider used to send the notification.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "resends",
"type": "[Notification](Notification.mdx)[]",
"description": "The details of all resends of the notification.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "resource_id",
"type": "`string`",
"description": "The ID of the resource that the Notification refers to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "resource_type",
"type": "`string`",
"description": "The type of resource that the Notification refers to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "to",
"type": "`string`",
"description": "The address that the Notification was sent to. This will usually be an email address, but can represent other addresses such as a chat bot user ID.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,40 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# NotificationProvider
A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status.
## constructor
`**new NotificationProvider**()`
A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status.
___
## Properties
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the notification provider as given by the notification service.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "Whether the notification service is installed in the current version. If a notification service is no longer installed, the `is\\_installed` attribute is set to `false`.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
}
]} />
@@ -1,56 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# NumericalComparisonOperator
Fields used to apply flexible filters on numbers.
## constructor
`**new NumericalComparisonOperator**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "gt",
"type": "`number`",
"description": "The filtered number must be greater than this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gte",
"type": "`number`",
"description": "The filtered number must be greater than or equal to this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "lt",
"type": "`number`",
"description": "The filtered number must be less than this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "lte",
"type": "`number`",
"description": "The filtered number must be less than or equal to this value.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,96 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Oauth
## constructor
`**new Oauth**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "application_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "display_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "install_url",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "uninstall_url",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,559 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Order
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
## constructor
`**new Order**()`
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
___
## Properties
<ParameterTypes parameters={[
{
"name": "billing_address",
"type": "[Address](Address.mdx)",
"description": "The details of the billing address associated with the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "billing_address_id",
"type": "`string`",
"description": "The ID of the billing address associated with the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date the order was canceled on.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart associated with the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart associated with the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "claims",
"type": "[ClaimOrder](ClaimOrder.mdx)[]",
"description": "The details of the claims created for the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency used in the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The 3 character currency code that is used in the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer",
"type": "[Customer](Customer.mdx)",
"description": "The details of the customer associated with the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "customer_id",
"type": "`string`",
"description": "The ID of the customer associated with the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_total",
"type": "`number`",
"description": "The total of discount rounded",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discounts",
"type": "[Discount](Discount.mdx)[]",
"description": "The details of the discounts applied on the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "display_id",
"type": "`number`",
"description": "The order's display ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "draft_order",
"type": "[DraftOrder](DraftOrder.mdx)",
"description": "The details of the draft order this order was created from.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "draft_order_id",
"type": "`string`",
"description": "The ID of the draft order this order was created from.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "edits",
"type": "[OrderEdit](OrderEdit.mdx)[]",
"description": "The details of the order edits done on the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "email",
"type": "`string`",
"description": "The email associated with the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The ID of an external order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "fulfillment_status",
"type": "[FulfillmentStatus](../enums/FulfillmentStatus.mdx)",
"description": "The order's fulfillment status",
"optional": false,
"defaultValue": "not_fulfilled",
"expandable": false,
"children": []
},
{
"name": "fulfillments",
"type": "[Fulfillment](Fulfillment.mdx)[]",
"description": "The details of the fulfillments created for the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "gift_card_tax_total",
"type": "`number`",
"description": "The total of gift cards with taxes",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_total",
"type": "`number`",
"description": "The total of gift cards",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_transactions",
"type": "[GiftCardTransaction](GiftCardTransaction.mdx)[]",
"description": "The gift card transactions made in the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "gift_cards",
"type": "[GiftCard](GiftCard.mdx)[]",
"description": "The details of the gift card used in the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The order's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the processing of the order in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "item_tax_total",
"type": "`null` \\| `number`",
"description": "The tax total applied on items",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The details of the line items that belong to the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification",
"type": "`boolean`",
"description": "Flag for describing whether or not notifications related to this should be send.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "object",
"type": "`\"order\"`",
"description": "",
"optional": false,
"defaultValue": "\"order\"",
"expandable": false,
"children": []
},
{
"name": "paid_total",
"type": "`number`",
"description": "The total amount paid",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_status",
"type": "[PaymentStatus](../enums/PaymentStatus.mdx)",
"description": "The order's payment status",
"optional": false,
"defaultValue": "not_paid",
"expandable": false,
"children": []
},
{
"name": "payments",
"type": "[Payment](Payment.mdx)[]",
"description": "The details of the payments used in the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "raw_discount_total",
"type": "`number`",
"description": "The total of discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refundable_amount",
"type": "`number`",
"description": "The amount that can be refunded",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refunded_total",
"type": "`number`",
"description": "The total amount refunded if the order is returned.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refunds",
"type": "[Refund](Refund.mdx)[]",
"description": "The details of the refunds created for the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region this order was created in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The ID of the region this order was created in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "returnable_items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The details of the line items that are returnable as part of the order, swaps, or claims",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "returns",
"type": "[Return](Return.mdx)[]",
"description": "The details of the returns created for the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "sales_channel",
"type": "[SalesChannel](SalesChannel.mdx)",
"description": "The details of the sales channel this order belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "sales_channel_id",
"type": "`null` \\| `string`",
"description": "The ID of the sales channel this order belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_address",
"type": "[Address](Address.mdx)",
"description": "The details of the shipping address associated with the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_address_id",
"type": "`string`",
"description": "The ID of the shipping address associated with the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_methods",
"type": "[ShippingMethod](ShippingMethod.mdx)[]",
"description": "The details of the shipping methods used in the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_tax_total",
"type": "`null` \\| `number`",
"description": "The tax total applied on shipping",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_total",
"type": "`number`",
"description": "The total of shipping",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[OrderStatus](../enums/OrderStatus.mdx)",
"description": "The order's status",
"optional": false,
"defaultValue": "pending",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`number`",
"description": "The subtotal of the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "swaps",
"type": "[Swap](Swap.mdx)[]",
"description": "The details of the swaps created for the order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tax_rate",
"type": "`null` \\| `number`",
"description": "The order's tax rate",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_total",
"type": "`null` \\| `number`",
"description": "The total of tax",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`number`",
"description": "The total amount of the order",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): Promise&#60;void&#62;`
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,329 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderEdit
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
## constructor
`**new OrderEdit**()`
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was cancelled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "canceled_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who cancelled the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "changes",
"type": "[OrderItemChange](OrderItemChange.mdx)[]",
"description": "The details of all the changes on the original order's line items.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "confirmed_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was confirmed.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "confirmed_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who confirmed the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who created the order edit.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was declined.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who declined the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_reason",
"type": "`string`",
"description": "An optional note why the order edit is declined.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "difference_due",
"type": "`number`",
"description": "The difference between the total amount of the order and total amount of edited order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_total",
"type": "`number`",
"description": "The total of discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_tax_total",
"type": "`number`",
"description": "The total of the gift card tax amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_total",
"type": "`number`",
"description": "The total of the gift card amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The order edit's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "internal_note",
"type": "`string`",
"description": "An optional note with additional details about the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The details of the cloned items from the original order with the new changes. Once the order edit is confirmed, these line items are associated with the original order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that this order edit was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that is edited",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_collection",
"type": "[PaymentCollection](PaymentCollection.mdx)",
"description": "The details of the payment collection used to authorize additional payment if necessary.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payment_collection_id",
"type": "`string`",
"description": "The ID of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requested_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was requested.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requested_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who requested the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_total",
"type": "`number`",
"description": "The total of the shipping amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[OrderEditStatus](../enums/OrderEditStatus.mdx)",
"description": "The status of the order edit.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`number`",
"description": "The total of subtotal",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_total",
"type": "`null` \\| `number`",
"description": "The total of tax",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`number`",
"description": "The total amount of the edited order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### loadStatus
`**loadStatus**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,145 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderItemChange
An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed.
## constructor
`**new OrderItemChange**()`
An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The order item change's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "line_item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the resulting line item after the item change. This line item is then used in the original order once the order edit is confirmed.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "line_item_id",
"type": "`string`",
"description": "The ID of the cloned line item.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order_edit",
"type": "[OrderEdit](OrderEdit.mdx)",
"description": "The details of the order edit the item change is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_edit_id",
"type": "`string`",
"description": "The ID of the order edit",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "original_line_item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the original line item this item change references. This is used if the item change updates or deletes the original item.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "original_line_item_id",
"type": "`string`",
"description": "The ID of the original line item in the order",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[OrderEditItemChangeType](../enums/OrderEditItemChangeType.mdx)",
"description": "The order item change's status",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,54 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# OrdersReturnItem
## constructor
`**new OrdersReturnItem**()`
___
## Properties
<ParameterTypes parameters={[
{
"name": "item_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "note",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "quantity",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reason_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,217 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Payment
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
## constructor
`**new Payment**()`
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount that the Payment has been authorized for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "amount_refunded",
"type": "`number`",
"description": "The amount of the original Payment amount that has been refunded back to the Customer.",
"optional": false,
"defaultValue": "0",
"expandable": false,
"children": []
},
{
"name": "canceled_at",
"type": "`string` \\| `Date`",
"description": "The date with timezone at which the Payment was canceled.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "captured_at",
"type": "`string` \\| `Date`",
"description": "The date with timezone at which the Payment was captured.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart that the payment session was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart that the payment session was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency of the payment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The 3 character ISO currency code of the payment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The payment's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of a payment in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the payment session was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the payment session was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "provider_id",
"type": "`string`",
"description": "The id of the Payment Provider that is responsible for the Payment",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "swap",
"type": "[Swap](Swap.mdx)",
"description": "The details of the swap that this payment was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "swap_id",
"type": "`string`",
"description": "The ID of the swap that this payment was potentially created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,199 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentCollection
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
## constructor
`**new PaymentCollection**()`
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "Amount of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "authorized_amount",
"type": "`null` \\| `number`",
"description": "Authorized amount of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`string`",
"description": "The ID of the user that created the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The three character ISO code for the currency this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "Description of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The payment collection's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_sessions",
"type": "[PaymentSession](PaymentSession.mdx)[]",
"description": "The details of the payment sessions created as part of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payments",
"type": "[Payment](Payment.mdx)[]",
"description": "The details of the payments created as part of the payment collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The ID of the region this payment collection is associated with.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[PaymentCollectionStatus](../enums/PaymentCollectionStatus.mdx)",
"description": "The type of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ORDER_EDIT](../index.md#order_edit)",
"description": "The type of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,40 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentProvider
A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status.
## constructor
`**new PaymentProvider**()`
A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status.
___
## Properties
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the payment provider as given by the payment service.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "Whether the payment service is installed in the current version. If a payment service is no longer installed, the `is\\_installed` attribute is set to `false`.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
}
]} />
@@ -1,163 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentSession
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
## constructor
`**new PaymentSession**()`
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount that the Payment Session has been authorized for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart that the payment session was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`null` \\| `string`",
"description": "The ID of the cart that the payment session was created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The payment session's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of a cart in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_initiated",
"type": "`boolean`",
"description": "A flag to indicate if a communication with the third party provider has been initiated.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "is_selected",
"type": "`null` \\| `boolean`",
"description": "A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_authorized_at",
"type": "`Date`",
"description": "The date with timezone at which the Payment Session was authorized.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "provider_id",
"type": "`string`",
"description": "The ID of the Payment Provider that is responsible for the Payment Session",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "`string`",
"description": "Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,164 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# PriceList
A Price List represents a set of prices that override the default price for one or more product variants.
## constructor
`**new PriceList**()`
A Price List represents a set of prices that override the default price for one or more product variants.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_groups",
"type": "[CustomerGroup](CustomerGroup.mdx)[]",
"description": "The details of the customer groups that the Price List can apply to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The price list's description",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ends_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone that the Price List stops being valid.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The price list's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Whether the price list prices include tax",
"optional": false,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The price list's name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "prices",
"type": "[MoneyAmount](MoneyAmount.mdx)[]",
"description": "The prices that belong to the price list, represented as a Money Amount.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "starts_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone that the Price List starts being valid.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[PriceListStatus](../enums/PriceListStatus.mdx)",
"description": "The status of the Price List",
"optional": false,
"defaultValue": "draft",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[PriceListType](../enums/PriceListType.mdx)",
"description": "The type of Price List. This can be one of either `sale` or `override`.",
"optional": false,
"defaultValue": "sale",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): undefined \| void`
#### Returns
`undefined` \| `void`
<ParameterTypes parameters={[
{
"name": "undefined \\| void",
"type": "`undefined` \\| `void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
File diff suppressed because it is too large. Load diff
@@ -1,406 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Product
A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level.
## constructor
`**new Product**()`
A product is a saleable item that holds general information such as name or description. It must include at least one Product Variant, where each product variant defines different options to purchase the product with (for example, different sizes or colors). The prices and inventory of the product are defined on the variant level.
___
## Properties
<ParameterTypes parameters={[
{
"name": "categories",
"type": "[ProductCategory](ProductCategory.mdx)[]",
"description": "The details of the product categories that this product belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"featureFlag": "product_categories",
"children": []
},
{
"name": "collection",
"type": "[ProductCollection](ProductCollection.mdx)",
"description": "The details of the product collection that the product belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "collection_id",
"type": "`null` \\| `string`",
"description": "The ID of the product collection that the product belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "A short description of the Product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountable",
"type": "`boolean`",
"description": "Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The external ID of the product",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`null` \\| `string`",
"description": "A unique identifier for the Product (e.g. for slug structure).",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[Image](Image.mdx)[]",
"description": "The details of the product's images.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOption](ProductOption.mdx)[]",
"description": "The details of the Product Options that are defined for the Product. The product's variants will have a unique combination of values of the product's options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "profile",
"type": "[ShippingProfile](ShippingProfile.mdx)",
"description": "The details of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "profile_id",
"type": "`string`",
"description": "The ID of the shipping profile that the product belongs to. The shipping profile has a set of defined shipping options that can be used to fulfill the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "profiles",
"type": "[ShippingProfile](ShippingProfile.mdx)[]",
"description": "Available if the relation `profiles` is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sales_channels",
"type": "[SalesChannel](SalesChannel.mdx)[]",
"description": "The details of the sales channels this product is available in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/ProductStatus.mdx)",
"description": "The status of the product",
"optional": false,
"defaultValue": "draft",
"expandable": false,
"children": []
},
{
"name": "subtitle",
"type": "`null` \\| `string`",
"description": "An optional subtitle that can be used to further specify the Product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ProductTag](ProductTag.mdx)[]",
"description": "The details of the product tags used in this product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "A URL to an image file that can be used to identify the Product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "A title that can be displayed for easy identification of the Product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ProductType](ProductType.mdx)",
"description": "The details of the product type that the product belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "type_id",
"type": "`null` \\| `string`",
"description": "The ID of the product type that the product belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariant](ProductVariant.mdx)[]",
"description": "The details of the Product Variants that belong to the Product. Each will have a unique combination of values of the product's options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### afterLoad
`Private **afterLoad**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### beforeUpdate
`Private **beforeUpdate**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,190 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductCategory
A product category can be used to categorize products into a hierarchy of categories.
## constructor
`**new ProductCategory**()`
A product category can be used to categorize products into a hierarchy of categories.
___
## Properties
<ParameterTypes parameters={[
{
"name": "category_children",
"type": "[ProductCategory](ProductCategory.mdx)[]",
"description": "The details of the category's children.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The product category's description.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "A unique string that identifies the Product Category - can for example be used in slug structures.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product category's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "[Boolean](../index.md#boolean)",
"description": "A flag to make product category visible/hidden in the store front",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "[Boolean](../index.md#boolean)",
"description": "A flag to make product category an internal category for admins",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The product category's name",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "`null` \\| [ProductCategory](ProductCategory.mdx)",
"description": "The details of the parent of this category.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "parent_category_id",
"type": "`null` \\| `string`",
"description": "The ID of the parent category.",
"optional": false,
"defaultValue": "null",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[Product](Product.mdx)[]",
"description": "The details of the products that belong to this category.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "An integer that depicts the rank of category in a tree node",
"optional": false,
"defaultValue": "0",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "productCategoryProductJoinTable",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "\"product_category_product\"",
"expandable": false,
"children": []
},
{
"name": "treeRelations",
"type": "`string`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,118 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductCollection
A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront.
## constructor
`**new ProductCollection**()`
A Product Collection allows grouping together products for promotional purposes. For example, an admin can create a Summer collection, add products to it, and showcase it on the storefront.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "A unique string that identifies the Product Collection - can for example be used in slug structures.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product collection's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[Product](Product.mdx)[]",
"description": "The details of the products that belong to this product collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title that the Product Collection is identified by.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### createHandleIfNotProvided
`Private **createHandleIfNotProvided**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductOption
A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options.
## constructor
`**new ProductOption**()`
A Product Option defines properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color". Admins are free to create any product options.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product option's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[Product](Product.mdx)",
"description": "The details of the product that this product option belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the product that this product option belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title that the Product Option is defined by (e.g. `Size`).",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "values",
"type": "[ProductOptionValue](ProductOptionValue.mdx)[]",
"description": "The details of the values of the product option.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,136 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductOptionValue
An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values.
## constructor
`**new ProductOptionValue**()`
An option value is one of the possible values of a Product Option. Product Variants specify a unique combination of product option values.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product option value's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "option",
"type": "[ProductOption](ProductOption.mdx)",
"description": "The details of the product option that the Product Option Value belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "option_id",
"type": "`string`",
"description": "The ID of the Product Option that the Product Option Value belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be `Small`, `Medium` or `Large`).",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariant](ProductVariant.mdx)",
"description": "The details of the product variant that uses this product option value.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "The ID of the product variant that uses this product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,100 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductTag
A Product Tag can be added to Products for easy filtering and grouping.
## constructor
`**new ProductTag**()`
A Product Tag can be added to Products for easy filtering and grouping.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product tag's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value that the Product Tag represents",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductTaxRate
This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default.
## constructor
`**new ProductTaxRate**()`
This represents the association between a tax rate and a product to indicate that the product is taxed in a way different than the default.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[Product](Product.mdx)",
"description": "The details of the product.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the Product",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rate_id",
"type": "`string`",
"description": "The ID of the Tax Rate",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "[TaxRate](TaxRate.mdx)",
"description": "The details of the tax rate.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,100 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductType
A Product Type can be added to Products for filtering and reporting purposes.
## constructor
`**new ProductType**()`
A Product Type can be added to Products for filtering and reporting purposes.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product type's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value that the Product Type represents.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductTypeTaxRate
This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default.
## constructor
`**new ProductTypeTaxRate**()`
This represents the association between a tax rate and a product type to indicate that the product type is taxed in a different way than the default.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_type",
"type": "[ProductType](ProductType.mdx)",
"description": "The details of the product type.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_type_id",
"type": "`string`",
"description": "The ID of the Product type",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rate_id",
"type": "`string`",
"description": "The id of the Tax Rate",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "[TaxRate](TaxRate.mdx)",
"description": "The details of the tax rate.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -1,298 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductVariant
A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant.
## constructor
`**new ProductVariant**()`
A Product Variant represents a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. A product must at least have one product variant.
___
## Properties
<ParameterTypes parameters={[
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the Product Variant should be purchasable when `inventory\\_quantity` is 0.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`null` \\| `string`",
"description": "A generic field for a GTIN number that can be used to identify the Product Variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "An EAN barcode number that can be used to identify the Product Variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product variant's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_items",
"type": "[ProductVariantInventoryItem](ProductVariantInventoryItem.mdx)[]",
"description": "The details inventory items of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The current quantity of the item that is stocked.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether Medusa should manage inventory for the Product Variant.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValue](ProductOptionValue.mdx)[]",
"description": "The details of the product options that this product variant defines values for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "prices",
"type": "[MoneyAmount](MoneyAmount.mdx)[]",
"description": "The details of the prices of the Product Variant, each represented as a Money Amount. Each Money Amount represents a price in a given currency or a specific Region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product",
"type": "[Product](Product.mdx)",
"description": "The details of the product that the product variant belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the product that the product variant belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "purchasable",
"type": "`boolean`",
"description": "Only used with the inventory modules. A boolean value indicating whether the Product Variant is purchasable. A variant is purchasable if: - inventory is not managed - it has no inventory items - it is in stock - it is backorderable.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The unique stock keeping unit used to identify the Product Variant. This will usually be a unique identifer for the item that is to be shipped, and can be referenced across multiple systems.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "A title that can be displayed for easy identification of the Product Variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "A UPC barcode number that can be used to identify the Product Variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "The ranking of this variant",
"optional": false,
"defaultValue": "0",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the Product Variant. May be used in shipping rate calculations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,118 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ProductVariantInventoryItem
A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant.
## constructor
`**new ProductVariantInventoryItem**()`
A Product Variant Inventory Item links variants with inventory items and denotes the required quantity of the variant.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The product variant inventory item's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_item_id",
"type": "`string`",
"description": "The id of the inventory item",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "required_quantity",
"type": "`number`",
"description": "The quantity of an inventory item required for the variant.",
"optional": false,
"defaultValue": "1",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariant](ProductVariant.mdx)",
"description": "The details of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "variant_id",
"type": "`string`",
"description": "The id of the variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,154 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Refund
A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order.
## constructor
`**new Refund**()`
A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount that has be refunded to the Customer.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The refund's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of the refund in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "note",
"type": "`string`",
"description": "An optional note explaining why the amount was refunded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order this refund was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order this refund was created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment",
"type": "[Payment](Payment.mdx)",
"description": "The details of the payment associated with the refund.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payment_id",
"type": "`string`",
"description": "The payment's ID, if available.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reason",
"type": "`string`",
"description": "The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,218 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Region
A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries.
## constructor
`**new Region**()`
A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries.
___
## Properties
<ParameterTypes parameters={[
{
"name": "automatic_taxes",
"type": "`boolean`",
"description": "Whether taxes should be automated in this region.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "countries",
"type": "[Country](Country.mdx)[]",
"description": "The details of the countries included in this region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "currency",
"type": "[Currency](Currency.mdx)",
"description": "The details of the currency used in the region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "currency_code",
"type": "`string`",
"description": "The three character currency code used in the region.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "fulfillment_providers",
"type": "[FulfillmentProvider](FulfillmentProvider.mdx)[]",
"description": "The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "gift_cards_taxable",
"type": "`boolean`",
"description": "Whether the gift cards are taxable or not in this region.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The region's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Whether the prices for the region include tax",
"optional": false,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_providers",
"type": "[PaymentProvider](PaymentProvider.mdx)[]",
"description": "The details of the payment providers that can be used to process payments in the region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tax_code",
"type": "`string`",
"description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_provider",
"type": "[TaxProvider](TaxProvider.mdx)",
"description": "The details of the tax provider used in the region.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tax_provider_id",
"type": "`null` \\| `string`",
"description": "The ID of the tax provider used in this region",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "`number`",
"description": "The tax rate that should be charged on purchases in the Region.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rates",
"type": "`null` \\| [TaxRate](TaxRate.mdx)[]",
"description": "The details of the tax rates used in the region, aside from the default rate.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,217 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Return
A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim.
## constructor
`**new Return**()`
A Return holds information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can also be used as part of a Swap or a Claim.
___
## Properties
<ParameterTypes parameters={[
{
"name": "claim_order",
"type": "[ClaimOrder](ClaimOrder.mdx)",
"description": "The details of the claim that the return may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_order_id",
"type": "`null` \\| `string`",
"description": "The ID of the claim that the return may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The return's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`null` \\| `string`",
"description": "Randomly generated key used to continue the completion of the return in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[ReturnItem](ReturnItem.mdx)[]",
"description": "The details of the items that the customer is returning.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "location_id",
"type": "`null` \\| `string`",
"description": "The ID of the stock location the return will be added back.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification",
"type": "`null` \\| `boolean`",
"description": "When set to true, no notification will be sent related to this return.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the return was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`null` \\| `string`",
"description": "The ID of the order that the return was created for.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "received_at",
"type": "`Date`",
"description": "The date with timezone at which the return was received.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "refund_amount",
"type": "`number`",
"description": "The amount that should be refunded as a result of the return.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_data",
"type": "`Record<string, unknown>`",
"description": "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_method",
"type": "[ShippingMethod](ShippingMethod.mdx)",
"description": "The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "status",
"type": "[ReturnStatus](../enums/ReturnStatus.mdx)",
"description": "Status of the Return.",
"optional": false,
"defaultValue": "requested",
"expandable": false,
"children": []
},
{
"name": "swap",
"type": "[Swap](Swap.mdx)",
"description": "The details of the swap that the return may belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "swap_id",
"type": "`null` \\| `string`",
"description": "The ID of the swap that the return may belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,130 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ReturnItem
A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it.
## constructor
`**new ReturnItem**()`
A return item represents a line item in an order that is to be returned. It includes details related to the return and the reason behind it.
___
## Properties
<ParameterTypes parameters={[
{
"name": "is_requested",
"type": "`boolean`",
"description": "Whether the Return Item was requested initially or received unexpectedly in the warehouse.",
"optional": false,
"defaultValue": "true",
"expandable": false,
"children": []
},
{
"name": "item",
"type": "[LineItem](LineItem.mdx)",
"description": "The details of the line item in the original order to be returned.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "item_id",
"type": "`string`",
"description": "The ID of the Line Item that the Return Item references.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "note",
"type": "`string`",
"description": "An optional note with additional details about the Return.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "quantity",
"type": "`number`",
"description": "The quantity of the Line Item to be returned.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reason",
"type": "[ReturnReason](ReturnReason.mdx)",
"description": "The details of the reason for returning the item.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "reason_id",
"type": "`string`",
"description": "The ID of the reason for returning the item.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "received_quantity",
"type": "`number`",
"description": "The quantity that was received in the warehouse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requested_quantity",
"type": "`number`",
"description": "The quantity that was originally requested to be returned.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_id",
"type": "`string`",
"description": "The ID of the Return that the Return Item belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_order",
"type": "[Return](Return.mdx)",
"description": "Details of the Return that the Return Item belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
}
]} />
@@ -1,145 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ReturnReason
A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned.
## constructor
`**new ReturnReason**()`
A Return Reason is a value defined by an admin. It can be used on Return Items in order to indicate why a Line Item was returned.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "A description of the Reason.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The return reason's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "label",
"type": "`string`",
"description": "A text that can be displayed to the Customer as a reason.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_return_reason",
"type": "`null` \\| [ReturnReason](ReturnReason.mdx)",
"description": "The details of the parent reason.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "parent_return_reason_id",
"type": "`null` \\| `string`",
"description": "The ID of the parent reason.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_reason_children",
"type": "[ReturnReason](ReturnReason.mdx)[]",
"description": "The details of the child reasons.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value to identify the reason by.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# SalesChannel
A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another.
## constructor
`**new SalesChannel**()`
A Sales Channel is a method a business offers its products for purchase for the customers. For example, a Webshop can be a sales channel, and a mobile app can be another.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "The description of the sales channel.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The sales channel's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_disabled",
"type": "`boolean`",
"description": "Specify if the sales channel is enabled or disabled.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "locations",
"type": "[SalesChannelLocation](SalesChannelLocation.mdx)[]",
"description": "The details of the stock locations related to the sales channel.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the sales channel.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,586 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# SalesChannelInventoryService
## constructor
`**new SalesChannelInventoryService**(«destructured»)`
### Parameters
<ParameterTypes parameters={[
{
"name": "__namedParameters",
"type": "[InjectedDependencies](../types/InjectedDependencies-34.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "eventBusService_",
"type": "[IEventBusService](../interfaces/IEventBusService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager_",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "salesChannelLocationService_",
"type": "[SalesChannelLocationService](SalesChannelLocationService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager_",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### inventoryService\_
`Protected get**inventoryService_**(): [IInventoryService](../interfaces/IInventoryService.mdx)`
#### Returns
[IInventoryService](../interfaces/IInventoryService.mdx)
<ParameterTypes parameters={[
{
"name": "adjustInventory",
"type": "(`inventoryItemId`: `string`, `locationId`: `string`, `adjustment`: `number`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "confirmInventory",
"type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `quantity`: `number`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;boolean&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createInventoryItem",
"type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createInventoryItems",
"type": "(`input`: [CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createInventoryLevel",
"type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createInventoryLevels",
"type": "(`data`: [CreateInventoryLevelInput](../interfaces/CreateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createReservationItem",
"type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[ReservationItemDTO](../types/ReservationItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createReservationItems",
"type": "(`input`: [CreateReservationItemInput](../interfaces/CreateReservationItemInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[ReservationItemDTO](../types/ReservationItemDTO.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteInventoryItem",
"type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteInventoryItemLevelByLocationId",
"type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteInventoryLevel",
"type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteReservationItem",
"type": "(`reservationItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteReservationItemByLocationId",
"type": "(`locationId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleteReservationItemsByLineItem",
"type": "(`lineItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "listInventoryItems",
"type": "(`selector`: [FilterableInventoryItemProps](../interfaces/FilterableInventoryItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[[InventoryItemDTO](../types/InventoryItemDTO.mdx)[], number]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "listInventoryLevels",
"type": "(`selector`: [FilterableInventoryLevelProps](../interfaces/FilterableInventoryLevelProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[], number]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "listReservationItems",
"type": "(`selector`: [FilterableReservationItemProps](../interfaces/FilterableReservationItemProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[ReservationItemDTO](../types/ReservationItemDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[[ReservationItemDTO](../types/ReservationItemDTO.mdx)[], number]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "restoreInventoryItem",
"type": "(`inventoryItemId`: `string` \\| `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveAvailableQuantity",
"type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;number&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveInventoryItem",
"type": "(`inventoryItemId`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveInventoryLevel",
"type": "(`inventoryItemId`: `string`, `locationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveReservationItem",
"type": "(`reservationId`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[ReservationItemDTO](../types/ReservationItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveReservedQuantity",
"type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;number&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieveStockedQuantity",
"type": "(`inventoryItemId`: `string`, `locationIds`: `string`[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;number&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updateInventoryItem",
"type": "(`inventoryItemId`: `string`, `input`: [Partial](../types/Partial.mdx)&#60;[CreateInventoryItemInput](../interfaces/CreateInventoryItemInput.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryItemDTO](../types/InventoryItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updateInventoryLevel",
"type": "(`inventoryItemId`: `string`, `locationId`: `string`, `update`: [UpdateInventoryLevelInput](../interfaces/UpdateInventoryLevelInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updateInventoryLevels",
"type": "(`updates`: [BulkUpdateInventoryLevelInput](../interfaces/BulkUpdateInventoryLevelInput.mdx)[], `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[InventoryLevelDTO](../types/InventoryLevelDTO.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updateReservationItem",
"type": "(`reservationItemId`: `string`, `input`: [UpdateReservationItemInput](../interfaces/UpdateReservationItemInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[ReservationItemDTO](../types/ReservationItemDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TError",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
___
### retrieveAvailableItemQuantity
`**retrieveAvailableItemQuantity**(salesChannelId, inventoryItemId): Promise&#60;number&#62;`
Retrieves the available quantity of an item across all sales channel locations
#### Parameters
<ParameterTypes parameters={[
{
"name": "salesChannelId",
"type": "`string`",
"description": "Sales channel id",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventoryItemId",
"type": "`string`",
"description": "Item id",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;number&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;number&#62;",
"optional": false,
"defaultValue": "",
"description": "available quantity of item across all sales channel locations",
"expandable": false,
"children": []
}
]} />
___
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "`Record<string, unknown>` \\| ``{ code: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
`**withTransaction**(transactionManager?): [SalesChannelInventoryService](SalesChannelInventoryService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[SalesChannelInventoryService](SalesChannelInventoryService.mdx)
<ParameterTypes parameters={[
{
"name": "SalesChannelInventoryService",
"type": "[SalesChannelInventoryService](SalesChannelInventoryService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,109 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# SalesChannelLocation
This represents the association between a sales channel and a stock locations.
## constructor
`**new SalesChannelLocation**()`
This represents the association between a sales channel and a stock locations.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The Sales Channel Stock Location's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "location_id",
"type": "`string`",
"description": "The ID of the Location Stock.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sales_channel",
"type": "[SalesChannel](SalesChannel.mdx)",
"description": "The details of the sales channel the location is associated with.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "sales_channel_id",
"type": "`string`",
"description": "The ID of the Sales Channel",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,513 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# SalesChannelLocationService
Service for managing the stock locations of sales channels
## constructor
`**new SalesChannelLocationService**(«destructured»)`
### Parameters
<ParameterTypes parameters={[
{
"name": "__namedParameters",
"type": "[InjectedDependencies](../types/InjectedDependencies-35.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__container__",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "__moduleDeclaration__",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "eventBusService_",
"type": "[IEventBusService](../interfaces/IEventBusService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager_",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "salesChannelService_",
"type": "[SalesChannelService](SalesChannelService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager_",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Accessors
### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### stockLocationService\_
`Protected get**stockLocationService_**(): [IStockLocationService](../interfaces/IStockLocationService.mdx)`
#### Returns
[IStockLocationService](../interfaces/IStockLocationService.mdx)
<ParameterTypes parameters={[
{
"name": "create",
"type": "(`input`: [CreateStockLocationInput](../types/CreateStockLocationInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "delete",
"type": "(`id`: `string`, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;void&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "list",
"type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)[]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "listAndCount",
"type": "(`selector`: [FilterableStockLocationProps](../interfaces/FilterableStockLocationProps.mdx), `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[[StockLocationDTO](../types/StockLocationDTO.mdx)[], number]&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retrieve",
"type": "(`id`: `string`, `config?`: [FindConfig](../interfaces/FindConfig-1.mdx)&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;, `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "update",
"type": "(`id`: `string`, `input`: [UpdateStockLocationInput](../types/UpdateStockLocationInput.mdx), `context?`: [SharedContext](../interfaces/SharedContext.mdx)) => Promise&#60;[StockLocationDTO](../types/StockLocationDTO.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### associateLocation
`**associateLocation**(salesChannelId, locationId): Promise&#60;void&#62;`
Associates a sales channel with a stock location.
#### Parameters
<ParameterTypes parameters={[
{
"name": "salesChannelId",
"type": "`string`",
"description": "The ID of the sales channel.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "locationId",
"type": "`string`",
"description": "The ID of the stock location.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "A promise that resolves when the association has been created.",
"expandable": false,
"children": []
}
]} />
___
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TError",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Parameters
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
"expandable": false,
"children": []
}
]} />
___
### listLocationIds
`**listLocationIds**(salesChannelId): Promise&#60;string[]&#62;`
Lists the stock locations associated with a sales channel.
#### Parameters
<ParameterTypes parameters={[
{
"name": "salesChannelId",
"type": "`string` \\| `string`[]",
"description": "The ID of the sales channel.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;string[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;string[]&#62;",
"optional": false,
"defaultValue": "",
"description": "A promise that resolves with an array of location IDs.",
"expandable": false,
"children": []
}
]} />
___
### listSalesChannelIds
`**listSalesChannelIds**(locationId): Promise&#60;string[]&#62;`
Lists the sales channels associated with a stock location.
#### Parameters
<ParameterTypes parameters={[
{
"name": "locationId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;string[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;string[]&#62;",
"optional": false,
"defaultValue": "",
"description": "A promise that resolves with an array of sales channel IDs.",
"expandable": false,
"children": []
}
]} />
___
### removeLocation
`**removeLocation**(locationId, salesChannelId?): Promise&#60;void&#62;`
Removes an association between a sales channel and a stock location.
#### Parameters
<ParameterTypes parameters={[
{
"name": "locationId",
"type": "`string`",
"description": "The ID of the stock location.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "salesChannelId",
"type": "`string`",
"description": "The ID of the sales channel or undefined if all the sales channel will be affected.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "A promise that resolves when the association has been removed.",
"expandable": false,
"children": []
}
]} />
___
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "`Record<string, unknown>` \\| ``{ code: string }``",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
`boolean`
<ParameterTypes parameters={[
{
"name": "boolean",
"type": "`boolean`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
`**withTransaction**(transactionManager?): [SalesChannelLocationService](SalesChannelLocationService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
[SalesChannelLocationService](SalesChannelLocationService.mdx)
<ParameterTypes parameters={[
{
"name": "SalesChannelLocationService",
"type": "[SalesChannelLocationService](SalesChannelLocationService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,227 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingMethod
A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of.
## constructor
`**new ShippingMethod**()`
A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of.
___
## Properties
<ParameterTypes parameters={[
{
"name": "cart",
"type": "[Cart](Cart.mdx)",
"description": "The details of the cart that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "claim_order",
"type": "[ClaimOrder](ClaimOrder.mdx)",
"description": "The details of the claim that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "claim_order_id",
"type": "`null` \\| `string`",
"description": "The ID of the claim that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The shipping method's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Whether the shipping method price include tax",
"optional": false,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price",
"type": "`number`",
"description": "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_id",
"type": "`string`",
"description": "The ID of the return that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "return_order",
"type": "[Return](Return.mdx)",
"description": "The details of the return that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_option",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "The details of the shipping option the method was created from.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_option_id",
"type": "`string`",
"description": "The ID of the Shipping Option that the Shipping Method is built from.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`number`",
"description": "The subtotal of the shipping",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "swap",
"type": "[Swap](Swap.mdx)",
"description": "The details of the swap that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "swap_id",
"type": "`string`",
"description": "The ID of the swap that the shipping method is used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_lines",
"type": "[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]",
"description": "The details of the tax lines applied on the shipping method.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "tax_total",
"type": "`number`",
"description": "The total of tax",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`number`",
"description": "The total amount of the shipping",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingMethodTaxLine
A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart.
## constructor
`**new ShippingMethodTaxLine**()`
A Shipping Method Tax Line represents the taxes applied on a shipping method in a cart.
___
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`null` \\| `string`",
"description": "A code to identify the tax type by",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The line item tax line's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "A human friendly name for the tax",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rate",
"type": "`number`",
"description": "The numeric rate to charge tax by",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_method",
"type": "[ShippingMethod](ShippingMethod.mdx)",
"description": "The details of the associated shipping method.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_method_id",
"type": "`string`",
"description": "The ID of the line item",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,218 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingOption
A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.
## constructor
`**new ShippingOption**()`
A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.
___
## Properties
<ParameterTypes parameters={[
{
"name": "admin_only",
"type": "`boolean`",
"description": "Flag to indicate if the Shipping Option usage is restricted to admin users.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "amount",
"type": "`null` \\| `number`",
"description": "The amount to charge for shipping when the Shipping Option price type is `flat\\_rate`.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "The data needed for the Fulfillment Provider to identify the Shipping Option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The shipping option's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "Whether the shipping option price include tax",
"optional": false,
"defaultValue": "false",
"expandable": false,
"featureFlag": "tax_inclusive_pricing",
"children": []
},
{
"name": "is_return",
"type": "`boolean`",
"description": "Flag to indicate if the Shipping Option can be used for Return shipments.",
"optional": false,
"defaultValue": "false",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name given to the Shipping Option - this may be displayed to the Customer.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price_type",
"type": "[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)",
"description": "The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat\\_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "profile",
"type": "[ShippingProfile](ShippingProfile.mdx)",
"description": "The details of the shipping profile that the shipping option belongs to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "profile_id",
"type": "`string`",
"description": "The ID of the Shipping Profile that the shipping option belongs to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "provider",
"type": "[FulfillmentProvider](FulfillmentProvider.mdx)",
"description": "The details of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "provider_id",
"type": "`string`",
"description": "The ID of the fulfillment provider that will be used to later to process the shipping method created from this shipping option and its fulfillments.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "region",
"type": "[Region](Region.mdx)",
"description": "The details of the region this shipping option can be used in.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "region_id",
"type": "`string`",
"description": "The ID of the region this shipping option can be used in.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requirements",
"type": "[ShippingOptionRequirement](ShippingOptionRequirement.mdx)[]",
"description": "The details of the requirements that must be satisfied for the Shipping Option to be available for usage in a Cart.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,100 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingOptionRequirement
A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart.
## constructor
`**new ShippingOptionRequirement**()`
A shipping option requirement defines conditions that a Cart must satisfy for the Shipping Option to be available for usage in the Cart.
___
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount to compare the Cart subtotal to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The shipping option requirement's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_option",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "The details of the shipping option that the requirements belong to.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_option_id",
"type": "`string`",
"description": "The ID of the shipping option that the requirements belong to.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[RequirementType](../enums/RequirementType.mdx)",
"description": "The type of the requirement, this defines how the value will be compared to the Cart's total. `min\\_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max\\_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,127 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingProfile
A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards.
## constructor
`**new ShippingProfile**()`
A Shipping Profile has a set of defined Shipping Options that can be used to fulfill a given set of Products. For example, gift cards are shipped differently than physical products, so a shipping profile with the type `gift\_card` groups together the shipping options that can only be used for gift cards.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The shipping profile's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name given to the Shipping profile - this may be displayed to the Customer.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[Product](Product.mdx)[]",
"description": "The details of the products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_options",
"type": "[ShippingOption](ShippingOption.mdx)[]",
"description": "The details of the shipping options that can be used to create shipping methods for the Products in the Shipping Profile.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "type",
"type": "[ShippingProfileType](../enums/ShippingProfileType.mdx)",
"description": "The type of the Shipping Profile, may be `default`, `gift\\_card` or `custom`.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,85 +0,0 @@
---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ShippingTaxRate
This represents the tax rates applied on a shipping option.
## constructor
`**new ShippingTaxRate**()`
This represents the tax rates applied on a shipping option.
___
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rate_id",
"type": "`string`",
"description": "The ID of the associated tax rate.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_option",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "The details of the shipping option.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "shipping_option_id",
"type": "`string`",
"description": "The ID of the shipping option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "[TaxRate](TaxRate.mdx)",
"description": "The details of the associated tax rate.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
Loaded 100 of 4358 files, more files were not shown because too many files have changed in this diff. Show more