Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.gitignore
docs/BusinessApi.md
docs/CarrierApi.md
docs/ESIMsApi.md
docs/DepositsApi.md
docs/InformationApi.md
docs/PreordersApi.md
docs/PricingApi.md
docs/RentalApi.md
docs/SMSApi.md
docs/StatusApi.md
docs/VoucherApi.md
pyproject.toml
requirements.txt
Expand All @@ -16,12 +17,13 @@ smspool_sdk/__init__.py
smspool_sdk/api/__init__.py
smspool_sdk/api/business_api.py
smspool_sdk/api/carrier_api.py
smspool_sdk/api/esims_api.py
smspool_sdk/api/deposits_api.py
smspool_sdk/api/information_api.py
smspool_sdk/api/preorders_api.py
smspool_sdk/api/pricing_api.py
smspool_sdk/api/rental_api.py
smspool_sdk/api/sms_api.py
smspool_sdk/api/status_api.py
smspool_sdk/api/voucher_api.py
smspool_sdk/api_client.py
smspool_sdk/api_response.py
Expand Down
4 changes: 4 additions & 0 deletions docs/BusinessApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ Name | Type | Description | Notes

Update

Updates a sub-account. Send only the fields you want to change.

`query` holds the result of each requested change. `success` is 1 only when every one of them succeeded; otherwise it is 0, `failed` lists the fields that were refused and `message` repeats the first refusal.

### Example

* Bearer Authentication (bearerAuth):
Expand Down
4 changes: 4 additions & 0 deletions docs/CarrierApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ To use this endpoint, send an HTTP POST request to the provided URL with the nec

Make sure to handle any errors that may occur during the lookup process and check the `success` field in the response to determine the outcome of the operation.

A lookup costs $0.01. When the lookup fails (`success: false`) the charge is returned and the response carries `refunded: true`.

`phonenumber` is the number with its country code; a leading `+`, spaces and dashes are ignored.

### Example

* Bearer Authentication (bearerAuth):
Expand Down
193 changes: 193 additions & 0 deletions docs/DepositsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# smspool_sdk.DepositsApi

All URIs are relative to *https://api.smspool.net*

Method | HTTP request | Description
------------- | ------------- | -------------
[**request_address**](DepositsApi.md#request_address) | **POST** /request/address | Deposit address
[**request_payment_methods**](DepositsApi.md#request_payment_methods) | **GET** /request/payment_methods | Deposit methods


# **request_address**
> object request_address(method)

Deposit address

Returns your deposit address for a cryptocurrency, and creates it on the first call. What you send to the address is added to your balance once the payment confirms, less the method's fee.

You have one address per method. Later calls return the same address, so you can store it and reuse it for every deposit. An address can be replaced, for example by you on the [deposit page](https://www.smspool.net/balance/deposit); the address it replaced still credits your balance.

Send only the method's coin, on the method's network. Any other coin or network sent to the address is permanently lost.

An extra API key needs Full access for this endpoint. A Read only or Orders key is refused with `API_KEY_SCOPE`.

### Response

- `success`: `1` when an address is returned.
- `address`: the address to send to.
- `minimum_deposit`: the smallest deposit in USD; `0` means there is none. A smaller payment is not credited.
- `minimum_coin`, `minimum_ticker` and `minimum_label`: on some methods only. The minimum in the coin (`null` while the exchange rate is unknown), the coin's ticker, and the minimum as text. On these methods a smaller payment waits at the payment processor until you send the rest.
- `fee_percent` and `fee_fixed`: the fee taken from each deposit, as a percentage of the amount plus a fixed amount in USD.
- `fee_label`: the fee as text; empty when there is no fee.
- `fee_live`: `true` when `fee_fixed` is an estimate of the network's current cost. The fee is then worked out again when your payment is credited and can be a little higher or lower.

### When there is no address

These all answer with HTTP 200, so check for `address`:

- A method that is paid through a hosted checkout page has no address. The response has no `success` or `address`; it has a field named `create_..._form` set to `1`, and the fee fields. Deposit with such a method on the website.
- `success: 0` with `Invalid payment method`: `method` is not the name of an active deposit method.
- `success: 0` with `Failed to generate your address, please try again later!`: the payment processor did not issue an address. Try again later, or use another method.

### Example

* Bearer Authentication (bearerAuth):

```python
import smspool_sdk
from smspool_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.smspool.net
# See configuration.py for a list of all supported configuration parameters.
configuration = smspool_sdk.Configuration(
host = "https://api.smspool.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = smspool_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with smspool_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = smspool_sdk.DepositsApi(api_client)
method = 'method_example' # str | The deposit method: a `name` from `/request/payment_methods`, such as `BTC` or `USDT.TRON`

try:
# Deposit address
api_response = api_instance.request_address(method)
print("The response of DepositsApi->request_address:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DepositsApi->request_address: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**method** | **str**| The deposit method: a `name` from `/request/payment_methods`, such as `BTC` or `USDT.TRON` |

### Return type

**object**

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Error | - |
**401** | Malformed API key | - |
**403** | Unknown or revoked API key | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **request_payment_methods**
> object request_payment_methods()

Deposit methods

Lists the cryptocurrencies you can deposit with, one entry per coin and network. It needs no API key.

Pass an entry's `name` as `method` to `/request/address` to get your deposit address for it.

### Response

A JSON array. Each entry has:

- `name`: the method's identifier. A coin that runs on several networks has one entry per network, named `COIN.NETWORK` (`USDT.TRON`).
- `display_name`: the name shown on the website.
- `category_name`: the group the method is listed under.
- `minimum_deposit`: the smallest deposit in USD; `0` means there is none.
- `fee_percent` and `fee_fixed`: the fee taken from a deposit, as a percentage of the amount plus a fixed amount in USD.

The other fields are for internal use and can change without notice.

For some methods the minimum and the fixed fee follow the network's current cost. `/request/address` returns the figures that apply at that moment, so use those when they differ from this list.

### Example


```python
import smspool_sdk
from smspool_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.smspool.net
# See configuration.py for a list of all supported configuration parameters.
configuration = smspool_sdk.Configuration(
host = "https://api.smspool.net"
)


# Enter a context with an instance of the API client
with smspool_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = smspool_sdk.DepositsApi(api_client)

try:
# Deposit methods
api_response = api_instance.request_payment_methods()
print("The response of DepositsApi->request_payment_methods:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DepositsApi->request_payment_methods: %s\n" % e)
```



### Parameters

This endpoint does not need any parameter.

### Return type

**object**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

Loading