Class: AdminRegionsResource
Hierarchy
default
↳
AdminRegionsResource
Methods
addCountry
▸ addCountry(id
, payload
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
adds a country to the list of countries in a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
payload | AdminPostRegionsRegionCountriesReq | country data |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:103
addFulfillmentProvider
▸ addFulfillmentProvider(id
, payload
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
adds a fulfillment provider to a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
payload | AdminPostRegionsRegionFulfillmentProvidersReq | fulfillment provider data |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:135
addPaymentProvider
▸ addPaymentProvider(id
, payload
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
adds a payment provider to a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
payload | AdminPostRegionsRegionPaymentProvidersReq | payment provider data |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:181
create
▸ create(payload
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
creates a region.
Parameters
Name | Type |
---|---|
payload | AdminPostRegionsReq |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
created region.
Defined in
medusa-js/src/resources/admin/regions.ts:24
delete
▸ delete(id
, customHeaders?
): ResponsePromise
<DeleteResponse
>
Description
deletes a region
Parameters
Name | Type | Description |
---|---|---|
id | string | id of region to delete. |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<DeleteResponse
>
Deleted response
Defined in
medusa-js/src/resources/admin/regions.ts:54
deleteCountry
▸ deleteCountry(id
, country_code
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
remove a country from a region's list of coutnries
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
country_code | string | the 2 character ISO code for the Country. |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:119
deleteFulfillmentProvider
▸ deleteFulfillmentProvider(id
, provider_id
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
remove a fulfillment provider from a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
provider_id | string | the if of the fulfillment provider |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:151
deletePaymentProvider
▸ deletePaymentProvider(id
, provider_id
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
removes a payment provider from a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
provider_id | string | the id of the payment provider |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
updated region
Defined in
medusa-js/src/resources/admin/regions.ts:197
list
▸ list(query?
, customHeaders?
): ResponsePromise
<AdminRegionsListRes
>
Description
lists regions matching a query
Parameters
Name | Type | Description |
---|---|---|
query? | AdminGetRegionsParams | query for searching regions |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsListRes
>
a list of regions matching the query.
Defined in
medusa-js/src/resources/admin/regions.ts:82
retrieve
▸ retrieve(id
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
get a region
Parameters
Name | Type | Description |
---|---|---|
id | string | id of the region to retrieve. |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
the region with the given id
Defined in
medusa-js/src/resources/admin/regions.ts:68
retrieveFulfillmentOptions
▸ retrieveFulfillmentOptions(id
, customHeaders?
): ResponsePromise
<AdminGetRegionsRegionFulfillmentOptionsRes
>
Description
retrieves the list of fulfillment options available in a region
Parameters
Name | Type | Description |
---|---|---|
id | string | region id |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminGetRegionsRegionFulfillmentOptionsRes
>
list of fulfillment options
Defined in
medusa-js/src/resources/admin/regions.ts:166
update
▸ update(id
, payload
, customHeaders?
): ResponsePromise
<AdminRegionsRes
>
Description
updates a region
Parameters
Name | Type | Description |
---|---|---|
id | string | id of the region to update. |
payload | AdminPostRegionsRegionReq | update to apply to region. |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminRegionsRes
>
the updated region.