# PurchaseClient.Builder

```
public static final class PurchaseClient.Builder
```

```
java.lang.Object
    ↳ com.gaa.sdk.iap.PurchaseClient.Builder
```

[PurchaseClient](purchaseclient) 인스턴스를 만들기 위한 빌더입니다.

## Public Methods <a href="#id-c-purchaseclient.builder-publicmethods" id="id-c-purchaseclient.builder-publicmethods"></a>

***

### setBase64PublicKey <a href="#id-c-purchaseclient.builder-setbase64publickey" id="id-c-purchaseclient.builder-setbase64publickey"></a>

```
@UiThread
public PurchaseClient.Builder setBase64PublicKey(String base64PublicKey)
```

구매정보의 유효성 체크를 위해 개발자센터에서 발급된 public key 를 지정하세요.

| **Parameters:**                   |                        |
| --------------------------------- | ---------------------- |
| base64PublicKey                   | base64EncodedPublicKey |
| **Returns**                       |                        |
| <p>PurchaseClient.Builder<br></p> |                        |

### setListener <a href="#id-c-purchaseclient.builder-setlistener" id="id-c-purchaseclient.builder-setlistener"></a>

```
@UiThread
public PurchaseClient.Builder setListener([I]PurchasesUpdatedListener listener)
```

onPurchasesUpdated 이벤트를 받을 수 있게 지정하세요.

| **Parameters:**                   |                                                                    |
| --------------------------------- | ------------------------------------------------------------------ |
| listener                          | [PurchasesUpdatedListener](../interfaces/purchasesupdatedlistener) |
| **Returns:**                      |                                                                    |
| <p>PurchaseClient.Builder<br></p> |                                                                    |

### build <a href="#id-c-purchaseclient.builder-build" id="id-c-purchaseclient.builder-build"></a>

```
@UiThread
public [C]PurchaseClient build()
```

PurchaseClient 인스턴스를 생성합니다.

| **Return:**                           |                                          |
| ------------------------------------- | ---------------------------------------- |
| [\[C\]PurchaseClient](purchaseclient) |                                          |
| **Throws:**                           |                                          |
| java.lang.IllegalArgumentException    | context or listener 가 정상적이지 않을 경우 발생합니다. |
