Skip to main content

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

NameTypeDescription
idstringregion id
payloadAdminPostRegionsRegionCountriesReqcountry data
customHeadersRecord<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

NameTypeDescription
idstringregion id
payloadAdminPostRegionsRegionFulfillmentProvidersReqfulfillment provider data
customHeadersRecord<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

NameTypeDescription
idstringregion id
payloadAdminPostRegionsRegionPaymentProvidersReqpayment provider data
customHeadersRecord<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

NameType
payloadAdminPostRegionsReq
customHeadersRecord<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

NameTypeDescription
idstringid of region to delete.
customHeadersRecord<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

NameTypeDescription
idstringregion id
country_codestringthe 2 character ISO code for the Country.
customHeadersRecord<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

NameTypeDescription
idstringregion id
provider_idstringthe if of the fulfillment provider
customHeadersRecord<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

NameTypeDescription
idstringregion id
provider_idstringthe id of the payment provider
customHeadersRecord<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

NameTypeDescription
query?AdminGetRegionsParamsquery for searching regions
customHeadersRecord<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

NameTypeDescription
idstringid of the region to retrieve.
customHeadersRecord<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

NameTypeDescription
idstringregion id
customHeadersRecord<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

NameTypeDescription
idstringid of the region to update.
payloadAdminPostRegionsRegionRequpdate to apply to region.
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminRegionsRes>

the updated region.

Defined in

medusa-js/src/resources/admin/regions.ts:39