Files
medusa-store/www/apps/docs/content/references/services/classes/ShippingProfile.mdx
github-actions[bot] cdd42dbdcd chore(docs): Generated References (#5743)
Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-11-27 18:58:52 +00:00

126 lines
3.4 KiB
Plaintext

---
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.
## Constructors
#### 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": []
}
]} />