Class: AdminCustomerGroupsResource
Hierarchy
default
↳
AdminCustomerGroupsResource
Methods
addCustomers
▸ addCustomers(id
, payload
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsRes
>
Add multiple customers to a customer group.
Parameters
Name | Type | Description |
---|---|---|
id | string | customer group id |
payload | AdminPostCustomerGroupsGroupCustomersBatchReq | an object which contains an array of customer ids which will be added to the group |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:112
create
▸ create(payload
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsRes
>
Create a customer group.
Parameters
Name | Type | Description |
---|---|---|
payload | AdminPostCustomerGroupsReq | customer group info |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:26
delete
▸ delete(id
, customHeaders?
): ResponsePromise
<DeleteResponse
>
Deletes a customer group.
Parameters
Name | Type | Description |
---|---|---|
id | string | id of the customer group |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<DeleteResponse
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:77
list
▸ list(query?
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsListRes
>
Lists customer groups.
Parameters
Name | Type | Description |
---|---|---|
query? | AdminGetCustomerGroupsParams | optional |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsListRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:91
listCustomers
▸ listCustomers(id
, query?
, customHeaders?
): ResponsePromise
<AdminCustomersListRes
>
List and count customers that belong to provided customer groups.
Parameters
Name | Type | Description |
---|---|---|
id | string | customer group id |
query? | AdminGetCustomersParams | params for filtering customers |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomersListRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:144
removeCustomers
▸ removeCustomers(id
, payload
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsRes
>
Remove multiple customers from a customer group.
Parameters
Name | Type | Description |
---|---|---|
id | string | customer group id |
payload | AdminDeleteCustomerGroupsGroupCustomerBatchReq | an object which contains an array of customers ids which will be removed from the group |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:128
retrieve
▸ retrieve(id
, query?
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsRes
>
Retrieves a customer group.
Parameters
Name | Type | Description |
---|---|---|
id | string | customer group id |
query? | AdminGetCustomerGroupsGroupParams | pass query options such as "expand", "fields" etc. |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsRes
>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:41
update
▸ update(id
, payload
, customHeaders?
): ResponsePromise
<AdminCustomerGroupsRes
>
Updates a customer group
Parameters
Name | Type | Description |
---|---|---|
id | string | customer group id |
payload | AdminPostCustomerGroupsGroupReq | data to update customer group with |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<AdminCustomerGroupsRes
>