* update dependencies * update onboarding mdx * fixes for mdx issues * fixes for mdx compatibility * resolve mdx errors * fixes in reference * fix check errors * revert change in vale action * fix node version in action * fix summary in markdown
99 lines
2.5 KiB
Plaintext
99 lines
2.5 KiB
Plaintext
---
|
|
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.
|
|
|
|
## Constructors
|
|
|
|
### 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": []
|
|
}
|
|
]} />
|