# NGNT

To use the NGNT class, import it from the `buycoins` package:

{% code title="ngnt.py" %}

```python
from buycoins import NGNT
```

{% endcode %}

You can use the class directly using `NGNT().method_name` or instantiate the class into a variable and use:

```python
ngnt = NGNT()
ngnt.method_name(**args)
```

### create\_deposit\_account(account\_name)

{% hint style="warning" %}
This method does not work currently as the API endpoint has been temporarily disabled.
{% endhint %}

This method creates a virtual deposit account under the account name from the method argument and returns a JSON object containing the details of the newly created account.

#### Example

{% code title="ngnt.py" %}

```python
ngnt = NGNT()

created_deposit_account = ngnt.create_deposit_account("BuyCoins Africa")

print(created_deposit_account)
```

{% endcode %}

In the example above, a new virtual deposit account under the name **BuyCoins Africa** is created and output stored in the `create_deposit_account` variable.&#x20;

The response printed from line 5 is:

```javascript
{
    'accountNumber': '12345678901',
    'accountName': 'Buycoins Africa',
    'accountType': 'deposit',
    'bankName': 'Providus Bank',
    'accountReference': '445efd1b-a902-4a4b-8e57-28d5bedf364d'
}

```

#### Error Responses

An error message is sent as a response In an event where an empty argument is passed.&#x20;

Example request:

{% code title="ngnt.py" %}

```python
ngnt = NGNT()

created_deposit_account = ngnt.create_deposit_account("")

print(created_deposit_account)
```

{% endcode %}

Response:

```javascript
{
    "status": "error",
    "name": "AccountError",
    "code": 400,
    "message": "Invalid account name passed"
}
```
