LoyaltyApiClient
Contains all the endpoints needed to manage loyalty program.
Constructors
new LoyaltyApiClient()
new LoyaltyApiClient():
LoyaltyApiClient
Returns
Methods
createPrize()
static
createPrize(data
,config
?):Promise
<SCPrizeType
>
This endpoint creates a prize.
Parameters
Parameter | Type | Description |
---|---|---|
data | LoyaltyPrizeParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeType
>
Source
createPrizeRequest()
static
createPrizeRequest(prize
,config
?):Promise
<SCPrizeUserType
>
This endpoint creates a request for a loyalty prize
Parameters
Parameter | Type | Description |
---|---|---|
prize | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeUserType
>
Source
getAllPrizeRequests()
static
getAllPrizeRequests(config
?):Promise
<SCPaginatedResponse
<SCPrizeUserType
>>
This endpoint retrieves all requests of loyalty prizes.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCPrizeUserType
>>
Source
getPrizes()
static
getPrizes(params
?,config
?):Promise
<SCPaginatedResponse
<SCPrizeType
>>
This endpoint retrieves all prizes.
Parameters
Parameter | Type | Description |
---|---|---|
params ? | LoyaltyGetPrizeParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCPrizeType
>>
Source
getSpecificPrize()
static
getSpecificPrize(id
,config
?):Promise
<SCPrizeType
>
This endpoint retrieves a specific prize
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeType
>
Source
getSpecificPrizeRequest()
static
getSpecificPrizeRequest(id
,config
?):Promise
<SCPrizeUserType
>
This endpoint retrieves a specific request for a loyalty prize.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeUserType
>
Source
patchPrize()
static
patchPrize(id
,data
?,config
?):Promise
<SCPrizeType
>
This endpoint patches a specific prize.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data ? | LoyaltyPrizeParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeType
>
Source
patchPrizeRequest()
static
patchPrizeRequest(id
,status
?,config
?):Promise
<SCPrizeUserType
>
This endpoint patches a specific request for a loyalty prize. You can use this endpoint to change status in an admin list/table interface.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
status ? | SCPrizeUserStatusType | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeUserType
>
Source
updatePrize()
static
updatePrize(id
,data
,config
?):Promise
<SCPrizeType
>
This endpoint updates a specific prize.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | LoyaltyPrizeParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPrizeType
>