6.3 KiB
Class: ShippingProfileService
Hierarchy
-
"medusa-interfaces"↳
ShippingProfileService
Constructors
constructor
• new ShippingProfileService(__namedParameters)
Parameters
| Name | Type |
|---|---|
__namedParameters |
Object |
Overrides
BaseService.constructor
Defined in
services/shipping-profile.js:12
Methods
addProduct
▸ addProduct(profileId, productId): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
profileId |
string |
|
productId |
string |
Returns
Promise<any>
Defined in
services/shipping-profile.js:343
addShippingOption
▸ addShippingOption(profileId, optionId): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
profileId |
string |
|
optionId |
string |
Returns
Promise<any>
Defined in
services/shipping-profile.js:361
create
▸ create(profile): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
profile |
ShippingProfile |
Returns
Promise<any>
Defined in
services/shipping-profile.js:235
createDefault
▸ createDefault(): Promise<ShippingProfile>
Returns
Promise<ShippingProfile>
Defined in
services/shipping-profile.js:167
createGiftCardDefault
▸ createGiftCardDefault(): Promise<ShippingProfile>
Returns
Promise<ShippingProfile>
Defined in
services/shipping-profile.js:209
decorate
▸ decorate(profile, fields, expandFields?): Profile
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
profile |
Profile |
undefined |
|
fields |
string[] |
undefined |
|
expandFields |
string[] |
[] |
Returns
Profile
Defined in
services/shipping-profile.js:379
delete
▸ delete(profileId): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
profileId |
string |
Returns
Promise<any>
Defined in
services/shipping-profile.js:317
fetchCartOptions
▸ fetchCartOptions(cart): Promise<[ShippingOption]>
Parameters
| Name | Type | Description |
|---|---|---|
cart |
Cart |
Returns
Promise<[ShippingOption]>
Defined in
services/shipping-profile.js:425
fetchOptionsByProductIds
▸ fetchOptionsByProductIds(productIds, filter): Promise<any[]>
Parameters
| Name | Type |
|---|---|
productIds |
any |
filter |
any |
Returns
Promise<any[]>
Defined in
services/shipping-profile.js:73
getProfilesInCart_
▸ getProfilesInCart_(cart): [string]
Parameters
| Name | Type | Description |
|---|---|---|
cart |
Cart |
Returns
[string]
Defined in
services/shipping-profile.js:406
list
▸ list(selector?, config?): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
selector |
any |
|
config |
any |
Returns
Promise<any>
Defined in
services/shipping-profile.js:64
retrieve
▸ retrieve(profileId, options?): Promise<Product>
Parameters
| Name | Type | Description |
|---|---|---|
profileId |
string |
|
options |
any |
Returns
Promise<Product>
Defined in
services/shipping-profile.js:121
retrieveDefault
▸ retrieveDefault(): Promise<any>
Returns
Promise<any>
Defined in
services/shipping-profile.js:151
retrieveGiftCardDefault
▸ retrieveGiftCardDefault(): any
Returns
any
Defined in
services/shipping-profile.js:192
update
▸ update(profileId, update): Promise<any>
Parameters
| Name | Type | Description |
|---|---|---|
profileId |
string |
|
update |
any |
Returns
Promise<any>
Defined in
services/shipping-profile.js:263
withTransaction
▸ withTransaction(transactionManager): ShippingProfileService
Parameters
| Name | Type |
|---|---|
transactionManager |
any |