Benefícios
benefitsnamespaceClube de benefícios, saldo e histórico.
3métodos
benefitsnamespaceEsta página é gerada automaticamente pelo
@luckymaker/sdk-generator. Não edite manualmente.
getBalance
Seção intitulada “getBalance”GET
/benefits/user/balanceAssinatura:
getBalance(settings?: SdkSettings): Promise<GetBalanceResponse>type GetBalanceResponse = unknown;Exemplo
Seção intitulada “Exemplo”const response = await sdk.benefits.getBalance();Testar esta função no playground
getCoupon
Seção intitulada “getCoupon”GET
/user/benefits/coupons/:idAssinatura:
getCoupon(id: string, settings?: SdkSettings): Promise<GetCouponResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
id |
string |
type GetCouponParams = { "id": string; };type GetCouponResponse = { "coupon": { "id": string; "status": string; "code": string | null; "pin": string | null; "activationUrl": string | null; "qrCode": string | null; "faceValue": string | null; "pointsSpent": number | null; "providerCoupon": boolean; "redeemedAt": string | null; "activatesAt": string | null; "expiresAt": string | null; "description": string | null; "howToRedeem": string | null; "item": { "id": string; "slug": string; "title": string; "thumbnailUrl": string | null; } | null; }; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.benefits.getCoupon("string");Testar esta função no playground
getHistory
Seção intitulada “getHistory”GET
/user/benefits/historyAssinatura:
getHistory(query?: GetHistoryQuery, settings?: SdkSettings): Promise<GetHistoryResponse>| Nome | Tipo | Obrigatório |
|---|---|---|
page |
number |
sim |
type GetHistoryQuery = { "page": number; };type GetHistoryResponse = unknown;Exemplo
Seção intitulada “Exemplo”const response = await sdk.benefits.getHistory({ "page": 0 });