---
title: "Benefícios"
description: "Clube de benefícios, saldo e histórico."
---
<div class="lm-ref-kicker"><code>benefits</code><span>namespace</span></div>

Clube de benefícios, saldo e histórico.

<div class="lm-ref-stats lm-ref-stats--compact">
  <div class="lm-ref-stat"><strong>3</strong><span>métodos</span></div>
  <div class="lm-ref-stat"><code>benefits</code><span>namespace</span></div>
</div>

> Esta página é gerada automaticamente pelo `@luckymaker/sdk-generator`. Não edite manualmente.

## `getBalance`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/benefits/user/balance</code></div>

Assinatura:

```ts
getBalance(settings?: SdkSettings): Promise<GetBalanceResponse>
```

### Tipos

```ts
type GetBalanceResponse = unknown;
```

### Exemplo

```ts
const response = await sdk.benefits.getBalance();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=benefits&method=getBalance">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getCoupon`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/user/benefits/coupons/:id</code></div>

Assinatura:

```ts
getCoupon(id: string, settings?: SdkSettings): Promise<GetCouponResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `id` | `string` |

### Tipos

```ts
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

```ts
const response = await sdk.benefits.getCoupon("string");
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=benefits&method=getCoupon">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>

## `getHistory`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/user/benefits/history</code></div>

Assinatura:

```ts
getHistory(query?: GetHistoryQuery, settings?: SdkSettings): Promise<GetHistoryResponse>
```

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `page` | `number` | sim |

### Tipos

```ts
type GetHistoryQuery = { "page": number; };
type GetHistoryResponse = unknown;
```

### Exemplo

```ts
const response = await sdk.benefits.getHistory({ "page": 0 });
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=benefits&method=getHistory">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>