diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 95b7074..0acdf18 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,7 +1,6 @@ .gitignore docs/BusinessApi.md docs/CarrierApi.md -docs/ESIMsApi.md docs/InformationApi.md docs/PreordersApi.md docs/PricingApi.md @@ -16,7 +15,6 @@ 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/information_api.py smspool_sdk/api/preorders_api.py smspool_sdk/api/pricing_api.py diff --git a/docs/ESIMsApi.md b/docs/ESIMsApi.md deleted file mode 100644 index d655002..0000000 --- a/docs/ESIMsApi.md +++ /dev/null @@ -1,714 +0,0 @@ -# smspool_sdk.ESIMsApi - -All URIs are relative to *https://api.smspool.net* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**esim_delete**](ESIMsApi.md#esim_delete) | **POST** /esim/delete | Delete eSIM -[**esim_history**](ESIMsApi.md#esim_history) | **POST** /esim/history | View eSIM history -[**esim_label_update**](ESIMsApi.md#esim_label_update) | **POST** /esim/label/update | Update eSIM label -[**esim_plans**](ESIMsApi.md#esim_plans) | **POST** /esim/plans | View eSIM plans per country -[**esim_pricing**](ESIMsApi.md#esim_pricing) | **POST** /esim/pricing | View eSIM countries -[**esim_profile**](ESIMsApi.md#esim_profile) | **POST** /esim/profile | View eSIM profile -[**esim_purchase**](ESIMsApi.md#esim_purchase) | **POST** /esim/purchase | Purchase eSIM -[**esim_topup**](ESIMsApi.md#esim_topup) | **POST** /esim/topup | Top up eSIM -[**esim_topup_plans**](ESIMsApi.md#esim_topup_plans) | **POST** /esim/topup_plans | Top Up Plans - - -# **esim_delete** -> object esim_delete(transaction_id) - -Delete eSIM - -### 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.ESIMsApi(api_client) - transaction_id = 'transaction_id_example' # str | transactionId retrieved from /esim/purchase - - try: - # Delete eSIM - api_response = api_instance.esim_delete(transaction_id) - print("The response of ESIMsApi->esim_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transaction_id** | **str**| transactionId retrieved from /esim/purchase | - -### 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 | - | -**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) - -# **esim_history** -> object esim_history(start=start, length=length, search=search) - -View eSIM history - -### 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.ESIMsApi(api_client) - start = 56 # int | Start page (optional) - length = 56 # int | Amount of rows per page (optional) - search = 'search_example' # str | Alphanumeric search (optional) - - try: - # View eSIM history - api_response = api_instance.esim_history(start=start, length=length, search=search) - print("The response of ESIMsApi->esim_history:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_history: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **start** | **int**| Start page | [optional] - **length** | **int**| Amount of rows per page | [optional] - **search** | **str**| Alphanumeric search | [optional] - -### 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 | - | -**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) - -# **esim_label_update** -> object esim_label_update(transaction_id, label=label) - -Update eSIM label - -Set or clear the label of one of your eSIMs. The label is returned as `label` by **View eSIM history**, so you can use it to tell your eSIMs apart. - -A label can be up to 30 characters long and may only contain letters, numbers and spaces. Leave `label` out, or send it empty, to remove the label. - -### 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.ESIMsApi(api_client) - transaction_id = 'transaction_id_example' # str | transactionId retrieved from /esim/purchase - label = 'label_example' # str | The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label. (optional) - - try: - # Update eSIM label - api_response = api_instance.esim_label_update(transaction_id, label=label) - print("The response of ESIMsApi->esim_label_update:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_label_update: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transaction_id** | **str**| transactionId retrieved from /esim/purchase | - **label** | **str**| The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label. | [optional] - -### 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 | - | -**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) - -# **esim_plans** -> object esim_plans(country) - -View eSIM plans per country - -### 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.ESIMsApi(api_client) - country = 'country_example' # str | ISO 3166 country code - - try: - # View eSIM plans per country - api_response = api_instance.esim_plans(country) - print("The response of ESIMsApi->esim_plans:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_plans: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **country** | **str**| ISO 3166 country code | - -### 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 | - | -**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) - -# **esim_pricing** -> object esim_pricing(start=start, length=length, search=search) - -View eSIM countries - -### 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.ESIMsApi(api_client) - start = 56 # int | Start page (optional) - length = 56 # int | Amount of rows per page (optional) - search = 'search_example' # str | Search query for country (optional) - - try: - # View eSIM countries - api_response = api_instance.esim_pricing(start=start, length=length, search=search) - print("The response of ESIMsApi->esim_pricing:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_pricing: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **start** | **int**| Start page | [optional] - **length** | **int**| Amount of rows per page | [optional] - **search** | **str**| Search query for country | [optional] - -### 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 | - | -**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) - -# **esim_profile** -> object esim_profile(transaction_id=transaction_id) - -View eSIM profile - -### 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.ESIMsApi(api_client) - transaction_id = 'transaction_id_example' # str | transactionId retrieved from /esim/purchase (optional) - - try: - # View eSIM profile - api_response = api_instance.esim_profile(transaction_id=transaction_id) - print("The response of ESIMsApi->esim_profile:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_profile: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transaction_id** | **str**| transactionId retrieved from /esim/purchase | [optional] - -### 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 | - | -**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) - -# **esim_purchase** -> object esim_purchase(plan) - -Purchase eSIM - -### 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.ESIMsApi(api_client) - plan = 56 # int | The plan ID which is obtained from /esim/pricing - - try: - # Purchase eSIM - api_response = api_instance.esim_purchase(plan) - print("The response of ESIMsApi->esim_purchase:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_purchase: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plan** | **int**| The plan ID which is obtained from /esim/pricing | - -### 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 | - | -**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) - -# **esim_topup** -> object esim_topup(transaction_id, plan) - -Top up eSIM - -### 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.ESIMsApi(api_client) - transaction_id = 'transaction_id_example' # str | Transaction ID retrieved from eSIM history - plan = 56 # int | Topup plan retrieved from \\\"Top Up Plans\\\" - - try: - # Top up eSIM - api_response = api_instance.esim_topup(transaction_id, plan) - print("The response of ESIMsApi->esim_topup:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_topup: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transaction_id** | **str**| Transaction ID retrieved from eSIM history | - **plan** | **int**| Topup plan retrieved from \\\"Top Up Plans\\\" | - -### 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 | - | -**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) - -# **esim_topup_plans** -> object esim_topup_plans(plan) - -Top Up Plans - -### 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.ESIMsApi(api_client) - plan = 56 # int | `plan` retrieved from eSIM history - - try: - # Top Up Plans - api_response = api_instance.esim_topup_plans(plan) - print("The response of ESIMsApi->esim_topup_plans:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ESIMsApi->esim_topup_plans: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plan** | **int**| `plan` retrieved from eSIM history | - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **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) - diff --git a/docs/InformationApi.md b/docs/InformationApi.md index ad7927c..581454b 100644 --- a/docs/InformationApi.md +++ b/docs/InformationApi.md @@ -7,7 +7,9 @@ Method | HTTP request | Description [**country_retrieve_all**](InformationApi.md#country_retrieve_all) | **GET** /country/retrieve_all | Country list [**pool_retrieve_all**](InformationApi.md#pool_retrieve_all) | **POST** /pool/retrieve_all | Pool list [**pool_retrieve_valid**](InformationApi.md#pool_retrieve_valid) | **POST** /pool/retrieve_valid | Suggested Pools +[**request_auto_country**](InformationApi.md#request_auto_country) | **POST** /request/auto_country | Pick the best country for a service [**request_balance**](InformationApi.md#request_balance) | **POST** /request/balance | Balance +[**request_history_search**](InformationApi.md#request_history_search) | **POST** /request/history_search | History search [**request_success_rate**](InformationApi.md#request_success_rate) | **POST** /request/success_rate | Retrieve country success rates per service [**request_suggested_countries**](InformationApi.md#request_suggested_countries) | **POST** /request/suggested_countries | Suggested Countries [**service_retrieve_all**](InformationApi.md#service_retrieve_all) | **GET** /service/retrieve_all | Service list @@ -219,6 +221,80 @@ No authorization required [[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_auto_country** +> object request_auto_country(service, pricing_option=pricing_option) + +Pick the best country for a service + +Returns the country SMSPool would order from for this service when you do not want to choose one (the quick order's "Pick for me"). It sends an HTTP POST request to the URL `https://api.smspool.net/request/auto_country`. + +Every country with stock is scored on its measured success rate (a country with no order history displays 100% but has nothing to back it up, so it is left out unless no measured country has stock), weighed down when little stock backs it, minus a little per dollar, plus a bonus when it matches the country your request's IP resolves to (a local number verifies more often). The IP country is only used for that comparison; it is neither stored nor returned. Ties go to more stock, then the lower price. With `pricing_option=1` the cheapest country within reach of the best score wins instead. + +Send `auto_country=1` to `/purchase/sms` to order with the same choice in one call. + +### 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.InformationApi(api_client) + service = 'service_example' # str | Service name or service ID which can be retrieved at the /service/retrieve_all endpoint + pricing_option = 56 # int | Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score. (optional) + + try: + # Pick the best country for a service + api_response = api_instance.request_auto_country(service, pricing_option=pricing_option) + print("The response of InformationApi->request_auto_country:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InformationApi->request_auto_country: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service** | **str**| Service name or service ID which can be retrieved at the /service/retrieve_all endpoint | + **pricing_option** | **int**| Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score. | [optional] + +### Return type + +**object** + +### Authorization + +No authorization required + +### 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 | - | + +[[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_balance** > object request_balance() @@ -305,6 +381,89 @@ This endpoint does not need any parameter. [[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_history_search** +> object request_history_search(search, cursor=cursor, limit=limit) + +History search + +_Not documented yet: the parameters below come straight from the code._ + +### 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.InformationApi(api_client) + search = 'search_example' # str | + cursor = 'cursor_example' # str | (optional) + limit = 56 # int | (optional) + + try: + # History search + api_response = api_instance.request_history_search(search, cursor=cursor, limit=limit) + print("The response of InformationApi->request_history_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InformationApi->request_history_search: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **str**| | + **cursor** | **str**| | [optional] + **limit** | **int**| | [optional] + +### 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** | JSON response | - | +**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_success_rate** > object request_success_rate(service, country=country) diff --git a/docs/RentalApi.md b/docs/RentalApi.md index c68be8f..5c29c1f 100644 --- a/docs/RentalApi.md +++ b/docs/RentalApi.md @@ -1181,6 +1181,7 @@ Retrieve Rental Stock ### Example +* Bearer Authentication (bearerAuth): ```python import smspool_sdk @@ -1193,6 +1194,15 @@ 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: @@ -1228,7 +1238,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -1240,6 +1250,8 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**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) diff --git a/docs/SMSApi.md b/docs/SMSApi.md index d11c027..3ec67b2 100644 --- a/docs/SMSApi.md +++ b/docs/SMSApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**request_history**](SMSApi.md#request_history) | **POST** /request/history | Order History [**sms_activate**](SMSApi.md#sms_activate) | **POST** /sms/activate | Activate SMS [**sms_all_stock**](SMSApi.md#sms_all_stock) | **POST** /sms/all_stock | One-time stock for all services +[**sms_archive**](SMSApi.md#sms_archive) | **POST** /sms/archive | Archive [**sms_cancel**](SMSApi.md#sms_cancel) | **POST** /sms/cancel | Cancel SMS [**sms_cancel_all**](SMSApi.md#sms_cancel_all) | **POST** /sms/cancel_all | Cancel All SMS [**sms_check**](SMSApi.md#sms_check) | **POST** /sms/check | Check SMS @@ -24,7 +25,7 @@ Method | HTTP request | Description # **purchase_sms** -> object purchase_sms(service, country=country, pool=pool, max_price=max_price, pricing_option=pricing_option, quantity=quantity, areacode=areacode, exclude=exclude, create_token=create_token, activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, software=software) +> object purchase_sms(service, country=country, pool=pool, max_price=max_price, pricing_option=pricing_option, quantity=quantity, areacode=areacode, exclude=exclude, create_token=create_token, activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, auto_country=auto_country, software=software) Order SMS @@ -69,11 +70,12 @@ with smspool_sdk.ApiClient(configuration) as api_client: activation_type = 'activation_type_example' # str | Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification. (optional) carrier = 56 # int | Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US) (optional) phonenumber = 56 # int | In case you want to select a specific phone number to order (optional) + auto_country = 56 # int | Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason. (optional) software = 56 # int | (optional) try: # Order SMS - api_response = api_instance.purchase_sms(service, country=country, pool=pool, max_price=max_price, pricing_option=pricing_option, quantity=quantity, areacode=areacode, exclude=exclude, create_token=create_token, activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, software=software) + api_response = api_instance.purchase_sms(service, country=country, pool=pool, max_price=max_price, pricing_option=pricing_option, quantity=quantity, areacode=areacode, exclude=exclude, create_token=create_token, activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, auto_country=auto_country, software=software) print("The response of SMSApi->purchase_sms:\n") pprint(api_response) except Exception as e: @@ -99,6 +101,7 @@ Name | Type | Description | Notes **activation_type** | **str**| Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification. | [optional] **carrier** | **int**| Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US) | [optional] **phonenumber** | **int**| In case you want to select a specific phone number to order | [optional] + **auto_country** | **int**| Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason. | [optional] **software** | **int**| | [optional] ### Return type @@ -296,6 +299,7 @@ Request available areacodes ### Example +* Bearer Authentication (bearerAuth): ```python import smspool_sdk @@ -308,6 +312,15 @@ 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: @@ -343,7 +356,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -355,6 +368,8 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | JSON response | - | +**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) @@ -633,6 +648,85 @@ No authorization required [[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) +# **sms_archive** +> object sms_archive(orderid) + +Archive + +_Not documented yet: the parameters below come straight from the code._ + +### 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.SMSApi(api_client) + orderid = 'orderid_example' # str | + + try: + # Archive + api_response = api_instance.sms_archive(orderid) + print("The response of SMSApi->sms_archive:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SMSApi->sms_archive: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderid** | **str**| | + +### 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** | JSON response | - | +**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) + # **sms_cancel** > object sms_cancel(orderid=orderid, orderids=orderids, expiry=expiry, ban=ban) @@ -1050,7 +1144,7 @@ This endpoint does not need any parameter. Missed SMS -Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. +Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes, Hark reward payouts or Neon Money Talks messages. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. diff --git a/smspool_sdk/__init__.py b/smspool_sdk/__init__.py index b104167..0b587c4 100644 --- a/smspool_sdk/__init__.py +++ b/smspool_sdk/__init__.py @@ -26,7 +26,6 @@ "RentalApi", "SMSApi", "VoucherApi", - "ESIMsApi", "ApiResponse", "ApiClient", "Configuration", @@ -48,7 +47,6 @@ from smspool_sdk.api.rental_api import RentalApi as RentalApi from smspool_sdk.api.sms_api import SMSApi as SMSApi from smspool_sdk.api.voucher_api import VoucherApi as VoucherApi -from smspool_sdk.api.esims_api import ESIMsApi as ESIMsApi # import ApiClient from smspool_sdk.api_response import ApiResponse as ApiResponse diff --git a/smspool_sdk/api/__init__.py b/smspool_sdk/api/__init__.py index c2944c9..919c6bb 100644 --- a/smspool_sdk/api/__init__.py +++ b/smspool_sdk/api/__init__.py @@ -9,5 +9,4 @@ from smspool_sdk.api.rental_api import RentalApi from smspool_sdk.api.sms_api import SMSApi from smspool_sdk.api.voucher_api import VoucherApi -from smspool_sdk.api.esims_api import ESIMsApi diff --git a/smspool_sdk/api/esims_api.py b/smspool_sdk/api/esims_api.py deleted file mode 100644 index 86eb44e..0000000 --- a/smspool_sdk/api/esims_api.py +++ /dev/null @@ -1,2616 +0,0 @@ -""" - SMSPool API - - Every endpoint accepts its parameters as form fields (POST) or query parameters (GET). Authenticate with your API key from https://www.smspool.net/my/settings, either as a bearer token (`Authorization: Bearer `) or as a `key` parameter. - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, StrictStr -from typing import Any, Optional -from typing_extensions import Annotated - -from smspool_sdk.api_client import ApiClient, RequestSerialized -from smspool_sdk.api_response import ApiResponse -from smspool_sdk.rest import RESTResponseType - - -class ESIMsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def esim_delete( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Delete eSIM - - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_delete_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_delete_with_http_info( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Delete eSIM - - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_delete_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_delete_without_preload_content( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete eSIM - - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_delete_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_delete_serialize( - self, - transaction_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if transaction_id is not None: - _form_params.append(('transactionId', transaction_id)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/delete', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_history( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Alphanumeric search")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """View eSIM history - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Alphanumeric search - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_history_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_history_with_http_info( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Alphanumeric search")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """View eSIM history - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Alphanumeric search - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_history_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_history_without_preload_content( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Alphanumeric search")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View eSIM history - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Alphanumeric search - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_history_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_history_serialize( - self, - start, - length, - search, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if start is not None: - _form_params.append(('start', start)) - if length is not None: - _form_params.append(('length', length)) - if search is not None: - _form_params.append(('search', search)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/history', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_label_update( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - label: Annotated[Optional[StrictStr], Field(description="The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update eSIM label - - Set or clear the label of one of your eSIMs. The label is returned as `label` by **View eSIM history**, so you can use it to tell your eSIMs apart. A label can be up to 30 characters long and may only contain letters, numbers and spaces. Leave `label` out, or send it empty, to remove the label. - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param label: The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label. - :type label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_label_update_serialize( - transaction_id=transaction_id, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_label_update_with_http_info( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - label: Annotated[Optional[StrictStr], Field(description="The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update eSIM label - - Set or clear the label of one of your eSIMs. The label is returned as `label` by **View eSIM history**, so you can use it to tell your eSIMs apart. A label can be up to 30 characters long and may only contain letters, numbers and spaces. Leave `label` out, or send it empty, to remove the label. - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param label: The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label. - :type label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_label_update_serialize( - transaction_id=transaction_id, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_label_update_without_preload_content( - self, - transaction_id: Annotated[StrictStr, Field(description="transactionId retrieved from /esim/purchase")], - label: Annotated[Optional[StrictStr], Field(description="The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update eSIM label - - Set or clear the label of one of your eSIMs. The label is returned as `label` by **View eSIM history**, so you can use it to tell your eSIMs apart. A label can be up to 30 characters long and may only contain letters, numbers and spaces. Leave `label` out, or send it empty, to remove the label. - - :param transaction_id: transactionId retrieved from /esim/purchase (required) - :type transaction_id: str - :param label: The new label: letters, numbers and spaces, at most 30 characters. Empty or left out removes the label. - :type label: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_label_update_serialize( - transaction_id=transaction_id, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_label_update_serialize( - self, - transaction_id, - label, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if transaction_id is not None: - _form_params.append(('transactionId', transaction_id)) - if label is not None: - _form_params.append(('label', label)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/label/update', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_plans( - self, - country: Annotated[StrictStr, Field(description="ISO 3166 country code")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """View eSIM plans per country - - - :param country: ISO 3166 country code (required) - :type country: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_plans_serialize( - country=country, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_plans_with_http_info( - self, - country: Annotated[StrictStr, Field(description="ISO 3166 country code")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """View eSIM plans per country - - - :param country: ISO 3166 country code (required) - :type country: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_plans_serialize( - country=country, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_plans_without_preload_content( - self, - country: Annotated[StrictStr, Field(description="ISO 3166 country code")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View eSIM plans per country - - - :param country: ISO 3166 country code (required) - :type country: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_plans_serialize( - country=country, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_plans_serialize( - self, - country, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if country is not None: - _form_params.append(('country', country)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/plans', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_pricing( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search query for country")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """View eSIM countries - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Search query for country - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_pricing_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_pricing_with_http_info( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search query for country")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """View eSIM countries - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Search query for country - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_pricing_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_pricing_without_preload_content( - self, - start: Annotated[Optional[StrictInt], Field(description="Start page")] = None, - length: Annotated[Optional[StrictInt], Field(description="Amount of rows per page")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search query for country")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View eSIM countries - - - :param start: Start page - :type start: int - :param length: Amount of rows per page - :type length: int - :param search: Search query for country - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_pricing_serialize( - start=start, - length=length, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_pricing_serialize( - self, - start, - length, - search, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if start is not None: - _form_params.append(('start', start)) - if length is not None: - _form_params.append(('length', length)) - if search is not None: - _form_params.append(('search', search)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/pricing', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_profile( - self, - transaction_id: Annotated[Optional[StrictStr], Field(description="transactionId retrieved from /esim/purchase")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """View eSIM profile - - - :param transaction_id: transactionId retrieved from /esim/purchase - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_profile_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_profile_with_http_info( - self, - transaction_id: Annotated[Optional[StrictStr], Field(description="transactionId retrieved from /esim/purchase")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """View eSIM profile - - - :param transaction_id: transactionId retrieved from /esim/purchase - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_profile_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_profile_without_preload_content( - self, - transaction_id: Annotated[Optional[StrictStr], Field(description="transactionId retrieved from /esim/purchase")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View eSIM profile - - - :param transaction_id: transactionId retrieved from /esim/purchase - :type transaction_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_profile_serialize( - transaction_id=transaction_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_profile_serialize( - self, - transaction_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if transaction_id is not None: - _form_params.append(('transactionId', transaction_id)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/profile', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_purchase( - self, - plan: Annotated[StrictInt, Field(description="The plan ID which is obtained from /esim/pricing")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Purchase eSIM - - - :param plan: The plan ID which is obtained from /esim/pricing (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_purchase_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_purchase_with_http_info( - self, - plan: Annotated[StrictInt, Field(description="The plan ID which is obtained from /esim/pricing")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Purchase eSIM - - - :param plan: The plan ID which is obtained from /esim/pricing (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_purchase_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_purchase_without_preload_content( - self, - plan: Annotated[StrictInt, Field(description="The plan ID which is obtained from /esim/pricing")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Purchase eSIM - - - :param plan: The plan ID which is obtained from /esim/pricing (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_purchase_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_purchase_serialize( - self, - plan, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if plan is not None: - _form_params.append(('plan', plan)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/purchase', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_topup( - self, - transaction_id: Annotated[StrictStr, Field(description="Transaction ID retrieved from eSIM history")], - plan: Annotated[StrictInt, Field(description="Topup plan retrieved from \\\"Top Up Plans\\\"")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Top up eSIM - - - :param transaction_id: Transaction ID retrieved from eSIM history (required) - :type transaction_id: str - :param plan: Topup plan retrieved from \\\"Top Up Plans\\\" (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_serialize( - transaction_id=transaction_id, - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_topup_with_http_info( - self, - transaction_id: Annotated[StrictStr, Field(description="Transaction ID retrieved from eSIM history")], - plan: Annotated[StrictInt, Field(description="Topup plan retrieved from \\\"Top Up Plans\\\"")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Top up eSIM - - - :param transaction_id: Transaction ID retrieved from eSIM history (required) - :type transaction_id: str - :param plan: Topup plan retrieved from \\\"Top Up Plans\\\" (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_serialize( - transaction_id=transaction_id, - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_topup_without_preload_content( - self, - transaction_id: Annotated[StrictStr, Field(description="Transaction ID retrieved from eSIM history")], - plan: Annotated[StrictInt, Field(description="Topup plan retrieved from \\\"Top Up Plans\\\"")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Top up eSIM - - - :param transaction_id: Transaction ID retrieved from eSIM history (required) - :type transaction_id: str - :param plan: Topup plan retrieved from \\\"Top Up Plans\\\" (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_serialize( - transaction_id=transaction_id, - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '401': "object", - '403': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_topup_serialize( - self, - transaction_id, - plan, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if transaction_id is not None: - _form_params.append(('transactionId', transaction_id)) - if plan is not None: - _form_params.append(('plan', plan)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/topup', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def esim_topup_plans( - self, - plan: Annotated[StrictInt, Field(description="`plan` retrieved from eSIM history")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Top Up Plans - - - :param plan: `plan` retrieved from eSIM history (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_plans_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def esim_topup_plans_with_http_info( - self, - plan: Annotated[StrictInt, Field(description="`plan` retrieved from eSIM history")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Top Up Plans - - - :param plan: `plan` retrieved from eSIM history (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_plans_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def esim_topup_plans_without_preload_content( - self, - plan: Annotated[StrictInt, Field(description="`plan` retrieved from eSIM history")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Top Up Plans - - - :param plan: `plan` retrieved from eSIM history (required) - :type plan: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._esim_topup_plans_serialize( - plan=plan, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _esim_topup_plans_serialize( - self, - plan, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if plan is not None: - _form_params.append(('plan', plan)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/esim/topup_plans', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/smspool_sdk/api/information_api.py b/smspool_sdk/api/information_api.py index fbd91bf..52325a8 100644 --- a/smspool_sdk/api/information_api.py +++ b/smspool_sdk/api/information_api.py @@ -15,7 +15,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field, StrictInt, StrictStr from typing import Any, Optional from typing_extensions import Annotated @@ -865,6 +865,297 @@ def _pool_retrieve_valid_serialize( + @validate_call + def request_auto_country( + self, + service: Annotated[StrictStr, Field(description="Service name or service ID which can be retrieved at the /service/retrieve_all endpoint")], + pricing_option: Annotated[Optional[StrictInt], Field(description="Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Pick the best country for a service + + Returns the country SMSPool would order from for this service when you do not want to choose one (the quick order's \"Pick for me\"). It sends an HTTP POST request to the URL `https://api.smspool.net/request/auto_country`. Every country with stock is scored on its measured success rate (a country with no order history displays 100% but has nothing to back it up, so it is left out unless no measured country has stock), weighed down when little stock backs it, minus a little per dollar, plus a bonus when it matches the country your request's IP resolves to (a local number verifies more often). The IP country is only used for that comparison; it is neither stored nor returned. Ties go to more stock, then the lower price. With `pricing_option=1` the cheapest country within reach of the best score wins instead. Send `auto_country=1` to `/purchase/sms` to order with the same choice in one call. + + :param service: Service name or service ID which can be retrieved at the /service/retrieve_all endpoint (required) + :type service: str + :param pricing_option: Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score. + :type pricing_option: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_auto_country_serialize( + service=service, + pricing_option=pricing_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def request_auto_country_with_http_info( + self, + service: Annotated[StrictStr, Field(description="Service name or service ID which can be retrieved at the /service/retrieve_all endpoint")], + pricing_option: Annotated[Optional[StrictInt], Field(description="Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Pick the best country for a service + + Returns the country SMSPool would order from for this service when you do not want to choose one (the quick order's \"Pick for me\"). It sends an HTTP POST request to the URL `https://api.smspool.net/request/auto_country`. Every country with stock is scored on its measured success rate (a country with no order history displays 100% but has nothing to back it up, so it is left out unless no measured country has stock), weighed down when little stock backs it, minus a little per dollar, plus a bonus when it matches the country your request's IP resolves to (a local number verifies more often). The IP country is only used for that comparison; it is neither stored nor returned. Ties go to more stock, then the lower price. With `pricing_option=1` the cheapest country within reach of the best score wins instead. Send `auto_country=1` to `/purchase/sms` to order with the same choice in one call. + + :param service: Service name or service ID which can be retrieved at the /service/retrieve_all endpoint (required) + :type service: str + :param pricing_option: Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score. + :type pricing_option: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_auto_country_serialize( + service=service, + pricing_option=pricing_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def request_auto_country_without_preload_content( + self, + service: Annotated[StrictStr, Field(description="Service name or service ID which can be retrieved at the /service/retrieve_all endpoint")], + pricing_option: Annotated[Optional[StrictInt], Field(description="Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pick the best country for a service + + Returns the country SMSPool would order from for this service when you do not want to choose one (the quick order's \"Pick for me\"). It sends an HTTP POST request to the URL `https://api.smspool.net/request/auto_country`. Every country with stock is scored on its measured success rate (a country with no order history displays 100% but has nothing to back it up, so it is left out unless no measured country has stock), weighed down when little stock backs it, minus a little per dollar, plus a bonus when it matches the country your request's IP resolves to (a local number verifies more often). The IP country is only used for that comparison; it is neither stored nor returned. Ties go to more stock, then the lower price. With `pricing_option=1` the cheapest country within reach of the best score wins instead. Send `auto_country=1` to `/purchase/sms` to order with the same choice in one call. + + :param service: Service name or service ID which can be retrieved at the /service/retrieve_all endpoint (required) + :type service: str + :param pricing_option: Set to 1 to prefer the cheapest country among those close to the best score; 0 (default) picks purely on the score. + :type pricing_option: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_auto_country_serialize( + service=service, + pricing_option=pricing_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _request_auto_country_serialize( + self, + service, + pricing_option, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if service is not None: + _form_params.append(('service', service)) + if pricing_option is not None: + _form_params.append(('pricing_option', pricing_option)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/request/auto_country', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def request_balance( self, @@ -1120,6 +1411,316 @@ def _request_balance_serialize( + @validate_call + def request_history_search( + self, + search: StrictStr, + cursor: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """History search + + _Not documented yet: the parameters below come straight from the code._ + + :param search: (required) + :type search: str + :param cursor: + :type cursor: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_history_search_serialize( + search=search, + cursor=cursor, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def request_history_search_with_http_info( + self, + search: StrictStr, + cursor: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """History search + + _Not documented yet: the parameters below come straight from the code._ + + :param search: (required) + :type search: str + :param cursor: + :type cursor: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_history_search_serialize( + search=search, + cursor=cursor, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def request_history_search_without_preload_content( + self, + search: StrictStr, + cursor: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """History search + + _Not documented yet: the parameters below come straight from the code._ + + :param search: (required) + :type search: str + :param cursor: + :type cursor: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._request_history_search_serialize( + search=search, + cursor=cursor, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _request_history_search_serialize( + self, + search, + cursor, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if search is not None: + _form_params.append(('search', search)) + if cursor is not None: + _form_params.append(('cursor', cursor)) + if limit is not None: + _form_params.append(('limit', limit)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/request/history_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def request_success_rate( self, diff --git a/smspool_sdk/api/rental_api.py b/smspool_sdk/api/rental_api.py index f29307b..0e1e465 100644 --- a/smspool_sdk/api/rental_api.py +++ b/smspool_sdk/api/rental_api.py @@ -4329,6 +4329,8 @@ def rental_stock( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -4403,6 +4405,8 @@ def rental_stock_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -4477,6 +4481,8 @@ def rental_stock_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -4547,6 +4553,7 @@ def _rental_stock_serialize( # authentication setting _auth_settings: List[str] = [ + 'bearerAuth' ] return self.api_client.param_serialize( diff --git a/smspool_sdk/api/sms_api.py b/smspool_sdk/api/sms_api.py index 5ec97cd..74f6bf3 100644 --- a/smspool_sdk/api/sms_api.py +++ b/smspool_sdk/api/sms_api.py @@ -52,6 +52,7 @@ def purchase_sms( activation_type: Annotated[Optional[StrictStr], Field(description="Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification.")] = None, carrier: Annotated[Optional[StrictInt], Field(description="Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US)")] = None, phonenumber: Annotated[Optional[StrictInt], Field(description="In case you want to select a specific phone number to order")] = None, + auto_country: Annotated[Optional[StrictInt], Field(description="Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason.")] = None, software: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -93,6 +94,8 @@ def purchase_sms( :type carrier: int :param phonenumber: In case you want to select a specific phone number to order :type phonenumber: int + :param auto_country: Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason. + :type auto_country: int :param software: :type software: int :param _request_timeout: timeout setting for this request. If one @@ -130,6 +133,7 @@ def purchase_sms( activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, + auto_country=auto_country, software=software, _request_auth=_request_auth, _content_type=_content_type, @@ -169,6 +173,7 @@ def purchase_sms_with_http_info( activation_type: Annotated[Optional[StrictStr], Field(description="Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification.")] = None, carrier: Annotated[Optional[StrictInt], Field(description="Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US)")] = None, phonenumber: Annotated[Optional[StrictInt], Field(description="In case you want to select a specific phone number to order")] = None, + auto_country: Annotated[Optional[StrictInt], Field(description="Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason.")] = None, software: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -210,6 +215,8 @@ def purchase_sms_with_http_info( :type carrier: int :param phonenumber: In case you want to select a specific phone number to order :type phonenumber: int + :param auto_country: Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason. + :type auto_country: int :param software: :type software: int :param _request_timeout: timeout setting for this request. If one @@ -247,6 +254,7 @@ def purchase_sms_with_http_info( activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, + auto_country=auto_country, software=software, _request_auth=_request_auth, _content_type=_content_type, @@ -286,6 +294,7 @@ def purchase_sms_without_preload_content( activation_type: Annotated[Optional[StrictStr], Field(description="Options: SMS, VOICE, FLASH. SMS will receive regular SMS, VOICE will receive phone calls that mentions the SMS and FLASH is for FLASH calls for verification.")] = None, carrier: Annotated[Optional[StrictInt], Field(description="Options: 1 or 2. Pick a carrier (only works for pool Foxtrot US)")] = None, phonenumber: Annotated[Optional[StrictInt], Field(description="In case you want to select a specific phone number to order")] = None, + auto_country: Annotated[Optional[StrictInt], Field(description="Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason.")] = None, software: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -327,6 +336,8 @@ def purchase_sms_without_preload_content( :type carrier: int :param phonenumber: In case you want to select a specific phone number to order :type phonenumber: int + :param auto_country: Set to 1 to let SMSPool pick the country: every country with stock is scored on its measured success rate (weighed down when little stock backs it, minus a little per dollar; countries with no order history are left out unless nothing else has stock) with a bonus for a local number, the country your request's IP resolves to; with pricing_option=1 the cheapest country close to the best score wins. Ignored when country is sent. The response then carries auto_country with the chosen country and the reason. + :type auto_country: int :param software: :type software: int :param _request_timeout: timeout setting for this request. If one @@ -364,6 +375,7 @@ def purchase_sms_without_preload_content( activation_type=activation_type, carrier=carrier, phonenumber=phonenumber, + auto_country=auto_country, software=software, _request_auth=_request_auth, _content_type=_content_type, @@ -398,6 +410,7 @@ def _purchase_sms_serialize( activation_type, carrier, phonenumber, + auto_country, software, _request_auth, _content_type, @@ -447,6 +460,8 @@ def _purchase_sms_serialize( _form_params.append(('carrier', carrier)) if phonenumber is not None: _form_params.append(('phonenumber', phonenumber)) + if auto_country is not None: + _form_params.append(('auto_country', auto_country)) if software is not None: _form_params.append(('software', software)) # process the body parameter @@ -1063,6 +1078,8 @@ def request_areacodes( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -1137,6 +1154,8 @@ def request_areacodes_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -1211,6 +1230,8 @@ def request_areacodes_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '401': "object", + '403': "object", } response_data = self.api_client.call_api( *_param, @@ -1281,6 +1302,7 @@ def _request_areacodes_serialize( # authentication setting _auth_settings: List[str] = [ + 'bearerAuth' ] return self.api_client.param_serialize( @@ -2200,6 +2222,286 @@ def _sms_all_stock_serialize( + @validate_call + def sms_archive( + self, + orderid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Archive + + _Not documented yet: the parameters below come straight from the code._ + + :param orderid: (required) + :type orderid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sms_archive_serialize( + orderid=orderid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sms_archive_with_http_info( + self, + orderid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Archive + + _Not documented yet: the parameters below come straight from the code._ + + :param orderid: (required) + :type orderid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sms_archive_serialize( + orderid=orderid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sms_archive_without_preload_content( + self, + orderid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive + + _Not documented yet: the parameters below come straight from the code._ + + :param orderid: (required) + :type orderid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sms_archive_serialize( + orderid=orderid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '401': "object", + '403': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sms_archive_serialize( + self, + orderid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if orderid is not None: + _form_params.append(('orderid', orderid)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sms/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def sms_cancel( self, @@ -3621,7 +3923,7 @@ def sms_missed( ) -> object: """Missed SMS - Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. + Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes, Hark reward payouts or Neon Money Talks messages. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. :param phonenumber: Only return messages for this number, including the country code. Leave it out for all your numbers. :type phonenumber: int @@ -3694,7 +3996,7 @@ def sms_missed_with_http_info( ) -> ApiResponse[object]: """Missed SMS - Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. + Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes, Hark reward payouts or Neon Money Talks messages. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. :param phonenumber: Only return messages for this number, including the country code. Leave it out for all your numbers. :type phonenumber: int @@ -3767,7 +4069,7 @@ def sms_missed_without_preload_content( ) -> RESTResponseType: """Missed SMS - Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes or Hark reward payouts. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. + Some messages arrive on a number from your one-time orders but cannot finish the order, such as Ticketmaster and Seated codes, Hark reward payouts or Neon Money Talks messages. This returns those messages, the same ones the Missed SMS tool on the website shows. Only numbers from pool Foxtrot are covered. The newest messages come first. `url`, `code` and `email` hold the first link, code and email address found in the message, or an empty string. :param phonenumber: Only return messages for this number, including the country code. Leave it out for all your numbers. :type phonenumber: int