diff --git a/setup.py b/setup.py index 89a454a..dfc946e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="zarban", - version="0.4.1", + version="0.5.0", author="Zarban", author_email="info@zarban.io", description="Python SDK for Zarban", diff --git a/src/zarban/service/docs/Account.md b/src/zarban/service/docs/Account.md index fd1afb8..4760c64 100644 --- a/src/zarban/service/docs/Account.md +++ b/src/zarban/service/docs/Account.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **total_deposits** | **dict(str, str)** | | **lendingpool_summary** | [**AccountLendingpoolSummary**](AccountLendingpoolSummary.md) | | **stabelcoin_system_summary** | [**AccountStablecoinSystemSummary**](AccountStablecoinSystemSummary.md) | | +**staking_summary** | [**AccountStakingSummary**](AccountStakingSummary.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/AccountStakingSummary.md b/src/zarban/service/docs/AccountStakingSummary.md new file mode 100644 index 0000000..15945cf --- /dev/null +++ b/src/zarban/service/docs/AccountStakingSummary.md @@ -0,0 +1,12 @@ +# AccountStakingSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_stake** | **dict(str, str)** | | +**unclaimed_reward** | **dict(str, str)** | | +**net_apy** | **str** | Net annual percentage yield in staking contract | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/AccountsApi.md b/src/zarban/service/docs/AccountsApi.md index 60e033c..131c67c 100644 --- a/src/zarban/service/docs/AccountsApi.md +++ b/src/zarban/service/docs/AccountsApi.md @@ -1,14 +1,14 @@ -# openapi_client.AccountsApi +# zarban.service.openapi_client.AccountsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**accounts_address_get**](AccountsApi.md#accounts_address_get) | **GET** /accounts/{address} | Get account by address +[**get_account_by_address**](AccountsApi.md#get_account_by_address) | **GET** /v2/accounts/{address} | Get account by address -# **accounts_address_get** -> Account accounts_address_get(address) +# **get_account_by_address** +> Account get_account_by_address(address) Get account by address @@ -19,28 +19,28 @@ Get account by address ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.AccountsApi(api_client) + api_instance = zarban.service.openapi_client.AccountsApi(api_client) address = '0x1234567890123456789012345678901234567890' # str | Ethereum address of the account try: # Get account by address - api_response = api_instance.accounts_address_get(address) + api_response = api_instance.get_account_by_address(address) pprint(api_response) except ApiException as e: - print("Exception when calling AccountsApi->accounts_address_get: %s\n" % e) + print("Exception when calling AccountsApi->get_account_by_address: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/docs/AddressResponse.md b/src/zarban/service/docs/AddressResponse.md new file mode 100644 index 0000000..89640a8 --- /dev/null +++ b/src/zarban/service/docs/AddressResponse.md @@ -0,0 +1,10 @@ +# AddressResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Address]**](Address.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/AddressesApi.md b/src/zarban/service/docs/AddressesApi.md index 04b43c5..38e5c48 100644 --- a/src/zarban/service/docs/AddressesApi.md +++ b/src/zarban/service/docs/AddressesApi.md @@ -1,14 +1,14 @@ -# openapi_client.AddressesApi +# zarban.service.openapi_client.AddressesApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**addresses_get**](AddressesApi.md#addresses_get) | **GET** /addresses | Get all addresses +[**get_all_addresses**](AddressesApi.md#get_all_addresses) | **GET** /v2/addresses | Get all addresses -# **addresses_get** -> list[Address] addresses_get(format=format) +# **get_all_addresses** +> AddressResponse get_all_addresses(format=format) Get all addresses @@ -19,28 +19,28 @@ All addresses knows to Zarban. ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.AddressesApi(api_client) + api_instance = zarban.service.openapi_client.AddressesApi(api_client) format = 'format_example' # str | The type of addresses to return (optional) try: # Get all addresses - api_response = api_instance.addresses_get(format=format) + api_response = api_instance.get_all_addresses(format=format) pprint(api_response) except ApiException as e: - print("Exception when calling AddressesApi->addresses_get: %s\n" % e) + print("Exception when calling AddressesApi->get_all_addresses: %s\n" % e) ``` ### Parameters @@ -51,7 +51,7 @@ Name | Type | Description | Notes ### Return type -[**list[Address]**](Address.md) +[**AddressResponse**](AddressResponse.md) ### Authorization diff --git a/src/zarban/service/docs/BorrowsApi.md b/src/zarban/service/docs/BorrowsApi.md index 7427148..58b94f1 100644 --- a/src/zarban/service/docs/BorrowsApi.md +++ b/src/zarban/service/docs/BorrowsApi.md @@ -1,14 +1,14 @@ -# openapi_client.BorrowsApi +# zarban.service.openapi_client.BorrowsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**lendingpool_borrows_get**](BorrowsApi.md#lendingpool_borrows_get) | **GET** /lendingpool/borrows | Get user borrows of lendingpool +[**get_user_borrows**](BorrowsApi.md#get_user_borrows) | **GET** /v2/lendingpool/borrows | Get user borrows of lendingpool -# **lendingpool_borrows_get** -> list[LendingpoolBorrow] lendingpool_borrows_get(user=user, reserve=reserve, cursor=cursor, limit=limit) +# **get_user_borrows** +> UserBorrowsResponse get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit) Get user borrows of lendingpool @@ -19,20 +19,20 @@ Get user borrows of lendingpool ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.BorrowsApi(api_client) + api_instance = zarban.service.openapi_client.BorrowsApi(api_client) user = 'user_example' # str | Ethereum address of the user (optional) reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) cursor = 56 # int | Cursor for pagination (optional) @@ -40,10 +40,10 @@ limit = 50 # int | Limit the number of deposits returned (default is 50) (option try: # Get user borrows of lendingpool - api_response = api_instance.lendingpool_borrows_get(user=user, reserve=reserve, cursor=cursor, limit=limit) + api_response = api_instance.get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling BorrowsApi->lendingpool_borrows_get: %s\n" % e) + print("Exception when calling BorrowsApi->get_user_borrows: %s\n" % e) ``` ### Parameters @@ -57,7 +57,7 @@ Name | Type | Description | Notes ### Return type -[**list[LendingpoolBorrow]**](LendingpoolBorrow.md) +[**UserBorrowsResponse**](UserBorrowsResponse.md) ### Authorization diff --git a/src/zarban/service/docs/ChainActivityStep.md b/src/zarban/service/docs/ChainActivityStep.md index f204630..b25eeff 100644 --- a/src/zarban/service/docs/ChainActivityStep.md +++ b/src/zarban/service/docs/ChainActivityStep.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | -**data** | [**OneOfPreparedTxEIP712SignRequestPersonalSignRequest**](OneOfPreparedTxEIP712SignRequestPersonalSignRequest.md) | | +**data** | [**ChainActivityStepData**](ChainActivityStepData.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/ChainActivityStepData.md b/src/zarban/service/docs/ChainActivityStepData.md new file mode 100644 index 0000000..57e5326 --- /dev/null +++ b/src/zarban/service/docs/ChainActivityStepData.md @@ -0,0 +1,18 @@ +# ChainActivityStepData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**label** | **dict(str, str)** | | +**gas_use_estimate** | **int** | | +**gas_fee_estimate** | **dict(str, str)** | | +**method_parameters** | [**MethodParameters**](MethodParameters.md) | | +**name** | **str** | The name of the EIP712 signature | +**typed_data** | [**TypedData**](TypedData.md) | | +**hash** | **str** | The hash of the EIP712 signature that needs to be signed | +**message** | **str** | The message that needs to be signed | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/CollectorApi.md b/src/zarban/service/docs/CollectorApi.md index 0fa5aa2..ec86247 100644 --- a/src/zarban/service/docs/CollectorApi.md +++ b/src/zarban/service/docs/CollectorApi.md @@ -1,14 +1,14 @@ -# openapi_client.CollectorApi +# zarban.service.openapi_client.CollectorApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**stats_get**](CollectorApi.md#stats_get) | **GET** /stats | Get collector data +[**get_collector_data**](CollectorApi.md#get_collector_data) | **GET** /v2/stats | Get collector data -# **stats_get** -> Stats stats_get() +# **get_collector_data** +> Stats get_collector_data() Get collector data @@ -19,27 +19,27 @@ Get collector data ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.CollectorApi(api_client) + api_instance = zarban.service.openapi_client.CollectorApi(api_client) try: # Get collector data - api_response = api_instance.stats_get() + api_response = api_instance.get_collector_data() pprint(api_response) except ApiException as e: - print("Exception when calling CollectorApi->stats_get: %s\n" % e) + print("Exception when calling CollectorApi->get_collector_data: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/docs/DepositsApi.md b/src/zarban/service/docs/DepositsApi.md index 4ad6c47..e15b33b 100644 --- a/src/zarban/service/docs/DepositsApi.md +++ b/src/zarban/service/docs/DepositsApi.md @@ -1,14 +1,14 @@ -# openapi_client.DepositsApi +# zarban.service.openapi_client.DepositsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**lendingpool_deposits_get**](DepositsApi.md#lendingpool_deposits_get) | **GET** /lendingpool/deposits | Get user deposits of Lendingpool +[**get_user_deposits**](DepositsApi.md#get_user_deposits) | **GET** /v2/lendingpool/deposits | Get user deposits of Lendingpool -# **lendingpool_deposits_get** -> list[LendingpoolDeposit] lendingpool_deposits_get(user=user, reserve=reserve, cursor=cursor, limit=limit) +# **get_user_deposits** +> UserDepositsResponse get_user_deposits(user=user, reserve=reserve, cursor=cursor, limit=limit) Get user deposits of Lendingpool @@ -19,20 +19,20 @@ Get user deposits of Lendingpool ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.DepositsApi(api_client) + api_instance = zarban.service.openapi_client.DepositsApi(api_client) user = 'user_example' # str | Ethereum address of the user (optional) reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) cursor = 56 # int | Cursor for pagination (optional) @@ -40,10 +40,10 @@ limit = 50 # int | Limit the number of deposits returned (default is 50) (option try: # Get user deposits of Lendingpool - api_response = api_instance.lendingpool_deposits_get(user=user, reserve=reserve, cursor=cursor, limit=limit) + api_response = api_instance.get_user_deposits(user=user, reserve=reserve, cursor=cursor, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling DepositsApi->lendingpool_deposits_get: %s\n" % e) + print("Exception when calling DepositsApi->get_user_deposits: %s\n" % e) ``` ### Parameters @@ -57,7 +57,7 @@ Name | Type | Description | Notes ### Return type -[**list[LendingpoolDeposit]**](LendingpoolDeposit.md) +[**UserDepositsResponse**](UserDepositsResponse.md) ### Authorization diff --git a/src/zarban/service/docs/Error.md b/src/zarban/service/docs/Error.md index 8149b1d..01ae5b6 100644 --- a/src/zarban/service/docs/Error.md +++ b/src/zarban/service/docs/Error.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **msg** | **str** | Error message | -**reasons** | **list[str]** | | [optional] +**reasons** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/UserErrorMessages.md b/src/zarban/service/docs/ErrorMessage.md similarity index 83% rename from src/zarban/wallet/docs/UserErrorMessages.md rename to src/zarban/service/docs/ErrorMessage.md index 9b67d6f..d6c5952 100644 --- a/src/zarban/wallet/docs/UserErrorMessages.md +++ b/src/zarban/service/docs/ErrorMessage.md @@ -1,10 +1,10 @@ -# UserErrorMessages +# ErrorMessage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_message** | **str** | User-friendly error message | -**solutions** | **list[str]** | | [optional] +**solutions** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/InlineObject3.md b/src/zarban/service/docs/EventDetailsResponse.md similarity index 81% rename from src/zarban/wallet/docs/InlineObject3.md rename to src/zarban/service/docs/EventDetailsResponse.md index 4dc413c..00abcba 100644 --- a/src/zarban/wallet/docs/InlineObject3.md +++ b/src/zarban/service/docs/EventDetailsResponse.md @@ -1,9 +1,9 @@ -# InlineObject3 +# EventDetailsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nickname** | **str** | The nickname to add | +**data** | [**list[Log]**](Log.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/EventsApi.md b/src/zarban/service/docs/EventsApi.md deleted file mode 100644 index 9251623..0000000 --- a/src/zarban/service/docs/EventsApi.md +++ /dev/null @@ -1,85 +0,0 @@ -# openapi_client.EventsApi - -All URIs are relative to *https://api.zarban.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**events_get**](EventsApi.md#events_get) | **GET** /events | Ordered list events based on query parameters - - -# **events_get** -> list[ExtendedEvent] events_get(domain, type, name, id=id, cursor=cursor, limit=limit, order=order) - -Ordered list events based on query parameters - -Retrieve a list of events based on specified query parameters - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://api.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.EventsApi(api_client) - domain = openapi_client.EventDomain() # EventDomain | -type = openapi_client.EventType() # EventType | Type of the event -name = openapi_client.EventName() # EventName | -id = 56 # int | ID of the event (optional) -cursor = 56 # int | Cursor for pagination (optional) -limit = 56 # int | Maximum number of records to retrieve. Defaults to 50 if not provided. (optional) -order = 'desc' # str | Order of the events. Default is desc. (optional) - - try: - # Ordered list events based on query parameters - api_response = api_instance.events_get(domain, type, name, id=id, cursor=cursor, limit=limit, order=order) - pprint(api_response) - except ApiException as e: - print("Exception when calling EventsApi->events_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **domain** | [**EventDomain**](.md)| | - **type** | [**EventType**](.md)| Type of the event | - **name** | [**EventName**](.md)| | - **id** | **int**| ID of the event | [optional] - **cursor** | **int**| Cursor for pagination | [optional] - **limit** | **int**| Maximum number of records to retrieve. Defaults to 50 if not provided. | [optional] - **order** | **str**| Order of the events. Default is desc. | [optional] - -### Return type - -[**list[ExtendedEvent]**](ExtendedEvent.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful response | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - diff --git a/src/zarban/service/docs/ExtendedEvent.md b/src/zarban/service/docs/ExtendedEvent.md index 2232464..b78420d 100644 --- a/src/zarban/service/docs/ExtendedEvent.md +++ b/src/zarban/service/docs/ExtendedEvent.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**domain** | [**EventDomain**](EventDomain.md) | | **id** | **int** | Identifier for the event. | **name** | [**EventName**](EventName.md) | | -**type** | [**EventType**](EventType.md) | | -**domain** | [**EventDomain**](EventDomain.md) | | **raw** | [**Log**](Log.md) | | -**payload** | [**OneOfVaultEventLendingpoolDepositEventLendingpoolWithdrawEventLendingpoolRepayEventLendingpoolLiquidationCallEventLendingpoolFlashLoanEventMedianEvent**](OneOfVaultEventLendingpoolDepositEventLendingpoolWithdrawEventLendingpoolRepayEventLendingpoolLiquidationCallEventLendingpoolFlashLoanEventMedianEvent.md) | The event payload. | +**type** | [**EventType**](EventType.md) | | +**payload** | **dict(str, object)** | The payload of the event. The payload is a JSON-marshalled | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/ExtendedEventAllOf.md b/src/zarban/service/docs/ExtendedEventAllOf.md deleted file mode 100644 index aeba740..0000000 --- a/src/zarban/service/docs/ExtendedEventAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ExtendedEventAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payload** | [**OneOfVaultEventLendingpoolDepositEventLendingpoolWithdrawEventLendingpoolRepayEventLendingpoolLiquidationCallEventLendingpoolFlashLoanEventMedianEvent**](OneOfVaultEventLendingpoolDepositEventLendingpoolWithdrawEventLendingpoolRepayEventLendingpoolLiquidationCallEventLendingpoolFlashLoanEventMedianEvent.md) | The event payload. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/File.md b/src/zarban/service/docs/File.md deleted file mode 100644 index fd02195..0000000 --- a/src/zarban/service/docs/File.md +++ /dev/null @@ -1,16 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | The file's ID | -**time** | **str** | The time the file was created | -**where** | **str** | The file's location or source | -**ilk** | **str** | The file's ilk | [optional] -**what** | **str** | The file's description or purpose | -**data** | **str** | The file's data | -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/IlksApi.md b/src/zarban/service/docs/IlksApi.md index 87e9056..7673f10 100644 --- a/src/zarban/service/docs/IlksApi.md +++ b/src/zarban/service/docs/IlksApi.md @@ -1,15 +1,15 @@ -# openapi_client.IlksApi +# zarban.service.openapi_client.IlksApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ilks_get**](IlksApi.md#ilks_get) | **GET** /ilks | Get all Ilks -[**ilks_name_get**](IlksApi.md#ilks_name_get) | **GET** /ilks/{name} | Get Ilk by name +[**get_all_ilks**](IlksApi.md#get_all_ilks) | **GET** /v2/ilks | Get all Ilks +[**get_ilk_by_name**](IlksApi.md#get_ilk_by_name) | **GET** /v2/ilks/{name} | Get Ilk by name -# **ilks_get** -> list[Ilk] ilks_get() +# **get_all_ilks** +> IlksResponse get_all_ilks() Get all Ilks @@ -20,27 +20,27 @@ Retrieve a list of all available ilks. ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.IlksApi(api_client) + api_instance = zarban.service.openapi_client.IlksApi(api_client) try: # Get all Ilks - api_response = api_instance.ilks_get() + api_response = api_instance.get_all_ilks() pprint(api_response) except ApiException as e: - print("Exception when calling IlksApi->ilks_get: %s\n" % e) + print("Exception when calling IlksApi->get_all_ilks: %s\n" % e) ``` ### Parameters @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**list[Ilk]**](Ilk.md) +[**IlksResponse**](IlksResponse.md) ### Authorization @@ -67,8 +67,8 @@ 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) -# **ilks_name_get** -> Ilk ilks_name_get(name) +# **get_ilk_by_name** +> Ilk get_ilk_by_name(name) Get Ilk by name @@ -79,28 +79,28 @@ Retrieve an Ilk by providing its name. ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.IlksApi(api_client) + api_instance = zarban.service.openapi_client.IlksApi(api_client) name = 'name_example' # str | Name of the ILK try: # Get Ilk by name - api_response = api_instance.ilks_name_get(name) + api_response = api_instance.get_ilk_by_name(name) pprint(api_response) except ApiException as e: - print("Exception when calling IlksApi->ilks_name_get: %s\n" % e) + print("Exception when calling IlksApi->get_ilk_by_name: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/docs/IlksResponse.md b/src/zarban/service/docs/IlksResponse.md new file mode 100644 index 0000000..4872284 --- /dev/null +++ b/src/zarban/service/docs/IlksResponse.md @@ -0,0 +1,10 @@ +# IlksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Ilk]**](Ilk.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/LendingPoolApi.md b/src/zarban/service/docs/LendingPoolApi.md index 7b57683..2d48814 100644 --- a/src/zarban/service/docs/LendingPoolApi.md +++ b/src/zarban/service/docs/LendingPoolApi.md @@ -1,71 +1,64 @@ -# openapi_client.LendingPoolApi +# zarban.service.openapi_client.LendingPoolApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**lendingpool_borrows_get**](LendingPoolApi.md#lendingpool_borrows_get) | **GET** /lendingpool/borrows | Get user borrows of lendingpool -[**lendingpool_deposits_get**](LendingPoolApi.md#lendingpool_deposits_get) | **GET** /lendingpool/deposits | Get user deposits of Lendingpool -[**lendingpool_overview_get**](LendingPoolApi.md#lendingpool_overview_get) | **GET** /lendingpool/overview | Get lending pool overview -[**lendingpool_reserves_get**](LendingPoolApi.md#lendingpool_reserves_get) | **GET** /lendingpool/reserves | Fetch Reserve Data By Asset -[**lendingpool_tx_borrow_post**](LendingPoolApi.md#lendingpool_tx_borrow_post) | **POST** /lendingpool/tx/borrow | Borrow from lending pool -[**lendingpool_tx_deposit_post**](LendingPoolApi.md#lendingpool_tx_deposit_post) | **POST** /lendingpool/tx/deposit | Deposit to lending pool -[**lendingpool_tx_repay_post**](LendingPoolApi.md#lendingpool_tx_repay_post) | **POST** /lendingpool/tx/repay | Repay to lending pool -[**lendingpool_tx_useassetascollateral_post**](LendingPoolApi.md#lendingpool_tx_useassetascollateral_post) | **POST** /lendingpool/tx/useassetascollateral | Enable/Disable asset as collateral -[**lendingpool_tx_withdraw_post**](LendingPoolApi.md#lendingpool_tx_withdraw_post) | **POST** /lendingpool/tx/withdraw | Withdraw from lending pool +[**create_lending_pool_borrow**](LendingPoolApi.md#create_lending_pool_borrow) | **POST** /v2/lendingpool/tx/borrow | Borrow from lending pool +[**create_lending_pool_deposit**](LendingPoolApi.md#create_lending_pool_deposit) | **POST** /v2/lendingpool/tx/deposit | Deposit to lending pool +[**create_lending_pool_repay**](LendingPoolApi.md#create_lending_pool_repay) | **POST** /v2/lendingpool/tx/repay | Repay to lending pool +[**create_lending_pool_withdraw**](LendingPoolApi.md#create_lending_pool_withdraw) | **POST** /v2/lendingpool/tx/withdraw | Withdraw from lending pool +[**fetch_reserve_data_by_asset**](LendingPoolApi.md#fetch_reserve_data_by_asset) | **GET** /v2/lendingpool/reserves | Fetch Reserve Data By Asset +[**get_user_borrows**](LendingPoolApi.md#get_user_borrows) | **GET** /v2/lendingpool/borrows | Get user borrows of lendingpool +[**get_user_deposits**](LendingPoolApi.md#get_user_deposits) | **GET** /v2/lendingpool/deposits | Get user deposits of Lendingpool +[**set_lending_pool_asset_collateral**](LendingPoolApi.md#set_lending_pool_asset_collateral) | **POST** /v2/lendingpool/tx/useassetascollateral | Enable/Disable asset as collateral -# **lendingpool_borrows_get** -> list[LendingpoolBorrow] lendingpool_borrows_get(user=user, reserve=reserve, cursor=cursor, limit=limit) +# **create_lending_pool_borrow** +> LendingpoolBorrowTxResponse create_lending_pool_borrow(lendingpool_borrow_tx_request) -Get user borrows of lendingpool +Borrow from lending pool -Get user borrows of lendingpool +Borrow from lending pool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - user = 'user_example' # str | Ethereum address of the user (optional) -reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) -cursor = 56 # int | Cursor for pagination (optional) -limit = 50 # int | Limit the number of deposits returned (default is 50) (optional) (default to 50) + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + lendingpool_borrow_tx_request = zarban.service.openapi_client.LendingpoolBorrowTxRequest() # LendingpoolBorrowTxRequest | Borrow transaction request, if amount is not provided, it will be calculated based on the token balance try: - # Get user borrows of lendingpool - api_response = api_instance.lendingpool_borrows_get(user=user, reserve=reserve, cursor=cursor, limit=limit) + # Borrow from lending pool + api_response = api_instance.create_lending_pool_borrow(lendingpool_borrow_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_borrows_get: %s\n" % e) + print("Exception when calling LendingPoolApi->create_lending_pool_borrow: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Ethereum address of the user | [optional] - **reserve** | **str**| Ethereum address of the reserve | [optional] - **cursor** | **int**| Cursor for pagination | [optional] - **limit** | **int**| Limit the number of deposits returned (default is 50) | [optional] [default to 50] + **lendingpool_borrow_tx_request** | [**LendingpoolBorrowTxRequest**](LendingpoolBorrowTxRequest.md)| Borrow transaction request, if amount is not provided, it will be calculated based on the token balance | ### Return type -[**list[LendingpoolBorrow]**](LendingpoolBorrow.md) +[**LendingpoolBorrowTxResponse**](LendingpoolBorrowTxResponse.md) ### Authorization @@ -73,69 +66,63 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List of user borrows | - | +**200** | Successful response | - | **400** | Bad request | - | **500** | Internal server 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) -# **lendingpool_deposits_get** -> list[LendingpoolDeposit] lendingpool_deposits_get(user=user, reserve=reserve, cursor=cursor, limit=limit) +# **create_lending_pool_deposit** +> LendingpoolDepositTxResponse create_lending_pool_deposit(lendingpool_deposit_tx_request) -Get user deposits of Lendingpool +Deposit to lending pool -Get user deposits of Lendingpool +Deposit to lending pool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - user = 'user_example' # str | Ethereum address of the user (optional) -reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) -cursor = 56 # int | Cursor for pagination (optional) -limit = 50 # int | Limit the number of deposits returned (default is 50) (optional) (default to 50) + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + lendingpool_deposit_tx_request = zarban.service.openapi_client.LendingpoolDepositTxRequest() # LendingpoolDepositTxRequest | Deposit transaction request, if amount is not provided, it will be calculated based on the token balance try: - # Get user deposits of Lendingpool - api_response = api_instance.lendingpool_deposits_get(user=user, reserve=reserve, cursor=cursor, limit=limit) + # Deposit to lending pool + api_response = api_instance.create_lending_pool_deposit(lendingpool_deposit_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_deposits_get: %s\n" % e) + print("Exception when calling LendingPoolApi->create_lending_pool_deposit: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Ethereum address of the user | [optional] - **reserve** | **str**| Ethereum address of the reserve | [optional] - **cursor** | **int**| Cursor for pagination | [optional] - **limit** | **int**| Limit the number of deposits returned (default is 50) | [optional] [default to 50] + **lendingpool_deposit_tx_request** | [**LendingpoolDepositTxRequest**](LendingpoolDepositTxRequest.md)| Deposit transaction request, if amount is not provided, it will be calculated based on the token balance | ### Return type -[**list[LendingpoolDeposit]**](LendingpoolDeposit.md) +[**LendingpoolDepositTxResponse**](LendingpoolDepositTxResponse.md) ### Authorization @@ -143,121 +130,63 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List of user deposits | - | +**200** | Successful response | - | **400** | Bad request | - | **500** | Internal server 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) -# **lendingpool_overview_get** -> object lendingpool_overview_get() +# **create_lending_pool_repay** +> LendingpoolRepayTxResponse create_lending_pool_repay(lendingpool_repay_tx_request) -Get lending pool overview - -Get lending pool overview - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://api.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - - try: - # Get lending pool overview - api_response = api_instance.lendingpool_overview_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_overview_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A JSON object with lending pool overview | - | - -[[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) - -# **lendingpool_reserves_get** -> FormattedReserveData lendingpool_reserves_get(asset=asset) - -Fetch Reserve Data By Asset +Repay to lending pool -Retrieve data of reserves +Repay to lending pool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - asset = 'asset_example' # str | The asset address in hexadecimal format. (optional) + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + lendingpool_repay_tx_request = zarban.service.openapi_client.LendingpoolRepayTxRequest() # LendingpoolRepayTxRequest | Repay transaction request, if amount is not provided, it will repay the maximum possible amount try: - # Fetch Reserve Data By Asset - api_response = api_instance.lendingpool_reserves_get(asset=asset) + # Repay to lending pool + api_response = api_instance.create_lending_pool_repay(lendingpool_repay_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_reserves_get: %s\n" % e) + print("Exception when calling LendingPoolApi->create_lending_pool_repay: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **asset** | **str**| The asset address in hexadecimal format. | [optional] + **lendingpool_repay_tx_request** | [**LendingpoolRepayTxRequest**](LendingpoolRepayTxRequest.md)| Repay transaction request, if amount is not provided, it will repay the maximum possible amount | ### Return type -[**FormattedReserveData**](FormattedReserveData.md) +[**LendingpoolRepayTxResponse**](LendingpoolRepayTxResponse.md) ### Authorization @@ -265,63 +194,63 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response. | - | -**400** | Bad request (e.g. invalid asset address). | - | -**500** | Internal Server Error. | - | +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) -# **lendingpool_tx_borrow_post** -> InlineResponse200 lendingpool_tx_borrow_post(lendingpool_borrow_tx_request) +# **create_lending_pool_withdraw** +> LendingpoolWithdrawTxResponse create_lending_pool_withdraw(lendingpool_withdraw_tx_request) -Borrow from lending pool +Withdraw from lending pool -Borrow from lending pool +Withdraw from lending pool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - lendingpool_borrow_tx_request = openapi_client.LendingpoolBorrowTxRequest() # LendingpoolBorrowTxRequest | Borrow transaction request, if amount is not provided, it will be calculated based on the token balance + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + lendingpool_withdraw_tx_request = zarban.service.openapi_client.LendingpoolWithdrawTxRequest() # LendingpoolWithdrawTxRequest | Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status try: - # Borrow from lending pool - api_response = api_instance.lendingpool_tx_borrow_post(lendingpool_borrow_tx_request) + # Withdraw from lending pool + api_response = api_instance.create_lending_pool_withdraw(lendingpool_withdraw_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_tx_borrow_post: %s\n" % e) + print("Exception when calling LendingPoolApi->create_lending_pool_withdraw: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lendingpool_borrow_tx_request** | [**LendingpoolBorrowTxRequest**](LendingpoolBorrowTxRequest.md)| Borrow transaction request, if amount is not provided, it will be calculated based on the token balance | + **lendingpool_withdraw_tx_request** | [**LendingpoolWithdrawTxRequest**](LendingpoolWithdrawTxRequest.md)| Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status | ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**LendingpoolWithdrawTxResponse**](LendingpoolWithdrawTxResponse.md) ### Authorization @@ -341,51 +270,51 @@ 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) -# **lendingpool_tx_deposit_post** -> InlineResponse200 lendingpool_tx_deposit_post(lendingpool_deposit_tx_request) +# **fetch_reserve_data_by_asset** +> FormattedReserveData fetch_reserve_data_by_asset(asset=asset) -Deposit to lending pool +Fetch Reserve Data By Asset -Deposit to lending pool +Retrieve data of reserves ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - lendingpool_deposit_tx_request = openapi_client.LendingpoolDepositTxRequest() # LendingpoolDepositTxRequest | Deposit transaction request, if amount is not provided, it will be calculated based on the token balance + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + asset = 'asset_example' # str | The asset address in hexadecimal format. (optional) try: - # Deposit to lending pool - api_response = api_instance.lendingpool_tx_deposit_post(lendingpool_deposit_tx_request) + # Fetch Reserve Data By Asset + api_response = api_instance.fetch_reserve_data_by_asset(asset=asset) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_tx_deposit_post: %s\n" % e) + print("Exception when calling LendingPoolApi->fetch_reserve_data_by_asset: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lendingpool_deposit_tx_request** | [**LendingpoolDepositTxRequest**](LendingpoolDepositTxRequest.md)| Deposit transaction request, if amount is not provided, it will be calculated based on the token balance | + **asset** | **str**| The asset address in hexadecimal format. | [optional] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**FormattedReserveData**](FormattedReserveData.md) ### Authorization @@ -393,63 +322,69 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response | - | -**400** | Bad request | - | -**500** | Internal server error | - | +**200** | Successful response. | - | +**400** | Bad request (e.g. invalid asset address). | - | +**500** | Internal Server 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) -# **lendingpool_tx_repay_post** -> InlineResponse200 lendingpool_tx_repay_post(lendingpool_repay_tx_request) +# **get_user_borrows** +> UserBorrowsResponse get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit) -Repay to lending pool +Get user borrows of lendingpool -Repay to lending pool +Get user borrows of lendingpool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - lendingpool_repay_tx_request = openapi_client.LendingpoolRepayTxRequest() # LendingpoolRepayTxRequest | Repay transaction request, if amount is not provided, it will repay the maximum possible amount + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + user = 'user_example' # str | Ethereum address of the user (optional) +reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) +cursor = 56 # int | Cursor for pagination (optional) +limit = 50 # int | Limit the number of deposits returned (default is 50) (optional) (default to 50) try: - # Repay to lending pool - api_response = api_instance.lendingpool_tx_repay_post(lendingpool_repay_tx_request) + # Get user borrows of lendingpool + api_response = api_instance.get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_tx_repay_post: %s\n" % e) + print("Exception when calling LendingPoolApi->get_user_borrows: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lendingpool_repay_tx_request** | [**LendingpoolRepayTxRequest**](LendingpoolRepayTxRequest.md)| Repay transaction request, if amount is not provided, it will repay the maximum possible amount | + **user** | **str**| Ethereum address of the user | [optional] + **reserve** | **str**| Ethereum address of the reserve | [optional] + **cursor** | **int**| Cursor for pagination | [optional] + **limit** | **int**| Limit the number of deposits returned (default is 50) | [optional] [default to 50] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**UserBorrowsResponse**](UserBorrowsResponse.md) ### Authorization @@ -457,63 +392,69 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response | - | +**200** | List of user borrows | - | **400** | Bad request | - | **500** | Internal server 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) -# **lendingpool_tx_useassetascollateral_post** -> InlineResponse200 lendingpool_tx_useassetascollateral_post(lendingpool_use_asset_as_collateral_tx_request) +# **get_user_deposits** +> UserDepositsResponse get_user_deposits(user=user, reserve=reserve, cursor=cursor, limit=limit) -Enable/Disable asset as collateral +Get user deposits of Lendingpool -Allows to enable/disable a specific asset as collateral +Get user deposits of Lendingpool ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - lendingpool_use_asset_as_collateral_tx_request = openapi_client.LendingpoolUseAssetAsCollateralTxRequest() # LendingpoolUseAssetAsCollateralTxRequest | UseAssetAsCollateral transaction request + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + user = 'user_example' # str | Ethereum address of the user (optional) +reserve = 'reserve_example' # str | Ethereum address of the reserve (optional) +cursor = 56 # int | Cursor for pagination (optional) +limit = 50 # int | Limit the number of deposits returned (default is 50) (optional) (default to 50) try: - # Enable/Disable asset as collateral - api_response = api_instance.lendingpool_tx_useassetascollateral_post(lendingpool_use_asset_as_collateral_tx_request) + # Get user deposits of Lendingpool + api_response = api_instance.get_user_deposits(user=user, reserve=reserve, cursor=cursor, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_tx_useassetascollateral_post: %s\n" % e) + print("Exception when calling LendingPoolApi->get_user_deposits: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lendingpool_use_asset_as_collateral_tx_request** | [**LendingpoolUseAssetAsCollateralTxRequest**](LendingpoolUseAssetAsCollateralTxRequest.md)| UseAssetAsCollateral transaction request | + **user** | **str**| Ethereum address of the user | [optional] + **reserve** | **str**| Ethereum address of the reserve | [optional] + **cursor** | **int**| Cursor for pagination | [optional] + **limit** | **int**| Limit the number of deposits returned (default is 50) | [optional] [default to 50] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**UserDepositsResponse**](UserDepositsResponse.md) ### Authorization @@ -521,63 +462,63 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response | - | +**200** | List of user deposits | - | **400** | Bad request | - | **500** | Internal server 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) -# **lendingpool_tx_withdraw_post** -> InlineResponse200 lendingpool_tx_withdraw_post(lendingpool_withdraw_tx_request) +# **set_lending_pool_asset_collateral** +> LendingpoolUseAssetAsCollateralTxResponse set_lending_pool_asset_collateral(lendingpool_use_asset_as_collateral_tx_request) -Withdraw from lending pool +Enable/Disable asset as collateral -Withdraw from lending pool +Allows to enable/disable a specific asset as collateral ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.LendingPoolApi(api_client) - lendingpool_withdraw_tx_request = openapi_client.LendingpoolWithdrawTxRequest() # LendingpoolWithdrawTxRequest | Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status + api_instance = zarban.service.openapi_client.LendingPoolApi(api_client) + lendingpool_use_asset_as_collateral_tx_request = zarban.service.openapi_client.LendingpoolUseAssetAsCollateralTxRequest() # LendingpoolUseAssetAsCollateralTxRequest | UseAssetAsCollateral transaction request try: - # Withdraw from lending pool - api_response = api_instance.lendingpool_tx_withdraw_post(lendingpool_withdraw_tx_request) + # Enable/Disable asset as collateral + api_response = api_instance.set_lending_pool_asset_collateral(lendingpool_use_asset_as_collateral_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling LendingPoolApi->lendingpool_tx_withdraw_post: %s\n" % e) + print("Exception when calling LendingPoolApi->set_lending_pool_asset_collateral: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lendingpool_withdraw_tx_request** | [**LendingpoolWithdrawTxRequest**](LendingpoolWithdrawTxRequest.md)| Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status | + **lendingpool_use_asset_as_collateral_tx_request** | [**LendingpoolUseAssetAsCollateralTxRequest**](LendingpoolUseAssetAsCollateralTxRequest.md)| UseAssetAsCollateral transaction request | ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**LendingpoolUseAssetAsCollateralTxResponse**](LendingpoolUseAssetAsCollateralTxResponse.md) ### Authorization diff --git a/src/zarban/service/docs/LendingpoolBorrowEvent.md b/src/zarban/service/docs/LendingpoolBorrowEvent.md deleted file mode 100644 index acfcb2d..0000000 --- a/src/zarban/service/docs/LendingpoolBorrowEvent.md +++ /dev/null @@ -1,18 +0,0 @@ -# LendingpoolBorrowEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the borrow event. | -**reserve** | **str** | Ethereum address of the reserve from which the amount was borrowed. | -**user** | **str** | Ethereum address of the user who borrowed. | -**on_behalf_of** | **str** | Ethereum address of the entity on whose behalf the borrowing occurred. | [optional] -**amount** | **str** | The borrowed amount. | -**borrow_rate_mode** | **str** | The mode of borrowing rate (e.g., stable, variable). | -**borrow_rate** | **str** | The interest rate for the borrowed amount. | -**referral** | **int** | Referral code or identifier. | [optional] -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/AuthMatrix.md b/src/zarban/service/docs/LendingpoolBorrowTxResponse.md similarity index 67% rename from src/zarban/service/docs/AuthMatrix.md rename to src/zarban/service/docs/LendingpoolBorrowTxResponse.md index 33d3d25..fdf4686 100644 --- a/src/zarban/service/docs/AuthMatrix.md +++ b/src/zarban/service/docs/LendingpoolBorrowTxResponse.md @@ -1,11 +1,10 @@ -# AuthMatrix +# LendingpoolBorrowTxResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**wheres** | [**list[Address]**](Address.md) | | -**whos** | [**list[Address]**](Address.md) | | -**values** | **list[list[int]]** | | +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] +**response** | [**LendingpoolTxResponse**](LendingpoolTxResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/LendingpoolDepositEvent.md b/src/zarban/service/docs/LendingpoolDepositEvent.md deleted file mode 100644 index 525c315..0000000 --- a/src/zarban/service/docs/LendingpoolDepositEvent.md +++ /dev/null @@ -1,16 +0,0 @@ -# LendingpoolDepositEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the deposit event. | -**reserve** | **str** | Ethereum address of the reserve where the deposit was made. | -**user** | **str** | Ethereum address of the user who made the deposit. | -**on_behalf_of** | **str** | Ethereum address of the entity on whose behalf the deposit was made. | -**amount** | **str** | The deposited amount. | -**referral** | **int** | Referral code or identifier. | [optional] -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2005.md b/src/zarban/service/docs/LendingpoolDepositTxResponse.md similarity index 63% rename from src/zarban/wallet/docs/InlineResponse2005.md rename to src/zarban/service/docs/LendingpoolDepositTxResponse.md index dedfef1..6d736fb 100644 --- a/src/zarban/wallet/docs/InlineResponse2005.md +++ b/src/zarban/service/docs/LendingpoolDepositTxResponse.md @@ -1,9 +1,10 @@ -# InlineResponse2005 +# LendingpoolDepositTxResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**schema** | [**WithdrawRequestPreview**](WithdrawRequestPreview.md) | | [optional] +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] +**response** | [**LendingpoolTxResponse**](LendingpoolTxResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/LendingpoolFlashLoanEvent.md b/src/zarban/service/docs/LendingpoolFlashLoanEvent.md deleted file mode 100644 index 3d58b33..0000000 --- a/src/zarban/service/docs/LendingpoolFlashLoanEvent.md +++ /dev/null @@ -1,17 +0,0 @@ -# LendingpoolFlashLoanEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the flash loan event. | -**target** | **str** | Ethereum address of the target involved in the flash loan. | -**initiator** | **str** | Ethereum address of the initiator who triggered the flash loan. | -**asset** | **str** | Ethereum address of the asset used in the flash loan. | -**amount** | **str** | The amount involved in the flash loan. | -**premium** | **str** | The premium involved in the flash loan. | -**referral_code** | **int** | Referral code or identifier related to the flash loan. | [optional] -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/LendingpoolLiquidationCallEvent.md b/src/zarban/service/docs/LendingpoolLiquidationCallEvent.md deleted file mode 100644 index 3556edf..0000000 --- a/src/zarban/service/docs/LendingpoolLiquidationCallEvent.md +++ /dev/null @@ -1,18 +0,0 @@ -# LendingpoolLiquidationCallEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the liquidation call event. | -**collateral_asset** | **str** | Ethereum address of the collateral asset involved in the liquidation call. | -**debt_asset** | **str** | Ethereum address of the debt asset involved in the liquidation call. | -**user** | **str** | Ethereum address of the user being liquidated. | -**debt_to_cover** | **str** | The amount of debt to cover during the liquidation. | -**liquidated_collateral_amount** | **str** | The amount of collateral that was liquidated. | -**liquidator** | **str** | Ethereum address of the liquidator who initiated the liquidation. | -**receive_z_token** | **bool** | Indicates if the liquidator chose to receive ZTokens. | -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/LendingpoolRepayEvent.md b/src/zarban/service/docs/LendingpoolRepayEvent.md deleted file mode 100644 index aa53b99..0000000 --- a/src/zarban/service/docs/LendingpoolRepayEvent.md +++ /dev/null @@ -1,15 +0,0 @@ -# LendingpoolRepayEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the repay event. | -**reserve** | **str** | Ethereum address of the reserve related to the repay. | -**user** | **str** | Ethereum address of the user who was repaid. | -**repayer** | **str** | Ethereum address of the entity that made the repay. | -**amount** | **str** | The amount that was repaid. | -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/InlineResponse200.md b/src/zarban/service/docs/LendingpoolRepayTxResponse.md similarity index 93% rename from src/zarban/service/docs/InlineResponse200.md rename to src/zarban/service/docs/LendingpoolRepayTxResponse.md index 63dc238..35c0ad7 100644 --- a/src/zarban/service/docs/InlineResponse200.md +++ b/src/zarban/service/docs/LendingpoolRepayTxResponse.md @@ -1,4 +1,4 @@ -# InlineResponse200 +# LendingpoolRepayTxResponse ## Properties Name | Type | Description | Notes diff --git a/src/zarban/service/docs/LendingpoolStats.md b/src/zarban/service/docs/LendingpoolStats.md index 0c84816..d812d6e 100644 --- a/src/zarban/service/docs/LendingpoolStats.md +++ b/src/zarban/service/docs/LendingpoolStats.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_available** | **dict(str, str)** | | -**total_borrows** | **dict(str, str)** | | -**total_market_size** | **dict(str, str)** | | +**total_available** | **dict** | | +**total_borrows** | **dict** | | +**total_market_size** | **dict** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/LendingpoolUseAssetAsCollateralTxResponse.md b/src/zarban/service/docs/LendingpoolUseAssetAsCollateralTxResponse.md new file mode 100644 index 0000000..13c65cd --- /dev/null +++ b/src/zarban/service/docs/LendingpoolUseAssetAsCollateralTxResponse.md @@ -0,0 +1,11 @@ +# LendingpoolUseAssetAsCollateralTxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] +**response** | [**LendingpoolTxResponse**](LendingpoolTxResponse.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/LendingpoolWithdrawEvent.md b/src/zarban/service/docs/LendingpoolWithdrawEvent.md deleted file mode 100644 index 6f3bae8..0000000 --- a/src/zarban/service/docs/LendingpoolWithdrawEvent.md +++ /dev/null @@ -1,15 +0,0 @@ -# LendingpoolWithdrawEvent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the withdraw event. | -**reserve** | **str** | Ethereum address of the reserve from which funds were withdrawn. | -**user** | **str** | Ethereum address of the user who initiated the withdrawal. | -**to** | **str** | Ethereum address of the recipient. | -**amount** | **str** | The amount that was withdrawn. | -**raw** | [**Log**](Log.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/LendingpoolWithdrawTxResponse.md b/src/zarban/service/docs/LendingpoolWithdrawTxResponse.md new file mode 100644 index 0000000..84ab457 --- /dev/null +++ b/src/zarban/service/docs/LendingpoolWithdrawTxResponse.md @@ -0,0 +1,11 @@ +# LendingpoolWithdrawTxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] +**response** | [**LendingpoolTxResponse**](LendingpoolTxResponse.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/Log.md b/src/zarban/service/docs/Log.md index 3552272..feae298 100644 --- a/src/zarban/service/docs/Log.md +++ b/src/zarban/service/docs/Log.md @@ -3,15 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | The log's ID | +**name** | **str** | The name of the log | +**contract** | **str** | The contract address | **timestamp** | [**Timestamp**](Timestamp.md) | | **address** | **str** | The Ethereum address | -**block_number** | **str** | The block number | +**block_number** | **int** | The block number | **tx_hash** | **str** | The transaction hash | **block_hash** | **str** | The block hash | **index** | **int** | The index | **topics** | **list[str]** | | **data** | **str** | The data of the log | +**decoded** | **dict(str, str)** | The decoded log, if available | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/ProxiesApi.md b/src/zarban/service/docs/LogsApi.md similarity index 51% rename from src/zarban/service/docs/ProxiesApi.md rename to src/zarban/service/docs/LogsApi.md index 3615d98..5951020 100644 --- a/src/zarban/service/docs/ProxiesApi.md +++ b/src/zarban/service/docs/LogsApi.md @@ -1,57 +1,57 @@ -# openapi_client.ProxiesApi +# zarban.service.openapi_client.LogsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**proxies_get**](ProxiesApi.md#proxies_get) | **GET** /proxies | Retrieves proxies owned by a specific owner +[**get_logs_by_transaction_hash**](LogsApi.md#get_logs_by_transaction_hash) | **GET** /v2/logs/{txHash} | Get raw and decoded logs by transaction hash -# **proxies_get** -> list[Proxy] proxies_get(owner) +# **get_logs_by_transaction_hash** +> EventDetailsResponse get_logs_by_transaction_hash(tx_hash) -Retrieves proxies owned by a specific owner +Get raw and decoded logs by transaction hash -Returns a list of proxies filtered by the owner's address. +Get raw and decoded logs by transaction hash ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.ProxiesApi(api_client) - owner = 'owner_example' # str | The Ethereum address of the owner. + api_instance = zarban.service.openapi_client.LogsApi(api_client) + tx_hash = 'tx_hash_example' # str | Transaction hash try: - # Retrieves proxies owned by a specific owner - api_response = api_instance.proxies_get(owner) + # Get raw and decoded logs by transaction hash + api_response = api_instance.get_logs_by_transaction_hash(tx_hash) pprint(api_response) except ApiException as e: - print("Exception when calling ProxiesApi->proxies_get: %s\n" % e) + print("Exception when calling LogsApi->get_logs_by_transaction_hash: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| The Ethereum address of the owner. | + **tx_hash** | **str**| Transaction hash | ### Return type -[**list[Proxy]**](Proxy.md) +[**EventDetailsResponse**](EventDetailsResponse.md) ### Authorization @@ -65,8 +65,10 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A JSON array of proxies | - | +**200** | Event details | - | **400** | Bad request | - | +**404** | Not found | - | +**500** | Internal server 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) diff --git a/src/zarban/service/docs/Order.md b/src/zarban/service/docs/Order.md index 3378bba..39a854b 100644 --- a/src/zarban/service/docs/Order.md +++ b/src/zarban/service/docs/Order.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **order_status** | **str** | | **chain_id** | **int** | | **order_hash** | **str** | | -**order_type** | **str** | | [optional] +**order_type** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/OrderResponse.md b/src/zarban/service/docs/OrderResponse.md new file mode 100644 index 0000000..41d8b10 --- /dev/null +++ b/src/zarban/service/docs/OrderResponse.md @@ -0,0 +1,10 @@ +# OrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Order]**](Order.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/OrdersApi.md b/src/zarban/service/docs/OrdersApi.md index 5cbd51f..4124f7d 100644 --- a/src/zarban/service/docs/OrdersApi.md +++ b/src/zarban/service/docs/OrdersApi.md @@ -1,15 +1,15 @@ -# openapi_client.OrdersApi +# zarban.service.openapi_client.OrdersApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**orders_get**](OrdersApi.md#orders_get) | **GET** /orders | Fetch Unfilled Orders -[**orders_sync_post**](OrdersApi.md#orders_sync_post) | **POST** /orders/sync | Updates Order Entity +[**get_unfilled_orders**](OrdersApi.md#get_unfilled_orders) | **GET** /v2/orders | Fetch Unfilled Orders +[**sync_order**](OrdersApi.md#sync_order) | **POST** /v2/orders/sync | Updates Order Entity -# **orders_get** -> list[Order] orders_get(type=type, hash=hash, status=status, offerer=offerer, filler=filler, decay_start_time=decay_start_time, decay_end_time=decay_end_time, deadline=deadline, cursor=cursor, limit=limit) +# **get_unfilled_orders** +> OrderResponse get_unfilled_orders(type=type, hash=hash, status=status, offerer=offerer, filler=filler, decay_start_time=decay_start_time, decay_end_time=decay_end_time, deadline=deadline, cursor=cursor, limit=limit) Fetch Unfilled Orders @@ -20,37 +20,37 @@ Get a list of unfilled orders filtered by different parameters. ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.OrdersApi(api_client) + api_instance = zarban.service.openapi_client.OrdersApi(api_client) type = 'type_example' # str | Type of the order (optional) hash = 'hash_example' # str | order hash (optional) status = 'status_example' # str | Status of the order (optional) offerer = 'offerer_example' # str | Ethereum address of the offerer (optional) filler = 'filler_example' # str | Ethereum address of the filler (optional) -decay_start_time = openapi_client.TimeRange() # TimeRange | Decay start time (optional) -decay_end_time = openapi_client.TimeRange() # TimeRange | Decay end time (optional) -deadline = openapi_client.TimeRange() # TimeRange | Order deadline (optional) +decay_start_time = zarban.service.openapi_client.TimeRange() # TimeRange | Decay start time (optional) +decay_end_time = zarban.service.openapi_client.TimeRange() # TimeRange | Decay end time (optional) +deadline = zarban.service.openapi_client.TimeRange() # TimeRange | Order deadline (optional) cursor = 56 # int | Cursor for pagination (optional) limit = 10 # int | Limit the number of orders returned (default is 10) (optional) (default to 10) try: # Fetch Unfilled Orders - api_response = api_instance.orders_get(type=type, hash=hash, status=status, offerer=offerer, filler=filler, decay_start_time=decay_start_time, decay_end_time=decay_end_time, deadline=deadline, cursor=cursor, limit=limit) + api_response = api_instance.get_unfilled_orders(type=type, hash=hash, status=status, offerer=offerer, filler=filler, decay_start_time=decay_start_time, decay_end_time=decay_end_time, deadline=deadline, cursor=cursor, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling OrdersApi->orders_get: %s\n" % e) + print("Exception when calling OrdersApi->get_unfilled_orders: %s\n" % e) ``` ### Parameters @@ -70,7 +70,7 @@ Name | Type | Description | Notes ### Return type -[**list[Order]**](Order.md) +[**OrderResponse**](OrderResponse.md) ### Authorization @@ -90,8 +90,8 @@ 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) -# **orders_sync_post** -> Error orders_sync_post(update_order_request) +# **sync_order** +> Error sync_order(update_order_request) Updates Order Entity @@ -102,28 +102,28 @@ updates an order entity in database ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.OrdersApi(api_client) - update_order_request = openapi_client.UpdateOrderRequest() # UpdateOrderRequest | + api_instance = zarban.service.openapi_client.OrdersApi(api_client) + update_order_request = zarban.service.openapi_client.UpdateOrderRequest() # UpdateOrderRequest | try: # Updates Order Entity - api_response = api_instance.orders_sync_post(update_order_request) + api_response = api_instance.sync_order(update_order_request) pprint(api_response) except ApiException as e: - print("Exception when calling OrdersApi->orders_sync_post: %s\n" % e) + print("Exception when calling OrdersApi->sync_order: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/docs/Permission.md b/src/zarban/service/docs/Permission.md deleted file mode 100644 index 4dd7057..0000000 --- a/src/zarban/service/docs/Permission.md +++ /dev/null @@ -1,14 +0,0 @@ -# Permission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**timestamp** | [**Timestamp**](Timestamp.md) | | -**where** | [**Address**](Address.md) | | -**who** | [**Address**](Address.md) | | -**action** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/PermitApi.md b/src/zarban/service/docs/PermitApi.md index c1f4bc9..6d80963 100644 --- a/src/zarban/service/docs/PermitApi.md +++ b/src/zarban/service/docs/PermitApi.md @@ -1,14 +1,14 @@ -# openapi_client.PermitApi +# zarban.service.openapi_client.PermitApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**permit_single_get**](PermitApi.md#permit_single_get) | **GET** /permit/single | Get permit for single token +[**get_single_token_permit**](PermitApi.md#get_single_token_permit) | **GET** /v2/permit/single | Get permit for single token -# **permit_single_get** -> PermitSingle permit_single_get(token, user) +# **get_single_token_permit** +> PermitSingle get_single_token_permit(token, user) Get permit for single token @@ -19,29 +19,29 @@ Get permit for single token ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.PermitApi(api_client) + api_instance = zarban.service.openapi_client.PermitApi(api_client) token = 'token_example' # str | Ethereum address of the token user = 'user_example' # str | Ethereum address of the user try: # Get permit for single token - api_response = api_instance.permit_single_get(token, user) + api_response = api_instance.get_single_token_permit(token, user) pprint(api_response) except ApiException as e: - print("Exception when calling PermitApi->permit_single_get: %s\n" % e) + print("Exception when calling PermitApi->get_single_token_permit: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/docs/PermissionsApi.md b/src/zarban/service/docs/PointsApi.md similarity index 58% rename from src/zarban/service/docs/PermissionsApi.md rename to src/zarban/service/docs/PointsApi.md index 0f1ecfc..2b1d577 100644 --- a/src/zarban/service/docs/PermissionsApi.md +++ b/src/zarban/service/docs/PointsApi.md @@ -1,43 +1,45 @@ -# openapi_client.PermissionsApi +# zarban.service.openapi_client.PointsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**permissions_matrix_get**](PermissionsApi.md#permissions_matrix_get) | **GET** /permissions/matrix | Get authorization matrix +[**get_scoreboard**](PointsApi.md#get_scoreboard) | **GET** /v2/points/scoreboard | Get scoreboard -# **permissions_matrix_get** -> AuthMatrix permissions_matrix_get() +# **get_scoreboard** +> Scoreboard get_scoreboard() -Get authorization matrix +Get scoreboard + +Get scoreboard ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.PermissionsApi(api_client) + api_instance = zarban.service.openapi_client.PointsApi(api_client) try: - # Get authorization matrix - api_response = api_instance.permissions_matrix_get() + # Get scoreboard + api_response = api_instance.get_scoreboard() pprint(api_response) except ApiException as e: - print("Exception when calling PermissionsApi->permissions_matrix_get: %s\n" % e) + print("Exception when calling PointsApi->get_scoreboard: %s\n" % e) ``` ### Parameters @@ -45,7 +47,7 @@ This endpoint does not need any parameter. ### Return type -[**AuthMatrix**](AuthMatrix.md) +[**Scoreboard**](Scoreboard.md) ### Authorization @@ -59,8 +61,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful operation | - | -**500** | Internal Server Error | - | +**200** | A JSON object with scoreboard data | - | +**500** | Internal server 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) diff --git a/src/zarban/service/docs/PreparedTx.md b/src/zarban/service/docs/PreparedTx.md index d264fd9..1584c5f 100644 --- a/src/zarban/service/docs/PreparedTx.md +++ b/src/zarban/service/docs/PreparedTx.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | +**label** | **dict(str, str)** | | **gas_use_estimate** | **int** | | **gas_fee_estimate** | **dict(str, str)** | | **method_parameters** | [**MethodParameters**](MethodParameters.md) | | diff --git a/src/zarban/service/docs/PriceListResponse.md b/src/zarban/service/docs/PriceListResponse.md new file mode 100644 index 0000000..b7378b5 --- /dev/null +++ b/src/zarban/service/docs/PriceListResponse.md @@ -0,0 +1,10 @@ +# PriceListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Price]**](Price.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/PricesApi.md b/src/zarban/service/docs/PricesApi.md index cc40cc5..6429c4d 100644 --- a/src/zarban/service/docs/PricesApi.md +++ b/src/zarban/service/docs/PricesApi.md @@ -1,15 +1,14 @@ -# openapi_client.PricesApi +# zarban.service.openapi_client.PricesApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**prices_get**](PricesApi.md#prices_get) | **GET** /prices | List prices based on query parameters -[**prices_symbol_history_get**](PricesApi.md#prices_symbol_history_get) | **GET** /prices/{symbol}/history | Get price history for a symbol +[**list_prices**](PricesApi.md#list_prices) | **GET** /v2/prices | List prices based on query parameters -# **prices_get** -> list[Price] prices_get(symbol=symbol) +# **list_prices** +> PriceListResponse list_prices(symbol=symbol) List prices based on query parameters @@ -20,28 +19,28 @@ Retrieve a list of price details based on specified query parameters ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.PricesApi(api_client) + api_instance = zarban.service.openapi_client.PricesApi(api_client) symbol = 'symbol_example' # str | Symbol of the price (optional) try: # List prices based on query parameters - api_response = api_instance.prices_get(symbol=symbol) + api_response = api_instance.list_prices(symbol=symbol) pprint(api_response) except ApiException as e: - print("Exception when calling PricesApi->prices_get: %s\n" % e) + print("Exception when calling PricesApi->list_prices: %s\n" % e) ``` ### Parameters @@ -52,7 +51,7 @@ Name | Type | Description | Notes ### Return type -[**list[Price]**](Price.md) +[**PriceListResponse**](PriceListResponse.md) ### Authorization @@ -72,71 +71,3 @@ 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) -# **prices_symbol_history_get** -> list[Price] prices_symbol_history_get(symbol, _from=_from, to=to) - -Get price history for a symbol - -Get price history for a symbol - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://api.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.PricesApi(api_client) - symbol = 'symbol_example' # str | Symbol of the price -_from = '2013-10-20T19:20:30+01:00' # datetime | Start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | End date (optional) - - try: - # Get price history for a symbol - api_response = api_instance.prices_symbol_history_get(symbol, _from=_from, to=to) - pprint(api_response) - except ApiException as e: - print("Exception when calling PricesApi->prices_symbol_history_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **symbol** | **str**| Symbol of the price | - **_from** | **datetime**| Start date | [optional] - **to** | **datetime**| End date | [optional] - -### Return type - -[**list[Price]**](Price.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of price history | - | -**400** | Bad request | - | -**500** | Internal server 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) - diff --git a/src/zarban/service/docs/Proxy.md b/src/zarban/service/docs/Proxy.md deleted file mode 100644 index f23afac..0000000 --- a/src/zarban/service/docs/Proxy.md +++ /dev/null @@ -1,12 +0,0 @@ -# Proxy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**address** | **str** | The Ethereum address of the proxy. | -**owner** | **str** | The Ethereum address of the owner. | -**authority** | **str** | The Ethereum address of the authority. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/service/docs/QuoteResponse.md b/src/zarban/service/docs/QuoteResponse.md index bc7a16b..ceb5f57 100644 --- a/src/zarban/service/docs/QuoteResponse.md +++ b/src/zarban/service/docs/QuoteResponse.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **gas_fee_estimate** | **dict(str, str)** | | **route_string** | **str** | | **method_parameters** | [**MethodParameters**](MethodParameters.md) | | [optional] -**route** | [**list[V3PoolInRoute]**](V3PoolInRoute.md) | | +**route** | [**list[RouteItem]**](RouteItem.md) | | **order_info** | [**OrderInfo**](OrderInfo.md) | | [optional] **encoded_order** | **str** | | [optional] **order_hash** | **str** | | [optional] diff --git a/src/zarban/service/docs/ChainId.md b/src/zarban/service/docs/RouteItem.md similarity index 95% rename from src/zarban/service/docs/ChainId.md rename to src/zarban/service/docs/RouteItem.md index 62e8b11..a155b33 100644 --- a/src/zarban/service/docs/ChainId.md +++ b/src/zarban/service/docs/RouteItem.md @@ -1,4 +1,4 @@ -# ChainId +# RouteItem ## Properties Name | Type | Description | Notes diff --git a/src/zarban/service/docs/Scoreboard.md b/src/zarban/service/docs/Scoreboard.md new file mode 100644 index 0000000..cd841b9 --- /dev/null +++ b/src/zarban/service/docs/Scoreboard.md @@ -0,0 +1,10 @@ +# Scoreboard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**list[ScoreboardItem]**](ScoreboardItem.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/ScoreboardItem.md b/src/zarban/service/docs/ScoreboardItem.md new file mode 100644 index 0000000..9a245a9 --- /dev/null +++ b/src/zarban/service/docs/ScoreboardItem.md @@ -0,0 +1,11 @@ +# ScoreboardItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**points** | **int** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StableCoinSystemApi.md b/src/zarban/service/docs/StableCoinSystemApi.md index 77ccf7d..fd15e4a 100644 --- a/src/zarban/service/docs/StableCoinSystemApi.md +++ b/src/zarban/service/docs/StableCoinSystemApi.md @@ -1,65 +1,137 @@ -# openapi_client.StableCoinSystemApi +# zarban.service.openapi_client.StableCoinSystemApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ilks_get**](StableCoinSystemApi.md#ilks_get) | **GET** /ilks | Get all Ilks -[**ilks_name_get**](StableCoinSystemApi.md#ilks_name_get) | **GET** /ilks/{name} | Get Ilk by name -[**permissions_matrix_get**](StableCoinSystemApi.md#permissions_matrix_get) | **GET** /permissions/matrix | Get authorization matrix -[**proxies_get**](StableCoinSystemApi.md#proxies_get) | **GET** /proxies | Retrieves proxies owned by a specific owner -[**stablecoinsystem_tx_createvault_post**](StableCoinSystemApi.md#stablecoinsystem_tx_createvault_post) | **POST** /stablecoinsystem/tx/createvault | Create vault -[**stablecoinsystem_tx_depositcollateral_post**](StableCoinSystemApi.md#stablecoinsystem_tx_depositcollateral_post) | **POST** /stablecoinsystem/tx/depositcollateral | Deposit collateral -[**stablecoinsystem_tx_mintzar_post**](StableCoinSystemApi.md#stablecoinsystem_tx_mintzar_post) | **POST** /stablecoinsystem/tx/mintzar | Mint ZAR -[**stablecoinsystem_tx_repayzar_post**](StableCoinSystemApi.md#stablecoinsystem_tx_repayzar_post) | **POST** /stablecoinsystem/tx/repayzar | Repay ZAR -[**stablecoinsystem_tx_withdrawcollateral_post**](StableCoinSystemApi.md#stablecoinsystem_tx_withdrawcollateral_post) | **POST** /stablecoinsystem/tx/withdrawcollateral | Withdraw collateral -[**stats_get**](StableCoinSystemApi.md#stats_get) | **GET** /stats | Get collector data -[**vaults_get**](StableCoinSystemApi.md#vaults_get) | **GET** /vaults | Get vaults by owner query -[**vaults_id_events_get**](StableCoinSystemApi.md#vaults_id_events_get) | **GET** /vaults/{id}/events | Get vault events by ID -[**vaults_id_get**](StableCoinSystemApi.md#vaults_id_get) | **GET** /vaults/{id} | Get a vault by ID - - -# **ilks_get** -> list[Ilk] ilks_get() +[**approve_and_join_zar_transaction**](StableCoinSystemApi.md#approve_and_join_zar_transaction) | **POST** /v2/stablecoinsystem/auctions/tx/zarjoin | approve and join ZAR token into Vat contract +[**create_stable_coin_vault**](StableCoinSystemApi.md#create_stable_coin_vault) | **POST** /v2/stablecoinsystem/tx/createvault | Create vault +[**deposit_stable_coin_collateral**](StableCoinSystemApi.md#deposit_stable_coin_collateral) | **POST** /v2/stablecoinsystem/tx/depositcollateral | Deposit collateral +[**exit_gem_transaction**](StableCoinSystemApi.md#exit_gem_transaction) | **POST** /v2/stablecoinsystem/auctions/tx/gemexit | exit Gem token (which can be used as collateral) from Vat contract +[**exit_zar_transaction**](StableCoinSystemApi.md#exit_zar_transaction) | **POST** /v2/stablecoinsystem/auctions/tx/zarexit | exit ZAR token from Vat contract +[**get_all_ilks**](StableCoinSystemApi.md#get_all_ilks) | **GET** /v2/ilks | Get all Ilks +[**get_collector_data**](StableCoinSystemApi.md#get_collector_data) | **GET** /v2/stats | Get collector data +[**get_ilk_by_name**](StableCoinSystemApi.md#get_ilk_by_name) | **GET** /v2/ilks/{name} | Get Ilk by name +[**get_vault_by_id**](StableCoinSystemApi.md#get_vault_by_id) | **GET** /v2/vaults/{id} | Get a vault by ID +[**get_vault_events_by_id**](StableCoinSystemApi.md#get_vault_events_by_id) | **GET** /v2/vaults/{id}/events | Get vault events by ID +[**get_vaults_by_owner**](StableCoinSystemApi.md#get_vaults_by_owner) | **GET** /v2/vaults | Get vaults by owner query +[**liquidate_vault_transaction**](StableCoinSystemApi.md#liquidate_vault_transaction) | **POST** /v2/stablecoinsystem/tx/bark | liquidate a vault +[**mint_zar_transaction**](StableCoinSystemApi.md#mint_zar_transaction) | **POST** /v2/stablecoinsystem/tx/mintzar | Mint ZAR +[**repay_zar_transaction**](StableCoinSystemApi.md#repay_zar_transaction) | **POST** /v2/stablecoinsystem/tx/repayzar | Repay ZAR +[**reset_auction_transaction**](StableCoinSystemApi.md#reset_auction_transaction) | **POST** /v2/stablecoinsystem/auctions/tx/redo | reset a auction +[**take_auction_transaction**](StableCoinSystemApi.md#take_auction_transaction) | **POST** /v2/stablecoinsystem/auctions/tx/take | take a auction +[**withdraw_collateral_transaction**](StableCoinSystemApi.md#withdraw_collateral_transaction) | **POST** /v2/stablecoinsystem/tx/withdrawcollateral | Withdraw collateral + + +# **approve_and_join_zar_transaction** +> ChainActivity approve_and_join_zar_transaction(stablecoin_system_zarjoin_tx_request) + +approve and join ZAR token into Vat contract + +approve and join ZAR token into Vat contract -Get all Ilks +### Example -Retrieve a list of all available ilks. +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_zarjoin_tx_request = zarban.service.openapi_client.StablecoinSystemZarjoinTxRequest() # StablecoinSystemZarjoinTxRequest | Approve and join Zar token into Vat contract transaction request + + try: + # approve and join ZAR token into Vat contract + api_response = api_instance.approve_and_join_zar_transaction(stablecoin_system_zarjoin_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StableCoinSystemApi->approve_and_join_zar_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stablecoin_system_zarjoin_tx_request** | [**StablecoinSystemZarjoinTxRequest**](StablecoinSystemZarjoinTxRequest.md)| Approve and join Zar token into Vat contract transaction request | + +### Return type + +[**ChainActivity**](ChainActivity.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **create_stable_coin_vault** +> ChainActivity create_stable_coin_vault(stablecoin_system_create_vault_tx_request) + +Create vault + +Create vault ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_create_vault_tx_request = zarban.service.openapi_client.StablecoinSystemCreateVaultTxRequest() # StablecoinSystemCreateVaultTxRequest | Create vault transaction request + try: - # Get all Ilks - api_response = api_instance.ilks_get() + # Create vault + api_response = api_instance.create_stable_coin_vault(stablecoin_system_create_vault_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->ilks_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->create_stable_coin_vault: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stablecoin_system_create_vault_tx_request** | [**StablecoinSystemCreateVaultTxRequest**](StablecoinSystemCreateVaultTxRequest.md)| Create vault transaction request | ### Return type -[**list[Ilk]**](Ilk.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -67,62 +139,251 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved list of ilks | - | +**200** | Successful response | - | +**400** | Bad request | - | **500** | Internal server 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) -# **ilks_name_get** -> Ilk ilks_name_get(name) +# **deposit_stable_coin_collateral** +> ChainActivity deposit_stable_coin_collateral(stablecoin_system_deposit_collateral_tx_request) -Get Ilk by name +Deposit collateral -Retrieve an Ilk by providing its name. +Deposit collateral ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - name = 'name_example' # str | Name of the ILK + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_deposit_collateral_tx_request = zarban.service.openapi_client.StablecoinSystemDepositCollateralTxRequest() # StablecoinSystemDepositCollateralTxRequest | Deposit collateral transaction request try: - # Get Ilk by name - api_response = api_instance.ilks_name_get(name) + # Deposit collateral + api_response = api_instance.deposit_stable_coin_collateral(stablecoin_system_deposit_collateral_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->ilks_name_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->deposit_stable_coin_collateral: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Name of the ILK | + **stablecoin_system_deposit_collateral_tx_request** | [**StablecoinSystemDepositCollateralTxRequest**](StablecoinSystemDepositCollateralTxRequest.md)| Deposit collateral transaction request | ### Return type -[**Ilk**](Ilk.md) +[**ChainActivity**](ChainActivity.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **exit_gem_transaction** +> ChainActivity exit_gem_transaction(stablecoin_system_gemexit_tx_request) + +exit Gem token (which can be used as collateral) from Vat contract + +exit Gem token (which can be used as collateral) from Vat contract + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_gemexit_tx_request = zarban.service.openapi_client.StablecoinSystemGemexitTxRequest() # StablecoinSystemGemexitTxRequest | exit Zar token from Vat contract transaction request + + try: + # exit Gem token (which can be used as collateral) from Vat contract + api_response = api_instance.exit_gem_transaction(stablecoin_system_gemexit_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StableCoinSystemApi->exit_gem_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stablecoin_system_gemexit_tx_request** | [**StablecoinSystemGemexitTxRequest**](StablecoinSystemGemexitTxRequest.md)| exit Zar token from Vat contract transaction request | + +### Return type + +[**ChainActivity**](ChainActivity.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **exit_zar_transaction** +> ChainActivity exit_zar_transaction(stablecoin_system_zarexit_tx_request) + +exit ZAR token from Vat contract + +exit ZAR token from Vat contract + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_zarexit_tx_request = zarban.service.openapi_client.StablecoinSystemZarexitTxRequest() # StablecoinSystemZarexitTxRequest | exit Zar token from Vat contract transaction request + + try: + # exit ZAR token from Vat contract + api_response = api_instance.exit_zar_transaction(stablecoin_system_zarexit_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StableCoinSystemApi->exit_zar_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stablecoin_system_zarexit_tx_request** | [**StablecoinSystemZarexitTxRequest**](StablecoinSystemZarexitTxRequest.md)| exit Zar token from Vat contract transaction request | + +### Return type + +[**ChainActivity**](ChainActivity.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **get_all_ilks** +> IlksResponse get_all_ilks() + +Get all Ilks + +Retrieve a list of all available ilks. + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + + try: + # Get all Ilks + api_response = api_instance.get_all_ilks() + pprint(api_response) + except ApiException as e: + print("Exception when calling StableCoinSystemApi->get_all_ilks: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IlksResponse**](IlksResponse.md) ### Authorization @@ -136,42 +397,44 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved ILK | - | +**200** | Successfully retrieved list of ilks | - | **500** | Internal server 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) -# **permissions_matrix_get** -> AuthMatrix permissions_matrix_get() +# **get_collector_data** +> Stats get_collector_data() -Get authorization matrix +Get collector data + +Get collector data ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) try: - # Get authorization matrix - api_response = api_instance.permissions_matrix_get() + # Get collector data + api_response = api_instance.get_collector_data() pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->permissions_matrix_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->get_collector_data: %s\n" % e) ``` ### Parameters @@ -179,7 +442,7 @@ This endpoint does not need any parameter. ### Return type -[**AuthMatrix**](AuthMatrix.md) +[**Stats**](Stats.md) ### Authorization @@ -193,56 +456,55 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful operation | - | -**500** | Internal Server Error | - | +**200** | A JSON object with collector data | - | [[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) -# **proxies_get** -> list[Proxy] proxies_get(owner) +# **get_ilk_by_name** +> Ilk get_ilk_by_name(name) -Retrieves proxies owned by a specific owner +Get Ilk by name -Returns a list of proxies filtered by the owner's address. +Retrieve an Ilk by providing its name. ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - owner = 'owner_example' # str | The Ethereum address of the owner. + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + name = 'name_example' # str | Name of the ILK try: - # Retrieves proxies owned by a specific owner - api_response = api_instance.proxies_get(owner) + # Get Ilk by name + api_response = api_instance.get_ilk_by_name(name) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->proxies_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->get_ilk_by_name: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| The Ethereum address of the owner. | + **name** | **str**| Name of the ILK | ### Return type -[**list[Proxy]**](Proxy.md) +[**Ilk**](Ilk.md) ### Authorization @@ -256,56 +518,54 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A JSON array of proxies | - | -**400** | Bad request | - | +**200** | Successfully retrieved ILK | - | +**500** | Internal server 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) -# **stablecoinsystem_tx_createvault_post** -> list[ChainActivity] stablecoinsystem_tx_createvault_post(stablecoin_system_create_vault_tx_request) - -Create vault +# **get_vault_by_id** +> Vault get_vault_by_id(id) -Create vault +Get a vault by ID ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - stablecoin_system_create_vault_tx_request = openapi_client.StablecoinSystemCreateVaultTxRequest() # StablecoinSystemCreateVaultTxRequest | Create vault transaction request + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + id = 56 # int | Vault ID try: - # Create vault - api_response = api_instance.stablecoinsystem_tx_createvault_post(stablecoin_system_create_vault_tx_request) + # Get a vault by ID + api_response = api_instance.get_vault_by_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stablecoinsystem_tx_createvault_post: %s\n" % e) + print("Exception when calling StableCoinSystemApi->get_vault_by_id: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stablecoin_system_create_vault_tx_request** | [**StablecoinSystemCreateVaultTxRequest**](StablecoinSystemCreateVaultTxRequest.md)| Create vault transaction request | + **id** | **int**| Vault ID | ### Return type -[**list[ChainActivity]**](ChainActivity.md) +[**Vault**](Vault.md) ### Authorization @@ -313,7 +573,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -321,55 +581,56 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | +**404** | Not found | - | **500** | Internal server 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) -# **stablecoinsystem_tx_depositcollateral_post** -> list[ChainActivity] stablecoinsystem_tx_depositcollateral_post(stablecoin_system_deposit_collateral_tx_request) - -Deposit collateral +# **get_vault_events_by_id** +> VaultEventsResponse get_vault_events_by_id(id, type=type) -Deposit collateral +Get vault events by ID ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - stablecoin_system_deposit_collateral_tx_request = openapi_client.StablecoinSystemDepositCollateralTxRequest() # StablecoinSystemDepositCollateralTxRequest | Deposit collateral transaction request + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + id = 56 # int | Vault ID +type = 'type_example' # str | Event type (optional) try: - # Deposit collateral - api_response = api_instance.stablecoinsystem_tx_depositcollateral_post(stablecoin_system_deposit_collateral_tx_request) + # Get vault events by ID + api_response = api_instance.get_vault_events_by_id(id, type=type) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stablecoinsystem_tx_depositcollateral_post: %s\n" % e) + print("Exception when calling StableCoinSystemApi->get_vault_events_by_id: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stablecoin_system_deposit_collateral_tx_request** | [**StablecoinSystemDepositCollateralTxRequest**](StablecoinSystemDepositCollateralTxRequest.md)| Deposit collateral transaction request | + **id** | **int**| Vault ID | + **type** | **str**| Event type | [optional] ### Return type -[**list[ChainActivity]**](ChainActivity.md) +[**VaultEventsResponse**](VaultEventsResponse.md) ### Authorization @@ -377,7 +638,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -385,55 +646,54 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | +**404** | Not found | - | **500** | Internal server 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) -# **stablecoinsystem_tx_mintzar_post** -> list[ChainActivity] stablecoinsystem_tx_mintzar_post(stablecoin_system_mint_zar_tx_request) - -Mint ZAR +# **get_vaults_by_owner** +> VaultsResponse get_vaults_by_owner(owner=owner) -Mint ZAR +Get vaults by owner query ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - stablecoin_system_mint_zar_tx_request = openapi_client.StablecoinSystemMintZarTxRequest() # StablecoinSystemMintZarTxRequest | Mint ZAR transaction request + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + owner = 'owner_example' # str | Ethereum address of the owner (optional) try: - # Mint ZAR - api_response = api_instance.stablecoinsystem_tx_mintzar_post(stablecoin_system_mint_zar_tx_request) + # Get vaults by owner query + api_response = api_instance.get_vaults_by_owner(owner=owner) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stablecoinsystem_tx_mintzar_post: %s\n" % e) + print("Exception when calling StableCoinSystemApi->get_vaults_by_owner: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stablecoin_system_mint_zar_tx_request** | [**StablecoinSystemMintZarTxRequest**](StablecoinSystemMintZarTxRequest.md)| Mint ZAR transaction request | + **owner** | **str**| Ethereum address of the owner | [optional] ### Return type -[**list[ChainActivity]**](ChainActivity.md) +[**VaultsResponse**](VaultsResponse.md) ### Authorization @@ -441,7 +701,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -449,55 +709,56 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | +**404** | Not found | - | **500** | Internal server 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) -# **stablecoinsystem_tx_repayzar_post** -> list[ChainActivity] stablecoinsystem_tx_repayzar_post(stablecoin_system_repay_zar_tx_request) +# **liquidate_vault_transaction** +> ChainActivity liquidate_vault_transaction(stablecoin_system_bark_tx_request) -Repay ZAR +liquidate a vault -Repay ZAR +liquidate a vault ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - stablecoin_system_repay_zar_tx_request = openapi_client.StablecoinSystemRepayZarTxRequest() # StablecoinSystemRepayZarTxRequest | Repay ZAR transaction request + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_bark_tx_request = zarban.service.openapi_client.StablecoinSystemBarkTxRequest() # StablecoinSystemBarkTxRequest | Liquidate a Vault transaction request try: - # Repay ZAR - api_response = api_instance.stablecoinsystem_tx_repayzar_post(stablecoin_system_repay_zar_tx_request) + # liquidate a vault + api_response = api_instance.liquidate_vault_transaction(stablecoin_system_bark_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stablecoinsystem_tx_repayzar_post: %s\n" % e) + print("Exception when calling StableCoinSystemApi->liquidate_vault_transaction: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stablecoin_system_repay_zar_tx_request** | [**StablecoinSystemRepayZarTxRequest**](StablecoinSystemRepayZarTxRequest.md)| Repay ZAR transaction request | + **stablecoin_system_bark_tx_request** | [**StablecoinSystemBarkTxRequest**](StablecoinSystemBarkTxRequest.md)| Liquidate a Vault transaction request | ### Return type -[**list[ChainActivity]**](ChainActivity.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -517,51 +778,51 @@ 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) -# **stablecoinsystem_tx_withdrawcollateral_post** -> list[ChainActivity] stablecoinsystem_tx_withdrawcollateral_post(stablecoin_system_withdraw_collateral_tx_request) +# **mint_zar_transaction** +> ChainActivity mint_zar_transaction(stablecoin_system_mint_zar_tx_request) -Withdraw collateral +Mint ZAR -Withdraw collateral +Mint ZAR ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - stablecoin_system_withdraw_collateral_tx_request = openapi_client.StablecoinSystemWithdrawCollateralTxRequest() # StablecoinSystemWithdrawCollateralTxRequest | Withdraw collateral transaction request + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_mint_zar_tx_request = zarban.service.openapi_client.StablecoinSystemMintZarTxRequest() # StablecoinSystemMintZarTxRequest | Mint ZAR transaction request try: - # Withdraw collateral - api_response = api_instance.stablecoinsystem_tx_withdrawcollateral_post(stablecoin_system_withdraw_collateral_tx_request) + # Mint ZAR + api_response = api_instance.mint_zar_transaction(stablecoin_system_mint_zar_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stablecoinsystem_tx_withdrawcollateral_post: %s\n" % e) + print("Exception when calling StableCoinSystemApi->mint_zar_transaction: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stablecoin_system_withdraw_collateral_tx_request** | [**StablecoinSystemWithdrawCollateralTxRequest**](StablecoinSystemWithdrawCollateralTxRequest.md)| Withdraw collateral transaction request | + **stablecoin_system_mint_zar_tx_request** | [**StablecoinSystemMintZarTxRequest**](StablecoinSystemMintZarTxRequest.md)| Mint ZAR transaction request | ### Return type -[**list[ChainActivity]**](ChainActivity.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -581,47 +842,51 @@ 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) -# **stats_get** -> Stats stats_get() +# **repay_zar_transaction** +> ChainActivity repay_zar_transaction(stablecoin_system_repay_zar_tx_request) -Get collector data +Repay ZAR -Get collector data +Repay ZAR ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_repay_zar_tx_request = zarban.service.openapi_client.StablecoinSystemRepayZarTxRequest() # StablecoinSystemRepayZarTxRequest | Repay ZAR transaction request + try: - # Get collector data - api_response = api_instance.stats_get() + # Repay ZAR + api_response = api_instance.repay_zar_transaction(stablecoin_system_repay_zar_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->stats_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->repay_zar_transaction: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stablecoin_system_repay_zar_tx_request** | [**StablecoinSystemRepayZarTxRequest**](StablecoinSystemRepayZarTxRequest.md)| Repay ZAR transaction request | ### Return type -[**Stats**](Stats.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -629,59 +894,63 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A JSON object with collector data | - | +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) -# **vaults_get** -> list[Vault] vaults_get(owner=owner) +# **reset_auction_transaction** +> ChainActivity reset_auction_transaction(stablecoin_system_redo_tx_request) -Get vaults by owner query +reset a auction + +reset a auction ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - owner = 'owner_example' # str | Ethereum address of the owner (optional) + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_redo_tx_request = zarban.service.openapi_client.StablecoinSystemRedoTxRequest() # StablecoinSystemRedoTxRequest | Reset a Auction transaction request try: - # Get vaults by owner query - api_response = api_instance.vaults_get(owner=owner) + # reset a auction + api_response = api_instance.reset_auction_transaction(stablecoin_system_redo_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->vaults_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->reset_auction_transaction: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| Ethereum address of the owner | [optional] + **stablecoin_system_redo_tx_request** | [**StablecoinSystemRedoTxRequest**](StablecoinSystemRedoTxRequest.md)| Reset a Auction transaction request | ### Return type -[**list[Vault]**](Vault.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -689,7 +958,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -697,56 +966,55 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | -**404** | Not found | - | **500** | Internal server 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) -# **vaults_id_events_get** -> list[BasicEvent] vaults_id_events_get(id, type=type) +# **take_auction_transaction** +> ChainActivity take_auction_transaction(stablecoin_system_take_tx_request) -Get vault events by ID +take a auction + +take a auction ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - id = 56 # int | Vault ID -type = 'type_example' # str | Event type (optional) + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_take_tx_request = zarban.service.openapi_client.StablecoinSystemTakeTxRequest() # StablecoinSystemTakeTxRequest | Take a Auction transaction request try: - # Get vault events by ID - api_response = api_instance.vaults_id_events_get(id, type=type) + # take a auction + api_response = api_instance.take_auction_transaction(stablecoin_system_take_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->vaults_id_events_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->take_auction_transaction: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| Vault ID | - **type** | **str**| Event type | [optional] + **stablecoin_system_take_tx_request** | [**StablecoinSystemTakeTxRequest**](StablecoinSystemTakeTxRequest.md)| Take a Auction transaction request | ### Return type -[**list[BasicEvent]**](BasicEvent.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -754,7 +1022,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -762,54 +1030,55 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | -**404** | Not found | - | **500** | Internal server 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) -# **vaults_id_get** -> Vault vaults_id_get(id) +# **withdraw_collateral_transaction** +> ChainActivity withdraw_collateral_transaction(stablecoin_system_withdraw_collateral_tx_request) -Get a vault by ID +Withdraw collateral + +Withdraw collateral ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.StableCoinSystemApi(api_client) - id = 56 # int | Vault ID + api_instance = zarban.service.openapi_client.StableCoinSystemApi(api_client) + stablecoin_system_withdraw_collateral_tx_request = zarban.service.openapi_client.StablecoinSystemWithdrawCollateralTxRequest() # StablecoinSystemWithdrawCollateralTxRequest | Withdraw collateral transaction request try: - # Get a vault by ID - api_response = api_instance.vaults_id_get(id) + # Withdraw collateral + api_response = api_instance.withdraw_collateral_transaction(stablecoin_system_withdraw_collateral_tx_request) pprint(api_response) except ApiException as e: - print("Exception when calling StableCoinSystemApi->vaults_id_get: %s\n" % e) + print("Exception when calling StableCoinSystemApi->withdraw_collateral_transaction: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| Vault ID | + **stablecoin_system_withdraw_collateral_tx_request** | [**StablecoinSystemWithdrawCollateralTxRequest**](StablecoinSystemWithdrawCollateralTxRequest.md)| Withdraw collateral transaction request | ### Return type -[**Vault**](Vault.md) +[**ChainActivity**](ChainActivity.md) ### Authorization @@ -817,7 +1086,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -825,7 +1094,6 @@ No authorization required |-------------|-------------|------------------| **200** | Successful response | - | **400** | Bad request | - | -**404** | Not found | - | **500** | Internal server 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) diff --git a/src/zarban/service/docs/StablecoinSystemBarkTxRequest.md b/src/zarban/service/docs/StablecoinSystemBarkTxRequest.md new file mode 100644 index 0000000..f345207 --- /dev/null +++ b/src/zarban/service/docs/StablecoinSystemBarkTxRequest.md @@ -0,0 +1,11 @@ +# StablecoinSystemBarkTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user who is liquidating the vault and receiving incentives. | +**vault_id** | **int** | The ID of the vault | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StablecoinSystemGemexitTxRequest.md b/src/zarban/service/docs/StablecoinSystemGemexitTxRequest.md new file mode 100644 index 0000000..55ae80c --- /dev/null +++ b/src/zarban/service/docs/StablecoinSystemGemexitTxRequest.md @@ -0,0 +1,12 @@ +# StablecoinSystemGemexitTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user intends to exit gem tokens from the Vat contract and receive them.. | +**amount** | **str** | The amount of Gem token to exit from Vat contract | +**ilk** | **str** | Name of the ILK | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StablecoinSystemRedoTxRequest.md b/src/zarban/service/docs/StablecoinSystemRedoTxRequest.md new file mode 100644 index 0000000..c1455b1 --- /dev/null +++ b/src/zarban/service/docs/StablecoinSystemRedoTxRequest.md @@ -0,0 +1,12 @@ +# StablecoinSystemRedoTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user resetting the auction and receiving incentives. | +**auction_id** | **int** | The ID of the auction | +**ilk** | **str** | Name of the ILK | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StablecoinSystemStats.md b/src/zarban/service/docs/StablecoinSystemStats.md index a41fc3a..f442032 100644 --- a/src/zarban/service/docs/StablecoinSystemStats.md +++ b/src/zarban/service/docs/StablecoinSystemStats.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**system_surplus** | **dict(str, str)** | | -**system_debt** | **dict(str, str)** | | -**system_debt_ceiling** | **dict(str, str)** | | -**system_surplus_buffer** | **dict(str, str)** | | -**system_bad_debt** | **dict(str, str)** | | -**system_surplus_lot_size** | **dict(str, str)** | | +**system_surplus** | [**SystemSurplus**](SystemSurplus.md) | | +**system_debt** | [**SystemDebt**](SystemDebt.md) | | +**system_debt_ceiling** | [**SystemDebtCeiling**](SystemDebtCeiling.md) | | +**system_surplus_buffer** | [**SystemSurplusBuffer**](SystemSurplusBuffer.md) | | +**system_bad_debt** | [**SystemBadDebt**](SystemBadDebt.md) | | +**system_surplus_lot_size** | [**SystemSurplusLotSize**](SystemSurplusLotSize.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/StablecoinSystemTakeTxRequest.md b/src/zarban/service/docs/StablecoinSystemTakeTxRequest.md new file mode 100644 index 0000000..568a58c --- /dev/null +++ b/src/zarban/service/docs/StablecoinSystemTakeTxRequest.md @@ -0,0 +1,14 @@ +# StablecoinSystemTakeTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user taking the auction. | +**auction_id** | **int** | The ID of the auction | +**ilk** | **str** | Name of the ILK | +**collateral_amount_upper_limit** | **str** | upper limit on the amount of collateral to buy [wad] | +**max_acceptable_price** | **str** | Maximum acceptable price (ZAR / collateral) [ray] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StablecoinSystemZarexitTxRequest.md b/src/zarban/service/docs/StablecoinSystemZarexitTxRequest.md new file mode 100644 index 0000000..260e05f --- /dev/null +++ b/src/zarban/service/docs/StablecoinSystemZarexitTxRequest.md @@ -0,0 +1,11 @@ +# StablecoinSystemZarexitTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user intends to exit zar tokens from the Vat contract and receive them.. | +**amount** | **str** | The amount of Zar token to exit from Vat contract | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/AnswerUpdatedResponse.md b/src/zarban/service/docs/StablecoinSystemZarjoinTxRequest.md similarity index 55% rename from src/zarban/service/docs/AnswerUpdatedResponse.md rename to src/zarban/service/docs/StablecoinSystemZarjoinTxRequest.md index 20fd26a..b6bbc30 100644 --- a/src/zarban/service/docs/AnswerUpdatedResponse.md +++ b/src/zarban/service/docs/StablecoinSystemZarjoinTxRequest.md @@ -1,12 +1,10 @@ -# AnswerUpdatedResponse +# StablecoinSystemZarjoinTxRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**current** | **str** | The current answer | -**round_id** | **str** | The ID of the round | -**updated_at** | **str** | The time the answer was updated | -**raw** | [**Log**](Log.md) | | +**user** | **str** | Ethereum address of the user intends to join zar tokens into the Vat contract. | +**amount** | **str** | The amount of ZAR to approve and join into Vat contract | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/StakeBalance.md b/src/zarban/service/docs/StakeBalance.md new file mode 100644 index 0000000..0e8f1a0 --- /dev/null +++ b/src/zarban/service/docs/StakeBalance.md @@ -0,0 +1,10 @@ +# StakeBalance + +The amount of asset staked in native token units +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakePlan.md b/src/zarban/service/docs/StakePlan.md new file mode 100644 index 0000000..dbbcd36 --- /dev/null +++ b/src/zarban/service/docs/StakePlan.md @@ -0,0 +1,15 @@ +# StakePlan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_name** | **str** | Name of staking plan | +**contract_address** | **str** | Ethereum address of the staking contract | +**apy** | **str** | Annual percentage yield of the staking plan | +**stake_token** | [**Token**](Token.md) | | +**reward_token** | [**Token**](Token.md) | | +**finish_at** | [**Timestamp**](Timestamp.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakePlansResponse.md b/src/zarban/service/docs/StakePlansResponse.md new file mode 100644 index 0000000..8aa756c --- /dev/null +++ b/src/zarban/service/docs/StakePlansResponse.md @@ -0,0 +1,10 @@ +# StakePlansResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[StakePlan]**](StakePlan.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingApi.md b/src/zarban/service/docs/StakingApi.md new file mode 100644 index 0000000..dc1cb27 --- /dev/null +++ b/src/zarban/service/docs/StakingApi.md @@ -0,0 +1,336 @@ +# zarban.service.openapi_client.StakingApi + +All URIs are relative to *https://api.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**collect_staking_reward**](StakingApi.md#collect_staking_reward) | **POST** /v2/staking/tx/collectreward | Collect staking reward +[**get_staking_plans**](StakingApi.md#get_staking_plans) | **GET** /v2/staking/plans | Get staking plans +[**get_user_staking_stats**](StakingApi.md#get_user_staking_stats) | **GET** /v2/staking/stats | Get user staking stats +[**stake_to_staking_contract**](StakingApi.md#stake_to_staking_contract) | **POST** /v2/staking/tx/stake | Stake to staking contract +[**withdraw_staked_asset**](StakingApi.md#withdraw_staked_asset) | **POST** /v2/staking/tx/withdraw | Withdraw staked asset + + +# **collect_staking_reward** +> StakingCollectRewardTxResponse collect_staking_reward(staking_collect_reward_tx_request) + +Collect staking reward + +Collect staking reward + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StakingApi(api_client) + staking_collect_reward_tx_request = zarban.service.openapi_client.StakingCollectRewardTxRequest() # StakingCollectRewardTxRequest | Collect reward transaction request + + try: + # Collect staking reward + api_response = api_instance.collect_staking_reward(staking_collect_reward_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StakingApi->collect_staking_reward: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **staking_collect_reward_tx_request** | [**StakingCollectRewardTxRequest**](StakingCollectRewardTxRequest.md)| Collect reward transaction request | + +### Return type + +[**StakingCollectRewardTxResponse**](StakingCollectRewardTxResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **get_staking_plans** +> StakePlansResponse get_staking_plans() + +Get staking plans + +Get staking plans + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StakingApi(api_client) + + try: + # Get staking plans + api_response = api_instance.get_staking_plans() + pprint(api_response) + except ApiException as e: + print("Exception when calling StakingApi->get_staking_plans: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StakePlansResponse**](StakePlansResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of stakes | - | +**500** | Internal server 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) + +# **get_user_staking_stats** +> UserStakesResponse get_user_staking_stats(user=user, address=address, active=active, cursor=cursor, limit=limit) + +Get user staking stats + +Get user staking stats + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StakingApi(api_client) + user = 'user_example' # str | Ethereum address of the user (optional) +address = 'address_example' # str | Ethereum address of the staking contract (optional) +active = True # bool | Filter by active stakes (optional) +cursor = 56 # int | Cursor for pagination (optional) +limit = 50 # int | Limit the number of stakes returned (default is 50) (optional) (default to 50) + + try: + # Get user staking stats + api_response = api_instance.get_user_staking_stats(user=user, address=address, active=active, cursor=cursor, limit=limit) + pprint(api_response) + except ApiException as e: + print("Exception when calling StakingApi->get_user_staking_stats: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Ethereum address of the user | [optional] + **address** | **str**| Ethereum address of the staking contract | [optional] + **active** | **bool**| Filter by active stakes | [optional] + **cursor** | **int**| Cursor for pagination | [optional] + **limit** | **int**| Limit the number of stakes returned (default is 50) | [optional] [default to 50] + +### Return type + +[**UserStakesResponse**](UserStakesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of stakes | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **stake_to_staking_contract** +> StakingStakeTxResponse stake_to_staking_contract(staking_stake_tx_request) + +Stake to staking contract + +Stake to staking contract + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StakingApi(api_client) + staking_stake_tx_request = zarban.service.openapi_client.StakingStakeTxRequest() # StakingStakeTxRequest | Stake transaction request, if amount is not provided, then the whole wallet balance will be used + + try: + # Stake to staking contract + api_response = api_instance.stake_to_staking_contract(staking_stake_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StakingApi->stake_to_staking_contract: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **staking_stake_tx_request** | [**StakingStakeTxRequest**](StakingStakeTxRequest.md)| Stake transaction request, if amount is not provided, then the whole wallet balance will be used | + +### Return type + +[**StakingStakeTxResponse**](StakingStakeTxResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + +# **withdraw_staked_asset** +> StakingWithdrawTxResponse withdraw_staked_asset(staking_withdraw_tx_request) + +Withdraw staked asset + +Withdraw staked asset + +### Example + +```python +from __future__ import print_function +import time +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.service.openapi_client.Configuration( + host = "https://api.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.service.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.service.openapi_client.StakingApi(api_client) + staking_withdraw_tx_request = zarban.service.openapi_client.StakingWithdrawTxRequest() # StakingWithdrawTxRequest | Withdraw transaction request, if amount is not provided, then the whole staked amount will be withdrawn + + try: + # Withdraw staked asset + api_response = api_instance.withdraw_staked_asset(staking_withdraw_tx_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling StakingApi->withdraw_staked_asset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **staking_withdraw_tx_request** | [**StakingWithdrawTxRequest**](StakingWithdrawTxRequest.md)| Withdraw transaction request, if amount is not provided, then the whole staked amount will be withdrawn | + +### Return type + +[**StakingWithdrawTxResponse**](StakingWithdrawTxResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request | - | +**500** | Internal server 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) + diff --git a/src/zarban/service/docs/StakingCollectRewardTxRequest.md b/src/zarban/service/docs/StakingCollectRewardTxRequest.md new file mode 100644 index 0000000..03c6d86 --- /dev/null +++ b/src/zarban/service/docs/StakingCollectRewardTxRequest.md @@ -0,0 +1,11 @@ +# StakingCollectRewardTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user | +**contract_address** | **str** | Ethereum address of the staking contract | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingCollectRewardTxResponse.md b/src/zarban/service/docs/StakingCollectRewardTxResponse.md new file mode 100644 index 0000000..b52b18a --- /dev/null +++ b/src/zarban/service/docs/StakingCollectRewardTxResponse.md @@ -0,0 +1,10 @@ +# StakingCollectRewardTxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingStakeTxRequest.md b/src/zarban/service/docs/StakingStakeTxRequest.md new file mode 100644 index 0000000..71d4e08 --- /dev/null +++ b/src/zarban/service/docs/StakingStakeTxRequest.md @@ -0,0 +1,12 @@ +# StakingStakeTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user | +**contract_address** | **str** | Ethereum address of the staking contract | +**amount** | **str** | The amount of asset to stake in native token units | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingStakeTxResponse.md b/src/zarban/service/docs/StakingStakeTxResponse.md new file mode 100644 index 0000000..a4689a7 --- /dev/null +++ b/src/zarban/service/docs/StakingStakeTxResponse.md @@ -0,0 +1,10 @@ +# StakingStakeTxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingWithdrawTxRequest.md b/src/zarban/service/docs/StakingWithdrawTxRequest.md new file mode 100644 index 0000000..2e4fd72 --- /dev/null +++ b/src/zarban/service/docs/StakingWithdrawTxRequest.md @@ -0,0 +1,12 @@ +# StakingWithdrawTxRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user | +**contract_address** | **str** | Ethereum address of the staking contract | +**amount** | **str** | The amount of asset to withdraw in native token units | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/StakingWithdrawTxResponse.md b/src/zarban/service/docs/StakingWithdrawTxResponse.md new file mode 100644 index 0000000..d56031f --- /dev/null +++ b/src/zarban/service/docs/StakingWithdrawTxResponse.md @@ -0,0 +1,10 @@ +# StakingWithdrawTxResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain_activity** | [**ChainActivity**](ChainActivity.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/SwapApi.md b/src/zarban/service/docs/SwapApi.md index bf73981..14aa286 100644 --- a/src/zarban/service/docs/SwapApi.md +++ b/src/zarban/service/docs/SwapApi.md @@ -1,14 +1,14 @@ -# openapi_client.SwapApi +# zarban.service.openapi_client.SwapApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**swap_quote_post**](SwapApi.md#swap_quote_post) | **POST** /swap/quote | Get a quote for a swap +[**get_swap_quote**](SwapApi.md#get_swap_quote) | **POST** /v2/swap/quote | Get a quote for a swap -# **swap_quote_post** -> QuoteResponse swap_quote_post(quote_request) +# **get_swap_quote** +> QuoteResponse get_swap_quote(quote_request) Get a quote for a swap @@ -19,28 +19,28 @@ Get a quote for a swap ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.SwapApi(api_client) - quote_request = openapi_client.QuoteRequest() # QuoteRequest | + api_instance = zarban.service.openapi_client.SwapApi(api_client) + quote_request = zarban.service.openapi_client.QuoteRequest() # QuoteRequest | try: # Get a quote for a swap - api_response = api_instance.swap_quote_post(quote_request) + api_response = api_instance.get_swap_quote(quote_request) pprint(api_response) except ApiException as e: - print("Exception when calling SwapApi->swap_quote_post: %s\n" % e) + print("Exception when calling SwapApi->get_swap_quote: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/wallet/docs/InlineObject12.md b/src/zarban/service/docs/SystemBadDebt.md similarity index 84% rename from src/zarban/wallet/docs/InlineObject12.md rename to src/zarban/service/docs/SystemBadDebt.md index 08167fc..27db634 100644 --- a/src/zarban/wallet/docs/InlineObject12.md +++ b/src/zarban/service/docs/SystemBadDebt.md @@ -1,9 +1,9 @@ -# InlineObject12 +# SystemBadDebt +System bad debt ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**task_id** | **str** | Task ID | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/SystemDebt.md b/src/zarban/service/docs/SystemDebt.md new file mode 100644 index 0000000..c665360 --- /dev/null +++ b/src/zarban/service/docs/SystemDebt.md @@ -0,0 +1,10 @@ +# SystemDebt + +System debt +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/SystemDebtCeiling.md b/src/zarban/service/docs/SystemDebtCeiling.md new file mode 100644 index 0000000..465731b --- /dev/null +++ b/src/zarban/service/docs/SystemDebtCeiling.md @@ -0,0 +1,10 @@ +# SystemDebtCeiling + +System debt ceiling +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/SystemSurplus.md b/src/zarban/service/docs/SystemSurplus.md new file mode 100644 index 0000000..e9604b0 --- /dev/null +++ b/src/zarban/service/docs/SystemSurplus.md @@ -0,0 +1,10 @@ +# SystemSurplus + +System surplus +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/SystemSurplusBuffer.md b/src/zarban/service/docs/SystemSurplusBuffer.md new file mode 100644 index 0000000..0da1ee8 --- /dev/null +++ b/src/zarban/service/docs/SystemSurplusBuffer.md @@ -0,0 +1,10 @@ +# SystemSurplusBuffer + +System surplus buffer +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/SystemSurplusLotSize.md b/src/zarban/service/docs/SystemSurplusLotSize.md new file mode 100644 index 0000000..bc058ad --- /dev/null +++ b/src/zarban/service/docs/SystemSurplusLotSize.md @@ -0,0 +1,10 @@ +# SystemSurplusLotSize + +System surplus lot size +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/UnclaimedReward.md b/src/zarban/service/docs/UnclaimedReward.md new file mode 100644 index 0000000..d1e0017 --- /dev/null +++ b/src/zarban/service/docs/UnclaimedReward.md @@ -0,0 +1,10 @@ +# UnclaimedReward + +The amount of unclaimed reward in native token units +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/UserBorrowsResponse.md b/src/zarban/service/docs/UserBorrowsResponse.md new file mode 100644 index 0000000..76cc334 --- /dev/null +++ b/src/zarban/service/docs/UserBorrowsResponse.md @@ -0,0 +1,10 @@ +# UserBorrowsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[LendingpoolBorrow]**](LendingpoolBorrow.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/UserDepositsResponse.md b/src/zarban/service/docs/UserDepositsResponse.md new file mode 100644 index 0000000..0688079 --- /dev/null +++ b/src/zarban/service/docs/UserDepositsResponse.md @@ -0,0 +1,10 @@ +# UserDepositsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[LendingpoolDeposit]**](LendingpoolDeposit.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/PermitDetails.md b/src/zarban/service/docs/UserError.md similarity index 66% rename from src/zarban/service/docs/PermitDetails.md rename to src/zarban/service/docs/UserError.md index f8094fa..d790f3d 100644 --- a/src/zarban/service/docs/PermitDetails.md +++ b/src/zarban/service/docs/UserError.md @@ -1,12 +1,10 @@ -# PermitDetails +# UserError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **str** | | -**amount** | **str** | | -**expiration** | **int** | | -**nonce** | **str** | | +**messages** | [**dict(str, ErrorMessage)**](ErrorMessage.md) | Localized error messages | +**reasons** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/UserStake.md b/src/zarban/service/docs/UserStake.md new file mode 100644 index 0000000..a494d50 --- /dev/null +++ b/src/zarban/service/docs/UserStake.md @@ -0,0 +1,14 @@ +# UserStake + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | Ethereum address of the user | +**balance** | [**StakeBalance**](StakeBalance.md) | | +**unclaimed_reward** | [**UnclaimedReward**](UnclaimedReward.md) | | +**contract_address** | **str** | Ethereum address of the staking contract | +**plan_name** | **str** | Name of staking plan | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/UserStakesResponse.md b/src/zarban/service/docs/UserStakesResponse.md new file mode 100644 index 0000000..aa5501f --- /dev/null +++ b/src/zarban/service/docs/UserStakesResponse.md @@ -0,0 +1,10 @@ +# UserStakesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[UserStake]**](UserStake.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/VaultEventExtension.md b/src/zarban/service/docs/VaultEventExtension.md new file mode 100644 index 0000000..9914e85 --- /dev/null +++ b/src/zarban/service/docs/VaultEventExtension.md @@ -0,0 +1,10 @@ +# VaultEventExtension + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payload** | [**VaultEvent**](VaultEvent.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/MedianEvent.md b/src/zarban/service/docs/VaultEventItem.md similarity index 52% rename from src/zarban/service/docs/MedianEvent.md rename to src/zarban/service/docs/VaultEventItem.md index a00d0f8..f692ff3 100644 --- a/src/zarban/service/docs/MedianEvent.md +++ b/src/zarban/service/docs/VaultEventItem.md @@ -1,13 +1,14 @@ -# MedianEvent +# VaultEventItem ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Identifier for the median. | -**symbol** | [**Symbol**](Symbol.md) | | [optional] -**value** | **dict(str, str)** | | -**timestamp** | [**Timestamp**](Timestamp.md) | | +**id** | **int** | Identifier for the event. | +**name** | [**EventName**](EventName.md) | | +**type** | [**EventType**](EventType.md) | | +**domain** | [**EventDomain**](EventDomain.md) | | **raw** | [**Log**](Log.md) | | +**payload** | [**VaultEvent**](VaultEvent.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/VaultEventsResponse.md b/src/zarban/service/docs/VaultEventsResponse.md new file mode 100644 index 0000000..fa364b5 --- /dev/null +++ b/src/zarban/service/docs/VaultEventsResponse.md @@ -0,0 +1,10 @@ +# VaultEventsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[ExtendedEvent]**](ExtendedEvent.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/VaultsApi.md b/src/zarban/service/docs/VaultsApi.md index 47d2a1d..d037d7e 100644 --- a/src/zarban/service/docs/VaultsApi.md +++ b/src/zarban/service/docs/VaultsApi.md @@ -1,57 +1,57 @@ -# openapi_client.VaultsApi +# zarban.service.openapi_client.VaultsApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**vaults_get**](VaultsApi.md#vaults_get) | **GET** /vaults | Get vaults by owner query -[**vaults_id_events_get**](VaultsApi.md#vaults_id_events_get) | **GET** /vaults/{id}/events | Get vault events by ID -[**vaults_id_get**](VaultsApi.md#vaults_id_get) | **GET** /vaults/{id} | Get a vault by ID +[**get_vault_by_id**](VaultsApi.md#get_vault_by_id) | **GET** /v2/vaults/{id} | Get a vault by ID +[**get_vault_events_by_id**](VaultsApi.md#get_vault_events_by_id) | **GET** /v2/vaults/{id}/events | Get vault events by ID +[**get_vaults_by_owner**](VaultsApi.md#get_vaults_by_owner) | **GET** /v2/vaults | Get vaults by owner query -# **vaults_get** -> list[Vault] vaults_get(owner=owner) +# **get_vault_by_id** +> Vault get_vault_by_id(id) -Get vaults by owner query +Get a vault by ID ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.VaultsApi(api_client) - owner = 'owner_example' # str | Ethereum address of the owner (optional) + api_instance = zarban.service.openapi_client.VaultsApi(api_client) + id = 56 # int | Vault ID try: - # Get vaults by owner query - api_response = api_instance.vaults_get(owner=owner) + # Get a vault by ID + api_response = api_instance.get_vault_by_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling VaultsApi->vaults_get: %s\n" % e) + print("Exception when calling VaultsApi->get_vault_by_id: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| Ethereum address of the owner | [optional] + **id** | **int**| Vault ID | ### Return type -[**list[Vault]**](Vault.md) +[**Vault**](Vault.md) ### Authorization @@ -72,8 +72,8 @@ 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) -# **vaults_id_events_get** -> list[BasicEvent] vaults_id_events_get(id, type=type) +# **get_vault_events_by_id** +> VaultEventsResponse get_vault_events_by_id(id, type=type) Get vault events by ID @@ -82,29 +82,29 @@ Get vault events by ID ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.VaultsApi(api_client) + api_instance = zarban.service.openapi_client.VaultsApi(api_client) id = 56 # int | Vault ID type = 'type_example' # str | Event type (optional) try: # Get vault events by ID - api_response = api_instance.vaults_id_events_get(id, type=type) + api_response = api_instance.get_vault_events_by_id(id, type=type) pprint(api_response) except ApiException as e: - print("Exception when calling VaultsApi->vaults_id_events_get: %s\n" % e) + print("Exception when calling VaultsApi->get_vault_events_by_id: %s\n" % e) ``` ### Parameters @@ -116,7 +116,7 @@ Name | Type | Description | Notes ### Return type -[**list[BasicEvent]**](BasicEvent.md) +[**VaultEventsResponse**](VaultEventsResponse.md) ### Authorization @@ -137,49 +137,49 @@ 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) -# **vaults_id_get** -> Vault vaults_id_get(id) +# **get_vaults_by_owner** +> VaultsResponse get_vaults_by_owner(owner=owner) -Get a vault by ID +Get vaults by owner query ### Example ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.VaultsApi(api_client) - id = 56 # int | Vault ID + api_instance = zarban.service.openapi_client.VaultsApi(api_client) + owner = 'owner_example' # str | Ethereum address of the owner (optional) try: - # Get a vault by ID - api_response = api_instance.vaults_id_get(id) + # Get vaults by owner query + api_response = api_instance.get_vaults_by_owner(owner=owner) pprint(api_response) except ApiException as e: - print("Exception when calling VaultsApi->vaults_id_get: %s\n" % e) + print("Exception when calling VaultsApi->get_vaults_by_owner: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| Vault ID | + **owner** | **str**| Ethereum address of the owner | [optional] ### Return type -[**Vault**](Vault.md) +[**VaultsResponse**](VaultsResponse.md) ### Authorization diff --git a/src/zarban/service/docs/VaultsResponse.md b/src/zarban/service/docs/VaultsResponse.md new file mode 100644 index 0000000..fc5be05 --- /dev/null +++ b/src/zarban/service/docs/VaultsResponse.md @@ -0,0 +1,10 @@ +# VaultsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Vault]**](Vault.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/service/docs/WebsocketApi.md b/src/zarban/service/docs/WebsocketApi.md index 5acbfd9..69ab298 100644 --- a/src/zarban/service/docs/WebsocketApi.md +++ b/src/zarban/service/docs/WebsocketApi.md @@ -1,14 +1,14 @@ -# openapi_client.WebsocketApi +# zarban.service.openapi_client.WebsocketApi All URIs are relative to *https://api.zarban.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ws_get**](WebsocketApi.md#ws_get) | **GET** /ws | Websocket Upgrade +[**get_unfilled_orders_websocket**](WebsocketApi.md#get_unfilled_orders_websocket) | **GET** /v2/ws | Websocket Upgrade -# **ws_get** -> ws_get() +# **get_unfilled_orders_websocket** +> get_unfilled_orders_websocket() Websocket Upgrade @@ -19,26 +19,26 @@ Upgrade to websocket connection ```python from __future__ import print_function import time -import openapi_client -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.zarban.io # See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( +configuration = zarban.service.openapi_client.Configuration( host = "https://api.zarban.io" ) # Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: +with zarban.service.openapi_client.ApiClient() as api_client: # Create an instance of the API class - api_instance = openapi_client.WebsocketApi(api_client) + api_instance = zarban.service.openapi_client.WebsocketApi(api_client) try: # Websocket Upgrade - api_instance.ws_get() + api_instance.get_unfilled_orders_websocket() except ApiException as e: - print("Exception when calling WebsocketApi->ws_get: %s\n" % e) + print("Exception when calling WebsocketApi->get_unfilled_orders_websocket: %s\n" % e) ``` ### Parameters diff --git a/src/zarban/service/openapi_client/__init__.py b/src/zarban/service/openapi_client/__init__.py index 9d9beb9..33716e9 100644 --- a/src/zarban/service/openapi_client/__init__.py +++ b/src/zarban/service/openapi_client/__init__.py @@ -8,6 +8,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -30,6 +31,7 @@ from zarban.service.openapi_client.api.points_api import PointsApi from zarban.service.openapi_client.api.prices_api import PricesApi from zarban.service.openapi_client.api.stable_coin_system_api import StableCoinSystemApi +from zarban.service.openapi_client.api.staking_api import StakingApi from zarban.service.openapi_client.api.swap_api import SwapApi from zarban.service.openapi_client.api.vaults_api import VaultsApi from zarban.service.openapi_client.api.websocket_api import WebsocketApi @@ -46,58 +48,56 @@ from zarban.service.openapi_client.models.account import Account from zarban.service.openapi_client.models.account_lendingpool_summary import AccountLendingpoolSummary from zarban.service.openapi_client.models.account_stablecoin_system_summary import AccountStablecoinSystemSummary +from zarban.service.openapi_client.models.account_staking_summary import AccountStakingSummary from zarban.service.openapi_client.models.address import Address -from zarban.service.openapi_client.models.answer_updated_response import AnswerUpdatedResponse -from zarban.service.openapi_client.models.auth_matrix import AuthMatrix +from zarban.service.openapi_client.models.address_response import AddressResponse from zarban.service.openapi_client.models.balance import Balance from zarban.service.openapi_client.models.basic_event import BasicEvent -from zarban.service.openapi_client.models.better_error import BetterError -from zarban.service.openapi_client.models.better_error_messages import BetterErrorMessages from zarban.service.openapi_client.models.chain_activity import ChainActivity from zarban.service.openapi_client.models.chain_activity_step import ChainActivityStep -from zarban.service.openapi_client.models.chain_id import ChainId +from zarban.service.openapi_client.models.chain_activity_step_data import ChainActivityStepData from zarban.service.openapi_client.models.dutch_amount import DutchAmount from zarban.service.openapi_client.models.eip712_sign_request import EIP712SignRequest from zarban.service.openapi_client.models.error import Error +from zarban.service.openapi_client.models.error_message import ErrorMessage +from zarban.service.openapi_client.models.event_details_response import EventDetailsResponse from zarban.service.openapi_client.models.event_domain import EventDomain from zarban.service.openapi_client.models.event_name import EventName from zarban.service.openapi_client.models.event_type import EventType -from zarban.service.openapi_client.models.file import File +from zarban.service.openapi_client.models.extended_event import ExtendedEvent from zarban.service.openapi_client.models.formatted_reserve_data import FormattedReserveData from zarban.service.openapi_client.models.ilk import Ilk -from zarban.service.openapi_client.models.inline_response200 import InlineResponse200 +from zarban.service.openapi_client.models.ilks_response import IlksResponse from zarban.service.openapi_client.models.lendingpool_borrow import LendingpoolBorrow -from zarban.service.openapi_client.models.lendingpool_borrow_event import LendingpoolBorrowEvent from zarban.service.openapi_client.models.lendingpool_borrow_tx_request import LendingpoolBorrowTxRequest +from zarban.service.openapi_client.models.lendingpool_borrow_tx_response import LendingpoolBorrowTxResponse from zarban.service.openapi_client.models.lendingpool_deposit import LendingpoolDeposit -from zarban.service.openapi_client.models.lendingpool_deposit_event import LendingpoolDepositEvent from zarban.service.openapi_client.models.lendingpool_deposit_tx_request import LendingpoolDepositTxRequest -from zarban.service.openapi_client.models.lendingpool_flash_loan_event import LendingpoolFlashLoanEvent -from zarban.service.openapi_client.models.lendingpool_liquidation_call_event import LendingpoolLiquidationCallEvent -from zarban.service.openapi_client.models.lendingpool_repay_event import LendingpoolRepayEvent +from zarban.service.openapi_client.models.lendingpool_deposit_tx_response import LendingpoolDepositTxResponse from zarban.service.openapi_client.models.lendingpool_repay_tx_request import LendingpoolRepayTxRequest +from zarban.service.openapi_client.models.lendingpool_repay_tx_response import LendingpoolRepayTxResponse from zarban.service.openapi_client.models.lendingpool_stats import LendingpoolStats from zarban.service.openapi_client.models.lendingpool_tx_response import LendingpoolTxResponse from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_request import LendingpoolUseAssetAsCollateralTxRequest -from zarban.service.openapi_client.models.lendingpool_withdraw_event import LendingpoolWithdrawEvent +from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_response import LendingpoolUseAssetAsCollateralTxResponse from zarban.service.openapi_client.models.lendingpool_withdraw_tx_request import LendingpoolWithdrawTxRequest +from zarban.service.openapi_client.models.lendingpool_withdraw_tx_response import LendingpoolWithdrawTxResponse from zarban.service.openapi_client.models.log import Log -from zarban.service.openapi_client.models.median_event import MedianEvent from zarban.service.openapi_client.models.method_parameters import MethodParameters from zarban.service.openapi_client.models.order import Order from zarban.service.openapi_client.models.order_info import OrderInfo +from zarban.service.openapi_client.models.order_response import OrderResponse from zarban.service.openapi_client.models.order_type import OrderType -from zarban.service.openapi_client.models.permission import Permission -from zarban.service.openapi_client.models.permit_details import PermitDetails from zarban.service.openapi_client.models.permit_single import PermitSingle from zarban.service.openapi_client.models.personal_sign_request import PersonalSignRequest from zarban.service.openapi_client.models.prepared_tx import PreparedTx from zarban.service.openapi_client.models.price import Price -from zarban.service.openapi_client.models.proxy import Proxy +from zarban.service.openapi_client.models.price_list_response import PriceListResponse from zarban.service.openapi_client.models.quote_request import QuoteRequest from zarban.service.openapi_client.models.quote_request_options import QuoteRequestOptions from zarban.service.openapi_client.models.quote_response import QuoteResponse from zarban.service.openapi_client.models.raw_dutch_amount import RawDutchAmount +from zarban.service.openapi_client.models.route_item import RouteItem from zarban.service.openapi_client.models.scoreboard import Scoreboard from zarban.service.openapi_client.models.scoreboard_item import ScoreboardItem from zarban.service.openapi_client.models.stablecoin_system_bark_tx_request import StablecoinSystemBarkTxRequest @@ -112,8 +112,23 @@ from zarban.service.openapi_client.models.stablecoin_system_withdraw_collateral_tx_request import StablecoinSystemWithdrawCollateralTxRequest from zarban.service.openapi_client.models.stablecoin_system_zarexit_tx_request import StablecoinSystemZarexitTxRequest from zarban.service.openapi_client.models.stablecoin_system_zarjoin_tx_request import StablecoinSystemZarjoinTxRequest +from zarban.service.openapi_client.models.stake_balance import StakeBalance +from zarban.service.openapi_client.models.stake_plan import StakePlan +from zarban.service.openapi_client.models.stake_plans_response import StakePlansResponse +from zarban.service.openapi_client.models.staking_collect_reward_tx_request import StakingCollectRewardTxRequest +from zarban.service.openapi_client.models.staking_collect_reward_tx_response import StakingCollectRewardTxResponse +from zarban.service.openapi_client.models.staking_stake_tx_request import StakingStakeTxRequest +from zarban.service.openapi_client.models.staking_stake_tx_response import StakingStakeTxResponse +from zarban.service.openapi_client.models.staking_withdraw_tx_request import StakingWithdrawTxRequest +from zarban.service.openapi_client.models.staking_withdraw_tx_response import StakingWithdrawTxResponse from zarban.service.openapi_client.models.stats import Stats from zarban.service.openapi_client.models.symbol import Symbol +from zarban.service.openapi_client.models.system_bad_debt import SystemBadDebt +from zarban.service.openapi_client.models.system_debt import SystemDebt +from zarban.service.openapi_client.models.system_debt_ceiling import SystemDebtCeiling +from zarban.service.openapi_client.models.system_surplus import SystemSurplus +from zarban.service.openapi_client.models.system_surplus_buffer import SystemSurplusBuffer +from zarban.service.openapi_client.models.system_surplus_lot_size import SystemSurplusLotSize from zarban.service.openapi_client.models.time_range import TimeRange from zarban.service.openapi_client.models.timestamp import Timestamp from zarban.service.openapi_client.models.token import Token @@ -121,9 +136,19 @@ from zarban.service.openapi_client.models.type import Type from zarban.service.openapi_client.models.typed_data import TypedData from zarban.service.openapi_client.models.typed_data_domain import TypedDataDomain +from zarban.service.openapi_client.models.unclaimed_reward import UnclaimedReward from zarban.service.openapi_client.models.update_order_request import UpdateOrderRequest +from zarban.service.openapi_client.models.user_borrows_response import UserBorrowsResponse +from zarban.service.openapi_client.models.user_deposits_response import UserDepositsResponse +from zarban.service.openapi_client.models.user_error import UserError +from zarban.service.openapi_client.models.user_stake import UserStake +from zarban.service.openapi_client.models.user_stakes_response import UserStakesResponse from zarban.service.openapi_client.models.v3_pool_in_route import V3PoolInRoute from zarban.service.openapi_client.models.vault import Vault from zarban.service.openapi_client.models.vault_event import VaultEvent +from zarban.service.openapi_client.models.vault_event_extension import VaultEventExtension +from zarban.service.openapi_client.models.vault_event_item import VaultEventItem +from zarban.service.openapi_client.models.vault_events_response import VaultEventsResponse +from zarban.service.openapi_client.models.vaults_response import VaultsResponse from zarban.service.openapi_client.models.wallet_balance import WalletBalance diff --git a/src/zarban/service/openapi_client/api/__init__.py b/src/zarban/service/openapi_client/api/__init__.py index 5f6f771..1a69c5d 100644 --- a/src/zarban/service/openapi_client/api/__init__.py +++ b/src/zarban/service/openapi_client/api/__init__.py @@ -16,6 +16,7 @@ from zarban.service.openapi_client.api.points_api import PointsApi from zarban.service.openapi_client.api.prices_api import PricesApi from zarban.service.openapi_client.api.stable_coin_system_api import StableCoinSystemApi +from zarban.service.openapi_client.api.staking_api import StakingApi from zarban.service.openapi_client.api.swap_api import SwapApi from zarban.service.openapi_client.api.vaults_api import VaultsApi from zarban.service.openapi_client.api.websocket_api import WebsocketApi diff --git a/src/zarban/service/openapi_client/api/accounts_api.py b/src/zarban/service/openapi_client/api/accounts_api.py index c1d140f..e7c1c38 100644 --- a/src/zarban/service/openapi_client/api/accounts_api.py +++ b/src/zarban/service/openapi_client/api/accounts_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_accounts_address_get(self, address, **kwargs): # noqa: E501 + def get_account_by_address(self, address, **kwargs): # noqa: E501 """Get account by address # noqa: E501 Get account by address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_accounts_address_get(address, async_req=True) + >>> thread = api.get_account_by_address(address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -59,15 +60,15 @@ def v2_accounts_address_get(self, address, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_accounts_address_get_with_http_info(address, **kwargs) # noqa: E501 + return self.get_account_by_address_with_http_info(address, **kwargs) # noqa: E501 - def v2_accounts_address_get_with_http_info(self, address, **kwargs): # noqa: E501 + def get_account_by_address_with_http_info(self, address, **kwargs): # noqa: E501 """Get account by address # noqa: E501 Get account by address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_accounts_address_get_with_http_info(address, async_req=True) + >>> thread = api.get_account_by_address_with_http_info(address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -104,14 +105,14 @@ def v2_accounts_address_get_with_http_info(self, address, **kwargs): # noqa: E5 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_accounts_address_get" % key + " to method get_account_by_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'address' is set if self.api_client.client_side_validation and ('address' not in local_var_params or # noqa: E501 local_var_params['address'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `address` when calling `v2_accounts_address_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `address` when calling `get_account_by_address`") # noqa: E501 collection_formats = {} diff --git a/src/zarban/service/openapi_client/api/addresses_api.py b/src/zarban/service/openapi_client/api/addresses_api.py index 78384c3..ea715d0 100644 --- a/src/zarban/service/openapi_client/api/addresses_api.py +++ b/src/zarban/service/openapi_client/api/addresses_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_addresses_get(self, **kwargs): # noqa: E501 + def get_all_addresses(self, **kwargs): # noqa: E501 """Get all addresses # noqa: E501 All addresses knows to Zarban. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_addresses_get(async_req=True) + >>> thread = api.get_all_addresses(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -54,20 +55,20 @@ def v2_addresses_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Address] + :return: AddressResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_addresses_get_with_http_info(**kwargs) # noqa: E501 + return self.get_all_addresses_with_http_info(**kwargs) # noqa: E501 - def v2_addresses_get_with_http_info(self, **kwargs): # noqa: E501 + def get_all_addresses_with_http_info(self, **kwargs): # noqa: E501 """Get all addresses # noqa: E501 All addresses knows to Zarban. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_addresses_get_with_http_info(async_req=True) + >>> thread = api.get_all_addresses_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -81,7 +82,7 @@ def v2_addresses_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Address], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(AddressResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -104,7 +105,7 @@ def v2_addresses_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_addresses_get" % key + " to method get_all_addresses" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -138,7 +139,7 @@ def v2_addresses_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Address]', # noqa: E501 + response_type='AddressResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/borrows_api.py b/src/zarban/service/openapi_client/api/borrows_api.py index ad03707..2371400 100644 --- a/src/zarban/service/openapi_client/api/borrows_api.py +++ b/src/zarban/service/openapi_client/api/borrows_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_lendingpool_borrows_get(self, **kwargs): # noqa: E501 + def get_user_borrows(self, **kwargs): # noqa: E501 """Get user borrows of lendingpool # noqa: E501 Get user borrows of lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_borrows_get(async_req=True) + >>> thread = api.get_user_borrows(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -57,20 +58,20 @@ def v2_lendingpool_borrows_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[LendingpoolBorrow] + :return: UserBorrowsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_borrows_get_with_http_info(**kwargs) # noqa: E501 + return self.get_user_borrows_with_http_info(**kwargs) # noqa: E501 - def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 + def get_user_borrows_with_http_info(self, **kwargs): # noqa: E501 """Get user borrows of lendingpool # noqa: E501 Get user borrows of lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_borrows_get_with_http_info(async_req=True) + >>> thread = api.get_user_borrows_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -87,7 +88,7 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[LendingpoolBorrow], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(UserBorrowsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -113,15 +114,15 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_borrows_get" % key + " to method get_user_borrows" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `user` when calling `v2_lendingpool_borrows_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_user_borrows`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `reserve` when calling `v2_lendingpool_borrows_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `reserve` when calling `get_user_borrows`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -157,7 +158,7 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LendingpoolBorrow]', # noqa: E501 + response_type='UserBorrowsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/collector_api.py b/src/zarban/service/openapi_client/api/collector_api.py index 4c93dbc..043a55e 100644 --- a/src/zarban/service/openapi_client/api/collector_api.py +++ b/src/zarban/service/openapi_client/api/collector_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_stats_get(self, **kwargs): # noqa: E501 + def get_collector_data(self, **kwargs): # noqa: E501 """Get collector data # noqa: E501 Get collector data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stats_get(async_req=True) + >>> thread = api.get_collector_data(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -58,15 +59,15 @@ def v2_stats_get(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stats_get_with_http_info(**kwargs) # noqa: E501 + return self.get_collector_data_with_http_info(**kwargs) # noqa: E501 - def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 + def get_collector_data_with_http_info(self, **kwargs): # noqa: E501 """Get collector data # noqa: E501 Get collector data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stats_get_with_http_info(async_req=True) + >>> thread = api.get_collector_data_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -101,7 +102,7 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stats_get" % key + " to method get_collector_data" % key ) local_var_params[key] = val del local_var_params['kwargs'] diff --git a/src/zarban/service/openapi_client/api/deposits_api.py b/src/zarban/service/openapi_client/api/deposits_api.py index 8ffc42d..495045e 100644 --- a/src/zarban/service/openapi_client/api/deposits_api.py +++ b/src/zarban/service/openapi_client/api/deposits_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_lendingpool_deposits_get(self, **kwargs): # noqa: E501 + def get_user_deposits(self, **kwargs): # noqa: E501 """Get user deposits of Lendingpool # noqa: E501 Get user deposits of Lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_deposits_get(async_req=True) + >>> thread = api.get_user_deposits(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -57,20 +58,20 @@ def v2_lendingpool_deposits_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[LendingpoolDeposit] + :return: UserDepositsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_deposits_get_with_http_info(**kwargs) # noqa: E501 + return self.get_user_deposits_with_http_info(**kwargs) # noqa: E501 - def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 + def get_user_deposits_with_http_info(self, **kwargs): # noqa: E501 """Get user deposits of Lendingpool # noqa: E501 Get user deposits of Lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_deposits_get_with_http_info(async_req=True) + >>> thread = api.get_user_deposits_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -87,7 +88,7 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[LendingpoolDeposit], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(UserDepositsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -113,15 +114,15 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_deposits_get" % key + " to method get_user_deposits" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `user` when calling `v2_lendingpool_deposits_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_user_deposits`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `reserve` when calling `v2_lendingpool_deposits_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `reserve` when calling `get_user_deposits`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -157,7 +158,7 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LendingpoolDeposit]', # noqa: E501 + response_type='UserDepositsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/ilks_api.py b/src/zarban/service/openapi_client/api/ilks_api.py index 74bbc8c..1488a94 100644 --- a/src/zarban/service/openapi_client/api/ilks_api.py +++ b/src/zarban/service/openapi_client/api/ilks_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_ilks_get(self, **kwargs): # noqa: E501 + def get_all_ilks(self, **kwargs): # noqa: E501 """Get all Ilks # noqa: E501 Retrieve a list of all available ilks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_get(async_req=True) + >>> thread = api.get_all_ilks(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -53,20 +54,20 @@ def v2_ilks_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Ilk] + :return: IlksResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_ilks_get_with_http_info(**kwargs) # noqa: E501 + return self.get_all_ilks_with_http_info(**kwargs) # noqa: E501 - def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 + def get_all_ilks_with_http_info(self, **kwargs): # noqa: E501 """Get all Ilks # noqa: E501 Retrieve a list of all available ilks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_get_with_http_info(async_req=True) + >>> thread = api.get_all_ilks_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -79,7 +80,7 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Ilk], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(IlksResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -101,7 +102,7 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_ilks_get" % key + " to method get_all_ilks" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -133,7 +134,7 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Ilk]', # noqa: E501 + response_type='IlksResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -141,13 +142,13 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_ilks_name_get(self, name, **kwargs): # noqa: E501 + def get_ilk_by_name(self, name, **kwargs): # noqa: E501 """Get Ilk by name # noqa: E501 Retrieve an Ilk by providing its name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_name_get(name, async_req=True) + >>> thread = api.get_ilk_by_name(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -164,15 +165,15 @@ def v2_ilks_name_get(self, name, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_ilks_name_get_with_http_info(name, **kwargs) # noqa: E501 + return self.get_ilk_by_name_with_http_info(name, **kwargs) # noqa: E501 - def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 + def get_ilk_by_name_with_http_info(self, name, **kwargs): # noqa: E501 """Get Ilk by name # noqa: E501 Retrieve an Ilk by providing its name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_name_get_with_http_info(name, async_req=True) + >>> thread = api.get_ilk_by_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -209,14 +210,14 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_ilks_name_get" % key + " to method get_ilk_by_name" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `v2_ilks_name_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_ilk_by_name`") # noqa: E501 collection_formats = {} diff --git a/src/zarban/service/openapi_client/api/lending_pool_api.py b/src/zarban/service/openapi_client/api/lending_pool_api.py index 4bdaeb3..bc62a31 100644 --- a/src/zarban/service/openapi_client/api/lending_pool_api.py +++ b/src/zarban/service/openapi_client/api/lending_pool_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,20 +37,17 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_lendingpool_borrows_get(self, **kwargs): # noqa: E501 - """Get user borrows of lendingpool # noqa: E501 + def create_lending_pool_borrow(self, lendingpool_borrow_tx_request, **kwargs): # noqa: E501 + """Borrow from lending pool # noqa: E501 - Get user borrows of lendingpool # noqa: E501 + Borrow from lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_borrows_get(async_req=True) + >>> thread = api.create_lending_pool_borrow(lendingpool_borrow_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str user: Ethereum address of the user - :param str reserve: Ethereum address of the reserve - :param int cursor: Cursor for pagination - :param int limit: Limit the number of deposits returned (default is 50) + :param LendingpoolBorrowTxRequest lendingpool_borrow_tx_request: Borrow transaction request, if amount is not provided, it will be calculated based on the token balance (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -57,27 +55,24 @@ def v2_lendingpool_borrows_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[LendingpoolBorrow] + :return: LendingpoolBorrowTxResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_borrows_get_with_http_info(**kwargs) # noqa: E501 + return self.create_lending_pool_borrow_with_http_info(lendingpool_borrow_tx_request, **kwargs) # noqa: E501 - def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 - """Get user borrows of lendingpool # noqa: E501 + def create_lending_pool_borrow_with_http_info(self, lendingpool_borrow_tx_request, **kwargs): # noqa: E501 + """Borrow from lending pool # noqa: E501 - Get user borrows of lendingpool # noqa: E501 + Borrow from lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_borrows_get_with_http_info(async_req=True) + >>> thread = api.create_lending_pool_borrow_with_http_info(lendingpool_borrow_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str user: Ethereum address of the user - :param str reserve: Ethereum address of the reserve - :param int cursor: Cursor for pagination - :param int limit: Limit the number of deposits returned (default is 50) + :param LendingpoolBorrowTxRequest lendingpool_borrow_tx_request: Borrow transaction request, if amount is not provided, it will be calculated based on the token balance (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -87,7 +82,7 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[LendingpoolBorrow], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(LendingpoolBorrowTxResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -95,10 +90,7 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'user', - 'reserve', - 'cursor', - 'limit' + 'lendingpool_borrow_tx_request' ] all_params.extend( [ @@ -113,28 +105,20 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_borrows_get" % key + " to method create_lending_pool_borrow" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'lendingpool_borrow_tx_request' is set + if self.api_client.client_side_validation and ('lendingpool_borrow_tx_request' not in local_var_params or # noqa: E501 + local_var_params['lendingpool_borrow_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `lendingpool_borrow_tx_request` when calling `create_lending_pool_borrow`") # noqa: E501 - if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `user` when calling `v2_lendingpool_borrows_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 - if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `reserve` when calling `v2_lendingpool_borrows_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 - query_params.append(('user', local_var_params['user'])) # noqa: E501 - if 'reserve' in local_var_params and local_var_params['reserve'] is not None: # noqa: E501 - query_params.append(('reserve', local_var_params['reserve'])) # noqa: E501 - if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 - query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -142,22 +126,28 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'lendingpool_borrow_tx_request' in local_var_params: + body_params = local_var_params['lendingpool_borrow_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/borrows', 'GET', + '/v2/lendingpool/tx/borrow', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LendingpoolBorrow]', # noqa: E501 + response_type='LendingpoolBorrowTxResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -165,20 +155,17 @@ def v2_lendingpool_borrows_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_deposits_get(self, **kwargs): # noqa: E501 - """Get user deposits of Lendingpool # noqa: E501 + def create_lending_pool_deposit(self, lendingpool_deposit_tx_request, **kwargs): # noqa: E501 + """Deposit to lending pool # noqa: E501 - Get user deposits of Lendingpool # noqa: E501 + Deposit to lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_deposits_get(async_req=True) + >>> thread = api.create_lending_pool_deposit(lendingpool_deposit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str user: Ethereum address of the user - :param str reserve: Ethereum address of the reserve - :param int cursor: Cursor for pagination - :param int limit: Limit the number of deposits returned (default is 50) + :param LendingpoolDepositTxRequest lendingpool_deposit_tx_request: Deposit transaction request, if amount is not provided, it will be calculated based on the token balance (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -186,27 +173,24 @@ def v2_lendingpool_deposits_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[LendingpoolDeposit] + :return: LendingpoolDepositTxResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_deposits_get_with_http_info(**kwargs) # noqa: E501 + return self.create_lending_pool_deposit_with_http_info(lendingpool_deposit_tx_request, **kwargs) # noqa: E501 - def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 - """Get user deposits of Lendingpool # noqa: E501 + def create_lending_pool_deposit_with_http_info(self, lendingpool_deposit_tx_request, **kwargs): # noqa: E501 + """Deposit to lending pool # noqa: E501 - Get user deposits of Lendingpool # noqa: E501 + Deposit to lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_deposits_get_with_http_info(async_req=True) + >>> thread = api.create_lending_pool_deposit_with_http_info(lendingpool_deposit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str user: Ethereum address of the user - :param str reserve: Ethereum address of the reserve - :param int cursor: Cursor for pagination - :param int limit: Limit the number of deposits returned (default is 50) + :param LendingpoolDepositTxRequest lendingpool_deposit_tx_request: Deposit transaction request, if amount is not provided, it will be calculated based on the token balance (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -216,7 +200,7 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[LendingpoolDeposit], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(LendingpoolDepositTxResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -224,10 +208,7 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'user', - 'reserve', - 'cursor', - 'limit' + 'lendingpool_deposit_tx_request' ] all_params.extend( [ @@ -242,28 +223,20 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_deposits_get" % key + " to method create_lending_pool_deposit" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'lendingpool_deposit_tx_request' is set + if self.api_client.client_side_validation and ('lendingpool_deposit_tx_request' not in local_var_params or # noqa: E501 + local_var_params['lendingpool_deposit_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `lendingpool_deposit_tx_request` when calling `create_lending_pool_deposit`") # noqa: E501 - if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `user` when calling `v2_lendingpool_deposits_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 - if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `reserve` when calling `v2_lendingpool_deposits_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 - query_params.append(('user', local_var_params['user'])) # noqa: E501 - if 'reserve' in local_var_params and local_var_params['reserve'] is not None: # noqa: E501 - query_params.append(('reserve', local_var_params['reserve'])) # noqa: E501 - if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 - query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -271,22 +244,28 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'lendingpool_deposit_tx_request' in local_var_params: + body_params = local_var_params['lendingpool_deposit_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/deposits', 'GET', + '/v2/lendingpool/tx/deposit', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[LendingpoolDeposit]', # noqa: E501 + response_type='LendingpoolDepositTxResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -294,17 +273,17 @@ def v2_lendingpool_deposits_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_reserves_get(self, **kwargs): # noqa: E501 - """Fetch Reserve Data By Asset # noqa: E501 + def create_lending_pool_repay(self, lendingpool_repay_tx_request, **kwargs): # noqa: E501 + """Repay to lending pool # noqa: E501 - Retrieve data of reserves # noqa: E501 + Repay to lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_reserves_get(async_req=True) + >>> thread = api.create_lending_pool_repay(lendingpool_repay_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str asset: The asset address in hexadecimal format. + :param LendingpoolRepayTxRequest lendingpool_repay_tx_request: Repay transaction request, if amount is not provided, it will repay the maximum possible amount (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -312,24 +291,24 @@ def v2_lendingpool_reserves_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: FormattedReserveData + :return: LendingpoolRepayTxResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_reserves_get_with_http_info(**kwargs) # noqa: E501 + return self.create_lending_pool_repay_with_http_info(lendingpool_repay_tx_request, **kwargs) # noqa: E501 - def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 - """Fetch Reserve Data By Asset # noqa: E501 + def create_lending_pool_repay_with_http_info(self, lendingpool_repay_tx_request, **kwargs): # noqa: E501 + """Repay to lending pool # noqa: E501 - Retrieve data of reserves # noqa: E501 + Repay to lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_reserves_get_with_http_info(async_req=True) + >>> thread = api.create_lending_pool_repay_with_http_info(lendingpool_repay_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str asset: The asset address in hexadecimal format. + :param LendingpoolRepayTxRequest lendingpool_repay_tx_request: Repay transaction request, if amount is not provided, it will repay the maximum possible amount (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -339,7 +318,7 @@ def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(FormattedReserveData, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(LendingpoolRepayTxResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -347,7 +326,7 @@ def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'asset' + 'lendingpool_repay_tx_request' ] all_params.extend( [ @@ -362,18 +341,20 @@ def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_reserves_get" % key + " to method create_lending_pool_repay" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'lendingpool_repay_tx_request' is set + if self.api_client.client_side_validation and ('lendingpool_repay_tx_request' not in local_var_params or # noqa: E501 + local_var_params['lendingpool_repay_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `lendingpool_repay_tx_request` when calling `create_lending_pool_repay`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'asset' in local_var_params and local_var_params['asset'] is not None: # noqa: E501 - query_params.append(('asset', local_var_params['asset'])) # noqa: E501 header_params = {} @@ -381,22 +362,28 @@ def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'lendingpool_repay_tx_request' in local_var_params: + body_params = local_var_params['lendingpool_repay_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/reserves', 'GET', + '/v2/lendingpool/tx/repay', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='FormattedReserveData', # noqa: E501 + response_type='LendingpoolRepayTxResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -404,17 +391,17 @@ def v2_lendingpool_reserves_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_tx_borrow_post(self, lendingpool_borrow_tx_request, **kwargs): # noqa: E501 - """Borrow from lending pool # noqa: E501 + def create_lending_pool_withdraw(self, lendingpool_withdraw_tx_request, **kwargs): # noqa: E501 + """Withdraw from lending pool # noqa: E501 - Borrow from lending pool # noqa: E501 + Withdraw from lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_borrow_post(lendingpool_borrow_tx_request, async_req=True) + >>> thread = api.create_lending_pool_withdraw(lendingpool_withdraw_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolBorrowTxRequest lendingpool_borrow_tx_request: Borrow transaction request, if amount is not provided, it will be calculated based on the token balance (required) + :param LendingpoolWithdrawTxRequest lendingpool_withdraw_tx_request: Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -422,24 +409,24 @@ def v2_lendingpool_tx_borrow_post(self, lendingpool_borrow_tx_request, **kwargs) number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: InlineResponse200 + :return: LendingpoolWithdrawTxResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_tx_borrow_post_with_http_info(lendingpool_borrow_tx_request, **kwargs) # noqa: E501 + return self.create_lending_pool_withdraw_with_http_info(lendingpool_withdraw_tx_request, **kwargs) # noqa: E501 - def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_request, **kwargs): # noqa: E501 - """Borrow from lending pool # noqa: E501 + def create_lending_pool_withdraw_with_http_info(self, lendingpool_withdraw_tx_request, **kwargs): # noqa: E501 + """Withdraw from lending pool # noqa: E501 - Borrow from lending pool # noqa: E501 + Withdraw from lending pool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_borrow_post_with_http_info(lendingpool_borrow_tx_request, async_req=True) + >>> thread = api.create_lending_pool_withdraw_with_http_info(lendingpool_withdraw_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolBorrowTxRequest lendingpool_borrow_tx_request: Borrow transaction request, if amount is not provided, it will be calculated based on the token balance (required) + :param LendingpoolWithdrawTxRequest lendingpool_withdraw_tx_request: Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -449,7 +436,7 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(LendingpoolWithdrawTxResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -457,7 +444,7 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req local_var_params = locals() all_params = [ - 'lendingpool_borrow_tx_request' + 'lendingpool_withdraw_tx_request' ] all_params.extend( [ @@ -472,14 +459,14 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_tx_borrow_post" % key + " to method create_lending_pool_withdraw" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lendingpool_borrow_tx_request' is set - if self.api_client.client_side_validation and ('lendingpool_borrow_tx_request' not in local_var_params or # noqa: E501 - local_var_params['lendingpool_borrow_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `lendingpool_borrow_tx_request` when calling `v2_lendingpool_tx_borrow_post`") # noqa: E501 + # verify the required parameter 'lendingpool_withdraw_tx_request' is set + if self.api_client.client_side_validation and ('lendingpool_withdraw_tx_request' not in local_var_params or # noqa: E501 + local_var_params['lendingpool_withdraw_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `lendingpool_withdraw_tx_request` when calling `create_lending_pool_withdraw`") # noqa: E501 collection_formats = {} @@ -493,8 +480,8 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req local_var_files = {} body_params = None - if 'lendingpool_borrow_tx_request' in local_var_params: - body_params = local_var_params['lendingpool_borrow_tx_request'] + if 'lendingpool_withdraw_tx_request' in local_var_params: + body_params = local_var_params['lendingpool_withdraw_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -507,14 +494,14 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/tx/borrow', 'POST', + '/v2/lendingpool/tx/withdraw', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='LendingpoolWithdrawTxResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -522,17 +509,17 @@ def v2_lendingpool_tx_borrow_post_with_http_info(self, lendingpool_borrow_tx_req _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_tx_deposit_post(self, lendingpool_deposit_tx_request, **kwargs): # noqa: E501 - """Deposit to lending pool # noqa: E501 + def fetch_reserve_data_by_asset(self, **kwargs): # noqa: E501 + """Fetch Reserve Data By Asset # noqa: E501 - Deposit to lending pool # noqa: E501 + Retrieve data of reserves # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_deposit_post(lendingpool_deposit_tx_request, async_req=True) + >>> thread = api.fetch_reserve_data_by_asset(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolDepositTxRequest lendingpool_deposit_tx_request: Deposit transaction request, if amount is not provided, it will be calculated based on the token balance (required) + :param str asset: The asset address in hexadecimal format. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -540,24 +527,24 @@ def v2_lendingpool_tx_deposit_post(self, lendingpool_deposit_tx_request, **kwarg number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: InlineResponse200 + :return: FormattedReserveData If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_tx_deposit_post_with_http_info(lendingpool_deposit_tx_request, **kwargs) # noqa: E501 + return self.fetch_reserve_data_by_asset_with_http_info(**kwargs) # noqa: E501 - def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_request, **kwargs): # noqa: E501 - """Deposit to lending pool # noqa: E501 + def fetch_reserve_data_by_asset_with_http_info(self, **kwargs): # noqa: E501 + """Fetch Reserve Data By Asset # noqa: E501 - Deposit to lending pool # noqa: E501 + Retrieve data of reserves # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_deposit_post_with_http_info(lendingpool_deposit_tx_request, async_req=True) + >>> thread = api.fetch_reserve_data_by_asset_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolDepositTxRequest lendingpool_deposit_tx_request: Deposit transaction request, if amount is not provided, it will be calculated based on the token balance (required) + :param str asset: The asset address in hexadecimal format. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -567,7 +554,7 @@ def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_r number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(FormattedReserveData, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -575,7 +562,7 @@ def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_r local_var_params = locals() all_params = [ - 'lendingpool_deposit_tx_request' + 'asset' ] all_params.extend( [ @@ -590,20 +577,18 @@ def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_r if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_tx_deposit_post" % key + " to method fetch_reserve_data_by_asset" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lendingpool_deposit_tx_request' is set - if self.api_client.client_side_validation and ('lendingpool_deposit_tx_request' not in local_var_params or # noqa: E501 - local_var_params['lendingpool_deposit_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `lendingpool_deposit_tx_request` when calling `v2_lendingpool_tx_deposit_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'asset' in local_var_params and local_var_params['asset'] is not None: # noqa: E501 + query_params.append(('asset', local_var_params['asset'])) # noqa: E501 header_params = {} @@ -611,28 +596,22 @@ def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_r local_var_files = {} body_params = None - if 'lendingpool_deposit_tx_request' in local_var_params: - body_params = local_var_params['lendingpool_deposit_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/tx/deposit', 'POST', + '/v2/lendingpool/reserves', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='FormattedReserveData', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -640,17 +619,20 @@ def v2_lendingpool_tx_deposit_post_with_http_info(self, lendingpool_deposit_tx_r _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_tx_repay_post(self, lendingpool_repay_tx_request, **kwargs): # noqa: E501 - """Repay to lending pool # noqa: E501 + def get_user_borrows(self, **kwargs): # noqa: E501 + """Get user borrows of lendingpool # noqa: E501 - Repay to lending pool # noqa: E501 + Get user borrows of lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_repay_post(lendingpool_repay_tx_request, async_req=True) + >>> thread = api.get_user_borrows(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolRepayTxRequest lendingpool_repay_tx_request: Repay transaction request, if amount is not provided, it will repay the maximum possible amount (required) + :param str user: Ethereum address of the user + :param str reserve: Ethereum address of the reserve + :param int cursor: Cursor for pagination + :param int limit: Limit the number of deposits returned (default is 50) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -658,24 +640,27 @@ def v2_lendingpool_tx_repay_post(self, lendingpool_repay_tx_request, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: InlineResponse200 + :return: UserBorrowsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_tx_repay_post_with_http_info(lendingpool_repay_tx_request, **kwargs) # noqa: E501 + return self.get_user_borrows_with_http_info(**kwargs) # noqa: E501 - def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_request, **kwargs): # noqa: E501 - """Repay to lending pool # noqa: E501 + def get_user_borrows_with_http_info(self, **kwargs): # noqa: E501 + """Get user borrows of lendingpool # noqa: E501 - Repay to lending pool # noqa: E501 + Get user borrows of lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_repay_post_with_http_info(lendingpool_repay_tx_request, async_req=True) + >>> thread = api.get_user_borrows_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolRepayTxRequest lendingpool_repay_tx_request: Repay transaction request, if amount is not provided, it will repay the maximum possible amount (required) + :param str user: Ethereum address of the user + :param str reserve: Ethereum address of the reserve + :param int cursor: Cursor for pagination + :param int limit: Limit the number of deposits returned (default is 50) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -685,7 +670,7 @@ def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_reque number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(UserBorrowsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -693,7 +678,10 @@ def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_reque local_var_params = locals() all_params = [ - 'lendingpool_repay_tx_request' + 'user', + 'reserve', + 'cursor', + 'limit' ] all_params.extend( [ @@ -708,20 +696,28 @@ def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_reque if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_tx_repay_post" % key + " to method get_user_borrows" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lendingpool_repay_tx_request' is set - if self.api_client.client_side_validation and ('lendingpool_repay_tx_request' not in local_var_params or # noqa: E501 - local_var_params['lendingpool_repay_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `lendingpool_repay_tx_request` when calling `v2_lendingpool_tx_repay_post`") # noqa: E501 + if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_user_borrows`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `reserve` when calling `get_user_borrows`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 + query_params.append(('user', local_var_params['user'])) # noqa: E501 + if 'reserve' in local_var_params and local_var_params['reserve'] is not None: # noqa: E501 + query_params.append(('reserve', local_var_params['reserve'])) # noqa: E501 + if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -729,28 +725,22 @@ def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_reque local_var_files = {} body_params = None - if 'lendingpool_repay_tx_request' in local_var_params: - body_params = local_var_params['lendingpool_repay_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/tx/repay', 'POST', + '/v2/lendingpool/borrows', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='UserBorrowsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -758,17 +748,20 @@ def v2_lendingpool_tx_repay_post_with_http_info(self, lendingpool_repay_tx_reque _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_tx_useassetascollateral_post(self, lendingpool_use_asset_as_collateral_tx_request, **kwargs): # noqa: E501 - """Enable/Disable asset as collateral # noqa: E501 + def get_user_deposits(self, **kwargs): # noqa: E501 + """Get user deposits of Lendingpool # noqa: E501 - Allows to enable/disable a specific asset as collateral # noqa: E501 + Get user deposits of Lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_useassetascollateral_post(lendingpool_use_asset_as_collateral_tx_request, async_req=True) + >>> thread = api.get_user_deposits(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolUseAssetAsCollateralTxRequest lendingpool_use_asset_as_collateral_tx_request: UseAssetAsCollateral transaction request (required) + :param str user: Ethereum address of the user + :param str reserve: Ethereum address of the reserve + :param int cursor: Cursor for pagination + :param int limit: Limit the number of deposits returned (default is 50) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -776,24 +769,27 @@ def v2_lendingpool_tx_useassetascollateral_post(self, lendingpool_use_asset_as_c number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: InlineResponse200 + :return: UserDepositsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_tx_useassetascollateral_post_with_http_info(lendingpool_use_asset_as_collateral_tx_request, **kwargs) # noqa: E501 + return self.get_user_deposits_with_http_info(**kwargs) # noqa: E501 - def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool_use_asset_as_collateral_tx_request, **kwargs): # noqa: E501 - """Enable/Disable asset as collateral # noqa: E501 + def get_user_deposits_with_http_info(self, **kwargs): # noqa: E501 + """Get user deposits of Lendingpool # noqa: E501 - Allows to enable/disable a specific asset as collateral # noqa: E501 + Get user deposits of Lendingpool # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_useassetascollateral_post_with_http_info(lendingpool_use_asset_as_collateral_tx_request, async_req=True) + >>> thread = api.get_user_deposits_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolUseAssetAsCollateralTxRequest lendingpool_use_asset_as_collateral_tx_request: UseAssetAsCollateral transaction request (required) + :param str user: Ethereum address of the user + :param str reserve: Ethereum address of the reserve + :param int cursor: Cursor for pagination + :param int limit: Limit the number of deposits returned (default is 50) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -803,7 +799,7 @@ def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(UserDepositsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -811,7 +807,10 @@ def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool local_var_params = locals() all_params = [ - 'lendingpool_use_asset_as_collateral_tx_request' + 'user', + 'reserve', + 'cursor', + 'limit' ] all_params.extend( [ @@ -826,20 +825,28 @@ def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_tx_useassetascollateral_post" % key + " to method get_user_deposits" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lendingpool_use_asset_as_collateral_tx_request' is set - if self.api_client.client_side_validation and ('lendingpool_use_asset_as_collateral_tx_request' not in local_var_params or # noqa: E501 - local_var_params['lendingpool_use_asset_as_collateral_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `lendingpool_use_asset_as_collateral_tx_request` when calling `v2_lendingpool_tx_useassetascollateral_post`") # noqa: E501 + if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_user_deposits`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + if self.api_client.client_side_validation and 'reserve' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['reserve']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `reserve` when calling `get_user_deposits`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 + query_params.append(('user', local_var_params['user'])) # noqa: E501 + if 'reserve' in local_var_params and local_var_params['reserve'] is not None: # noqa: E501 + query_params.append(('reserve', local_var_params['reserve'])) # noqa: E501 + if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -847,28 +854,22 @@ def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool local_var_files = {} body_params = None - if 'lendingpool_use_asset_as_collateral_tx_request' in local_var_params: - body_params = local_var_params['lendingpool_use_asset_as_collateral_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/tx/useassetascollateral', 'POST', + '/v2/lendingpool/deposits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='UserDepositsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -876,17 +877,17 @@ def v2_lendingpool_tx_useassetascollateral_post_with_http_info(self, lendingpool _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_lendingpool_tx_withdraw_post(self, lendingpool_withdraw_tx_request, **kwargs): # noqa: E501 - """Withdraw from lending pool # noqa: E501 + def set_lending_pool_asset_collateral(self, lendingpool_use_asset_as_collateral_tx_request, **kwargs): # noqa: E501 + """Enable/Disable asset as collateral # noqa: E501 - Withdraw from lending pool # noqa: E501 + Allows to enable/disable a specific asset as collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_withdraw_post(lendingpool_withdraw_tx_request, async_req=True) + >>> thread = api.set_lending_pool_asset_collateral(lendingpool_use_asset_as_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolWithdrawTxRequest lendingpool_withdraw_tx_request: Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status (required) + :param LendingpoolUseAssetAsCollateralTxRequest lendingpool_use_asset_as_collateral_tx_request: UseAssetAsCollateral transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -894,24 +895,24 @@ def v2_lendingpool_tx_withdraw_post(self, lendingpool_withdraw_tx_request, **kwa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: InlineResponse200 + :return: LendingpoolUseAssetAsCollateralTxResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_lendingpool_tx_withdraw_post_with_http_info(lendingpool_withdraw_tx_request, **kwargs) # noqa: E501 + return self.set_lending_pool_asset_collateral_with_http_info(lendingpool_use_asset_as_collateral_tx_request, **kwargs) # noqa: E501 - def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx_request, **kwargs): # noqa: E501 - """Withdraw from lending pool # noqa: E501 + def set_lending_pool_asset_collateral_with_http_info(self, lendingpool_use_asset_as_collateral_tx_request, **kwargs): # noqa: E501 + """Enable/Disable asset as collateral # noqa: E501 - Withdraw from lending pool # noqa: E501 + Allows to enable/disable a specific asset as collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_lendingpool_tx_withdraw_post_with_http_info(lendingpool_withdraw_tx_request, async_req=True) + >>> thread = api.set_lending_pool_asset_collateral_with_http_info(lendingpool_use_asset_as_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param LendingpoolWithdrawTxRequest lendingpool_withdraw_tx_request: Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status (required) + :param LendingpoolUseAssetAsCollateralTxRequest lendingpool_use_asset_as_collateral_tx_request: UseAssetAsCollateral transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -921,7 +922,7 @@ def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(LendingpoolUseAssetAsCollateralTxResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -929,7 +930,7 @@ def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx local_var_params = locals() all_params = [ - 'lendingpool_withdraw_tx_request' + 'lendingpool_use_asset_as_collateral_tx_request' ] all_params.extend( [ @@ -944,14 +945,14 @@ def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_lendingpool_tx_withdraw_post" % key + " to method set_lending_pool_asset_collateral" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lendingpool_withdraw_tx_request' is set - if self.api_client.client_side_validation and ('lendingpool_withdraw_tx_request' not in local_var_params or # noqa: E501 - local_var_params['lendingpool_withdraw_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `lendingpool_withdraw_tx_request` when calling `v2_lendingpool_tx_withdraw_post`") # noqa: E501 + # verify the required parameter 'lendingpool_use_asset_as_collateral_tx_request' is set + if self.api_client.client_side_validation and ('lendingpool_use_asset_as_collateral_tx_request' not in local_var_params or # noqa: E501 + local_var_params['lendingpool_use_asset_as_collateral_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `lendingpool_use_asset_as_collateral_tx_request` when calling `set_lending_pool_asset_collateral`") # noqa: E501 collection_formats = {} @@ -965,8 +966,8 @@ def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx local_var_files = {} body_params = None - if 'lendingpool_withdraw_tx_request' in local_var_params: - body_params = local_var_params['lendingpool_withdraw_tx_request'] + if 'lendingpool_use_asset_as_collateral_tx_request' in local_var_params: + body_params = local_var_params['lendingpool_use_asset_as_collateral_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -979,14 +980,14 @@ def v2_lendingpool_tx_withdraw_post_with_http_info(self, lendingpool_withdraw_tx auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/lendingpool/tx/withdraw', 'POST', + '/v2/lendingpool/tx/useassetascollateral', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='LendingpoolUseAssetAsCollateralTxResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/logs_api.py b/src/zarban/service/openapi_client/api/logs_api.py index 228dad3..0890d68 100644 --- a/src/zarban/service/openapi_client/api/logs_api.py +++ b/src/zarban/service/openapi_client/api/logs_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_logs_tx_hash_get(self, tx_hash, **kwargs): # noqa: E501 + def get_logs_by_transaction_hash(self, tx_hash, **kwargs): # noqa: E501 """Get raw and decoded logs by transaction hash # noqa: E501 Get raw and decoded logs by transaction hash # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_logs_tx_hash_get(tx_hash, async_req=True) + >>> thread = api.get_logs_by_transaction_hash(tx_hash, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -54,20 +55,20 @@ def v2_logs_tx_hash_get(self, tx_hash, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Log] + :return: EventDetailsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_logs_tx_hash_get_with_http_info(tx_hash, **kwargs) # noqa: E501 + return self.get_logs_by_transaction_hash_with_http_info(tx_hash, **kwargs) # noqa: E501 - def v2_logs_tx_hash_get_with_http_info(self, tx_hash, **kwargs): # noqa: E501 + def get_logs_by_transaction_hash_with_http_info(self, tx_hash, **kwargs): # noqa: E501 """Get raw and decoded logs by transaction hash # noqa: E501 Get raw and decoded logs by transaction hash # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_logs_tx_hash_get_with_http_info(tx_hash, async_req=True) + >>> thread = api.get_logs_by_transaction_hash_with_http_info(tx_hash, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -81,7 +82,7 @@ def v2_logs_tx_hash_get_with_http_info(self, tx_hash, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Log], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(EventDetailsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -104,17 +105,17 @@ def v2_logs_tx_hash_get_with_http_info(self, tx_hash, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_logs_tx_hash_get" % key + " to method get_logs_by_transaction_hash" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tx_hash' is set if self.api_client.client_side_validation and ('tx_hash' not in local_var_params or # noqa: E501 local_var_params['tx_hash'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `tx_hash` when calling `v2_logs_tx_hash_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `tx_hash` when calling `get_logs_by_transaction_hash`") # noqa: E501 if self.api_client.client_side_validation and 'tx_hash' in local_var_params and not re.search(r'0x[a-fA-F0-9]{64}', local_var_params['tx_hash']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `tx_hash` when calling `v2_logs_tx_hash_get`, must conform to the pattern `/0x[a-fA-F0-9]{64}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `tx_hash` when calling `get_logs_by_transaction_hash`, must conform to the pattern `/0x[a-fA-F0-9]{64}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -144,7 +145,7 @@ def v2_logs_tx_hash_get_with_http_info(self, tx_hash, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Log]', # noqa: E501 + response_type='EventDetailsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/orders_api.py b/src/zarban/service/openapi_client/api/orders_api.py index fd39423..d2298c8 100644 --- a/src/zarban/service/openapi_client/api/orders_api.py +++ b/src/zarban/service/openapi_client/api/orders_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_orders_get(self, **kwargs): # noqa: E501 + def get_unfilled_orders(self, **kwargs): # noqa: E501 """Fetch Unfilled Orders # noqa: E501 Get a list of unfilled orders filtered by different parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_orders_get(async_req=True) + >>> thread = api.get_unfilled_orders(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -63,20 +64,20 @@ def v2_orders_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Order] + :return: OrderResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_orders_get_with_http_info(**kwargs) # noqa: E501 + return self.get_unfilled_orders_with_http_info(**kwargs) # noqa: E501 - def v2_orders_get_with_http_info(self, **kwargs): # noqa: E501 + def get_unfilled_orders_with_http_info(self, **kwargs): # noqa: E501 """Fetch Unfilled Orders # noqa: E501 Get a list of unfilled orders filtered by different parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_orders_get_with_http_info(async_req=True) + >>> thread = api.get_unfilled_orders_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -99,7 +100,7 @@ def v2_orders_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Order], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(OrderResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -131,17 +132,17 @@ def v2_orders_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_orders_get" % key + " to method get_unfilled_orders" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'hash' in local_var_params and not re.search(r'^0x[0-9,a-z,A-Z]{64}$', local_var_params['hash']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `hash` when calling `v2_orders_get`, must conform to the pattern `/^0x[0-9,a-z,A-Z]{64}$/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `hash` when calling `get_unfilled_orders`, must conform to the pattern `/^0x[0-9,a-z,A-Z]{64}$/`") # noqa: E501 if self.api_client.client_side_validation and 'offerer' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['offerer']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `offerer` when calling `v2_orders_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `offerer` when calling `get_unfilled_orders`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 if self.api_client.client_side_validation and 'filler' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['filler']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `filler` when calling `v2_orders_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `filler` when calling `get_unfilled_orders`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -189,7 +190,7 @@ def v2_orders_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Order]', # noqa: E501 + response_type='OrderResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -197,13 +198,13 @@ def v2_orders_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_orders_sync_post(self, update_order_request, **kwargs): # noqa: E501 + def sync_order(self, update_order_request, **kwargs): # noqa: E501 """Updates Order Entity # noqa: E501 updates an order entity in database # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_orders_sync_post(update_order_request, async_req=True) + >>> thread = api.sync_order(update_order_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -220,15 +221,15 @@ def v2_orders_sync_post(self, update_order_request, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_orders_sync_post_with_http_info(update_order_request, **kwargs) # noqa: E501 + return self.sync_order_with_http_info(update_order_request, **kwargs) # noqa: E501 - def v2_orders_sync_post_with_http_info(self, update_order_request, **kwargs): # noqa: E501 + def sync_order_with_http_info(self, update_order_request, **kwargs): # noqa: E501 """Updates Order Entity # noqa: E501 updates an order entity in database # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_orders_sync_post_with_http_info(update_order_request, async_req=True) + >>> thread = api.sync_order_with_http_info(update_order_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -265,14 +266,14 @@ def v2_orders_sync_post_with_http_info(self, update_order_request, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_orders_sync_post" % key + " to method sync_order" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'update_order_request' is set if self.api_client.client_side_validation and ('update_order_request' not in local_var_params or # noqa: E501 local_var_params['update_order_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_order_request` when calling `v2_orders_sync_post`") # noqa: E501 + raise ApiValueError("Missing the required parameter `update_order_request` when calling `sync_order`") # noqa: E501 collection_formats = {} diff --git a/src/zarban/service/openapi_client/api/permit_api.py b/src/zarban/service/openapi_client/api/permit_api.py index 46f949e..60e5ba8 100644 --- a/src/zarban/service/openapi_client/api/permit_api.py +++ b/src/zarban/service/openapi_client/api/permit_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_permit_single_get(self, token, user, **kwargs): # noqa: E501 + def get_single_token_permit(self, token, user, **kwargs): # noqa: E501 """Get permit for single token # noqa: E501 Get permit for single token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_permit_single_get(token, user, async_req=True) + >>> thread = api.get_single_token_permit(token, user, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -60,15 +61,15 @@ def v2_permit_single_get(self, token, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_permit_single_get_with_http_info(token, user, **kwargs) # noqa: E501 + return self.get_single_token_permit_with_http_info(token, user, **kwargs) # noqa: E501 - def v2_permit_single_get_with_http_info(self, token, user, **kwargs): # noqa: E501 + def get_single_token_permit_with_http_info(self, token, user, **kwargs): # noqa: E501 """Get permit for single token # noqa: E501 Get permit for single token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_permit_single_get_with_http_info(token, user, async_req=True) + >>> thread = api.get_single_token_permit_with_http_info(token, user, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -107,23 +108,23 @@ def v2_permit_single_get_with_http_info(self, token, user, **kwargs): # noqa: E if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_permit_single_get" % key + " to method get_single_token_permit" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'token' is set if self.api_client.client_side_validation and ('token' not in local_var_params or # noqa: E501 local_var_params['token'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `token` when calling `v2_permit_single_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `token` when calling `get_single_token_permit`") # noqa: E501 # verify the required parameter 'user' is set if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `v2_permit_single_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_single_token_permit`") # noqa: E501 if self.api_client.client_side_validation and 'token' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['token']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `token` when calling `v2_permit_single_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `token` when calling `get_single_token_permit`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 - raise ApiValueError("Invalid value for parameter `user` when calling `v2_permit_single_get`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_single_token_permit`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 collection_formats = {} path_params = {} diff --git a/src/zarban/service/openapi_client/api/points_api.py b/src/zarban/service/openapi_client/api/points_api.py index caa364b..27e31cc 100644 --- a/src/zarban/service/openapi_client/api/points_api.py +++ b/src/zarban/service/openapi_client/api/points_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_points_scoreboard_get(self, **kwargs): # noqa: E501 + def get_scoreboard(self, **kwargs): # noqa: E501 """Get scoreboard # noqa: E501 Get scoreboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_points_scoreboard_get(async_req=True) + >>> thread = api.get_scoreboard(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -58,15 +59,15 @@ def v2_points_scoreboard_get(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_points_scoreboard_get_with_http_info(**kwargs) # noqa: E501 + return self.get_scoreboard_with_http_info(**kwargs) # noqa: E501 - def v2_points_scoreboard_get_with_http_info(self, **kwargs): # noqa: E501 + def get_scoreboard_with_http_info(self, **kwargs): # noqa: E501 """Get scoreboard # noqa: E501 Get scoreboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_points_scoreboard_get_with_http_info(async_req=True) + >>> thread = api.get_scoreboard_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -101,7 +102,7 @@ def v2_points_scoreboard_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_points_scoreboard_get" % key + " to method get_scoreboard" % key ) local_var_params[key] = val del local_var_params['kwargs'] diff --git a/src/zarban/service/openapi_client/api/prices_api.py b/src/zarban/service/openapi_client/api/prices_api.py index 9a639c5..f0430e1 100644 --- a/src/zarban/service/openapi_client/api/prices_api.py +++ b/src/zarban/service/openapi_client/api/prices_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_prices_get(self, **kwargs): # noqa: E501 + def list_prices(self, **kwargs): # noqa: E501 """List prices based on query parameters # noqa: E501 Retrieve a list of price details based on specified query parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_prices_get(async_req=True) + >>> thread = api.list_prices(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -54,20 +55,20 @@ def v2_prices_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Price] + :return: PriceListResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_prices_get_with_http_info(**kwargs) # noqa: E501 + return self.list_prices_with_http_info(**kwargs) # noqa: E501 - def v2_prices_get_with_http_info(self, **kwargs): # noqa: E501 + def list_prices_with_http_info(self, **kwargs): # noqa: E501 """List prices based on query parameters # noqa: E501 Retrieve a list of price details based on specified query parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_prices_get_with_http_info(async_req=True) + >>> thread = api.list_prices_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -81,7 +82,7 @@ def v2_prices_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Price], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(PriceListResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -104,7 +105,7 @@ def v2_prices_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_prices_get" % key + " to method list_prices" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -138,7 +139,7 @@ def v2_prices_get_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Price]', # noqa: E501 + response_type='PriceListResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/stable_coin_system_api.py b/src/zarban/service/openapi_client/api/stable_coin_system_api.py index d53ea7c..135772c 100644 --- a/src/zarban/service/openapi_client/api/stable_coin_system_api.py +++ b/src/zarban/service/openapi_client/api/stable_coin_system_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,16 +37,17 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_ilks_get(self, **kwargs): # noqa: E501 - """Get all Ilks # noqa: E501 + def approve_and_join_zar_transaction(self, stablecoin_system_zarjoin_tx_request, **kwargs): # noqa: E501 + """approve and join ZAR token into Vat contract # noqa: E501 - Retrieve a list of all available ilks. # noqa: E501 + approve and join ZAR token into Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_get(async_req=True) + >>> thread = api.approve_and_join_zar_transaction(stablecoin_system_zarjoin_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously + :param StablecoinSystemZarjoinTxRequest stablecoin_system_zarjoin_tx_request: Approve and join Zar token into Vat contract transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -53,23 +55,24 @@ def v2_ilks_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Ilk] + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_ilks_get_with_http_info(**kwargs) # noqa: E501 + return self.approve_and_join_zar_transaction_with_http_info(stablecoin_system_zarjoin_tx_request, **kwargs) # noqa: E501 - def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 - """Get all Ilks # noqa: E501 + def approve_and_join_zar_transaction_with_http_info(self, stablecoin_system_zarjoin_tx_request, **kwargs): # noqa: E501 + """approve and join ZAR token into Vat contract # noqa: E501 - Retrieve a list of all available ilks. # noqa: E501 + approve and join ZAR token into Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_get_with_http_info(async_req=True) + >>> thread = api.approve_and_join_zar_transaction_with_http_info(stablecoin_system_zarjoin_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously + :param StablecoinSystemZarjoinTxRequest stablecoin_system_zarjoin_tx_request: Approve and join Zar token into Vat contract transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -79,7 +82,7 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Ilk], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -87,6 +90,7 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'stablecoin_system_zarjoin_tx_request' ] all_params.extend( [ @@ -101,10 +105,14 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_ilks_get" % key + " to method approve_and_join_zar_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'stablecoin_system_zarjoin_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_zarjoin_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_zarjoin_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_zarjoin_tx_request` when calling `approve_and_join_zar_transaction`") # noqa: E501 collection_formats = {} @@ -118,22 +126,28 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_zarjoin_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_zarjoin_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/ilks', 'GET', + '/v2/stablecoinsystem/auctions/tx/zarjoin', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Ilk]', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -141,17 +155,17 @@ def v2_ilks_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_ilks_name_get(self, name, **kwargs): # noqa: E501 - """Get Ilk by name # noqa: E501 + def create_stable_coin_vault(self, stablecoin_system_create_vault_tx_request, **kwargs): # noqa: E501 + """Create vault # noqa: E501 - Retrieve an Ilk by providing its name. # noqa: E501 + Create vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_name_get(name, async_req=True) + >>> thread = api.create_stable_coin_vault(stablecoin_system_create_vault_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str name: Name of the ILK (required) + :param StablecoinSystemCreateVaultTxRequest stablecoin_system_create_vault_tx_request: Create vault transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -159,24 +173,24 @@ def v2_ilks_name_get(self, name, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: Ilk + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_ilks_name_get_with_http_info(name, **kwargs) # noqa: E501 + return self.create_stable_coin_vault_with_http_info(stablecoin_system_create_vault_tx_request, **kwargs) # noqa: E501 - def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 - """Get Ilk by name # noqa: E501 + def create_stable_coin_vault_with_http_info(self, stablecoin_system_create_vault_tx_request, **kwargs): # noqa: E501 + """Create vault # noqa: E501 - Retrieve an Ilk by providing its name. # noqa: E501 + Create vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ilks_name_get_with_http_info(name, async_req=True) + >>> thread = api.create_stable_coin_vault_with_http_info(stablecoin_system_create_vault_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str name: Name of the ILK (required) + :param StablecoinSystemCreateVaultTxRequest stablecoin_system_create_vault_tx_request: Create vault transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -186,7 +200,7 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(Ilk, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -194,7 +208,7 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'name' + 'stablecoin_system_create_vault_tx_request' ] all_params.extend( [ @@ -209,20 +223,18 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_ilks_name_get" % key + " to method create_stable_coin_vault" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `v2_ilks_name_get`") # noqa: E501 + # verify the required parameter 'stablecoin_system_create_vault_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_create_vault_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_create_vault_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_create_vault_tx_request` when calling `create_stable_coin_vault`") # noqa: E501 collection_formats = {} path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] @@ -232,22 +244,28 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_create_vault_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_create_vault_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/ilks/{name}', 'GET', + '/v2/stablecoinsystem/tx/createvault', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Ilk', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -255,17 +273,17 @@ def v2_ilks_name_get_with_http_info(self, name, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_auctions_tx_gemexit_post(self, stablecoin_system_gemexit_tx_request, **kwargs): # noqa: E501 - """exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 + def deposit_stable_coin_collateral(self, stablecoin_system_deposit_collateral_tx_request, **kwargs): # noqa: E501 + """Deposit collateral # noqa: E501 - exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 + Deposit collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_gemexit_post(stablecoin_system_gemexit_tx_request, async_req=True) + >>> thread = api.deposit_stable_coin_collateral(stablecoin_system_deposit_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemGemexitTxRequest stablecoin_system_gemexit_tx_request: exit Zar token from Vat contract transaction request (required) + :param StablecoinSystemDepositCollateralTxRequest stablecoin_system_deposit_collateral_tx_request: Deposit collateral transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,19 +296,19 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post(self, stablecoin_system_gemexit returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(stablecoin_system_gemexit_tx_request, **kwargs) # noqa: E501 + return self.deposit_stable_coin_collateral_with_http_info(stablecoin_system_deposit_collateral_tx_request, **kwargs) # noqa: E501 - def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin_system_gemexit_tx_request, **kwargs): # noqa: E501 - """exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 + def deposit_stable_coin_collateral_with_http_info(self, stablecoin_system_deposit_collateral_tx_request, **kwargs): # noqa: E501 + """Deposit collateral # noqa: E501 - exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 + Deposit collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(stablecoin_system_gemexit_tx_request, async_req=True) + >>> thread = api.deposit_stable_coin_collateral_with_http_info(stablecoin_system_deposit_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemGemexitTxRequest stablecoin_system_gemexit_tx_request: exit Zar token from Vat contract transaction request (required) + :param StablecoinSystemDepositCollateralTxRequest stablecoin_system_deposit_collateral_tx_request: Deposit collateral transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -308,7 +326,7 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin local_var_params = locals() all_params = [ - 'stablecoin_system_gemexit_tx_request' + 'stablecoin_system_deposit_collateral_tx_request' ] all_params.extend( [ @@ -323,14 +341,14 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_auctions_tx_gemexit_post" % key + " to method deposit_stable_coin_collateral" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_gemexit_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_gemexit_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_gemexit_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_gemexit_tx_request` when calling `v2_stablecoinsystem_auctions_tx_gemexit_post`") # noqa: E501 + # verify the required parameter 'stablecoin_system_deposit_collateral_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_deposit_collateral_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_deposit_collateral_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_deposit_collateral_tx_request` when calling `deposit_stable_coin_collateral`") # noqa: E501 collection_formats = {} @@ -344,8 +362,8 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin local_var_files = {} body_params = None - if 'stablecoin_system_gemexit_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_gemexit_tx_request'] + if 'stablecoin_system_deposit_collateral_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_deposit_collateral_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -358,7 +376,7 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/auctions/tx/gemexit', 'POST', + '/v2/stablecoinsystem/tx/depositcollateral', 'POST', path_params, query_params, header_params, @@ -373,17 +391,17 @@ def v2_stablecoinsystem_auctions_tx_gemexit_post_with_http_info(self, stablecoin _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_auctions_tx_redo_post(self, stablecoin_system_redo_tx_request, **kwargs): # noqa: E501 - """reset a auction # noqa: E501 + def exit_gem_transaction(self, stablecoin_system_gemexit_tx_request, **kwargs): # noqa: E501 + """exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 - reset a auction # noqa: E501 + exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_redo_post(stablecoin_system_redo_tx_request, async_req=True) + >>> thread = api.exit_gem_transaction(stablecoin_system_gemexit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemRedoTxRequest stablecoin_system_redo_tx_request: Reset a Auction transaction request (required) + :param StablecoinSystemGemexitTxRequest stablecoin_system_gemexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -396,19 +414,19 @@ def v2_stablecoinsystem_auctions_tx_redo_post(self, stablecoin_system_redo_tx_re returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(stablecoin_system_redo_tx_request, **kwargs) # noqa: E501 + return self.exit_gem_transaction_with_http_info(stablecoin_system_gemexit_tx_request, **kwargs) # noqa: E501 - def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_system_redo_tx_request, **kwargs): # noqa: E501 - """reset a auction # noqa: E501 + def exit_gem_transaction_with_http_info(self, stablecoin_system_gemexit_tx_request, **kwargs): # noqa: E501 + """exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 - reset a auction # noqa: E501 + exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(stablecoin_system_redo_tx_request, async_req=True) + >>> thread = api.exit_gem_transaction_with_http_info(stablecoin_system_gemexit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemRedoTxRequest stablecoin_system_redo_tx_request: Reset a Auction transaction request (required) + :param StablecoinSystemGemexitTxRequest stablecoin_system_gemexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -426,7 +444,7 @@ def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_sy local_var_params = locals() all_params = [ - 'stablecoin_system_redo_tx_request' + 'stablecoin_system_gemexit_tx_request' ] all_params.extend( [ @@ -441,14 +459,14 @@ def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_sy if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_auctions_tx_redo_post" % key + " to method exit_gem_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_redo_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_redo_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_redo_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_redo_tx_request` when calling `v2_stablecoinsystem_auctions_tx_redo_post`") # noqa: E501 + # verify the required parameter 'stablecoin_system_gemexit_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_gemexit_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_gemexit_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_gemexit_tx_request` when calling `exit_gem_transaction`") # noqa: E501 collection_formats = {} @@ -462,8 +480,8 @@ def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_sy local_var_files = {} body_params = None - if 'stablecoin_system_redo_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_redo_tx_request'] + if 'stablecoin_system_gemexit_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_gemexit_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -476,7 +494,7 @@ def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_sy auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/auctions/tx/redo', 'POST', + '/v2/stablecoinsystem/auctions/tx/gemexit', 'POST', path_params, query_params, header_params, @@ -491,17 +509,17 @@ def v2_stablecoinsystem_auctions_tx_redo_post_with_http_info(self, stablecoin_sy _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_auctions_tx_take_post(self, stablecoin_system_take_tx_request, **kwargs): # noqa: E501 - """take a auction # noqa: E501 + def exit_zar_transaction(self, stablecoin_system_zarexit_tx_request, **kwargs): # noqa: E501 + """exit ZAR token from Vat contract # noqa: E501 - take a auction # noqa: E501 + exit ZAR token from Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_take_post(stablecoin_system_take_tx_request, async_req=True) + >>> thread = api.exit_zar_transaction(stablecoin_system_zarexit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemTakeTxRequest stablecoin_system_take_tx_request: Take a Auction transaction request (required) + :param StablecoinSystemZarexitTxRequest stablecoin_system_zarexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -514,19 +532,19 @@ def v2_stablecoinsystem_auctions_tx_take_post(self, stablecoin_system_take_tx_re returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_auctions_tx_take_post_with_http_info(stablecoin_system_take_tx_request, **kwargs) # noqa: E501 + return self.exit_zar_transaction_with_http_info(stablecoin_system_zarexit_tx_request, **kwargs) # noqa: E501 - def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_system_take_tx_request, **kwargs): # noqa: E501 - """take a auction # noqa: E501 + def exit_zar_transaction_with_http_info(self, stablecoin_system_zarexit_tx_request, **kwargs): # noqa: E501 + """exit ZAR token from Vat contract # noqa: E501 - take a auction # noqa: E501 + exit ZAR token from Vat contract # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_take_post_with_http_info(stablecoin_system_take_tx_request, async_req=True) + >>> thread = api.exit_zar_transaction_with_http_info(stablecoin_system_zarexit_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemTakeTxRequest stablecoin_system_take_tx_request: Take a Auction transaction request (required) + :param StablecoinSystemZarexitTxRequest stablecoin_system_zarexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -544,7 +562,7 @@ def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_sy local_var_params = locals() all_params = [ - 'stablecoin_system_take_tx_request' + 'stablecoin_system_zarexit_tx_request' ] all_params.extend( [ @@ -559,14 +577,14 @@ def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_sy if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_auctions_tx_take_post" % key + " to method exit_zar_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_take_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_take_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_take_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_take_tx_request` when calling `v2_stablecoinsystem_auctions_tx_take_post`") # noqa: E501 + # verify the required parameter 'stablecoin_system_zarexit_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_zarexit_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_zarexit_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_zarexit_tx_request` when calling `exit_zar_transaction`") # noqa: E501 collection_formats = {} @@ -580,8 +598,8 @@ def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_sy local_var_files = {} body_params = None - if 'stablecoin_system_take_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_take_tx_request'] + if 'stablecoin_system_zarexit_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_zarexit_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -594,7 +612,7 @@ def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_sy auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/auctions/tx/take', 'POST', + '/v2/stablecoinsystem/auctions/tx/zarexit', 'POST', path_params, query_params, header_params, @@ -609,17 +627,16 @@ def v2_stablecoinsystem_auctions_tx_take_post_with_http_info(self, stablecoin_sy _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_auctions_tx_zarexit_post(self, stablecoin_system_zarexit_tx_request, **kwargs): # noqa: E501 - """exit ZAR token from Vat contract # noqa: E501 + def get_all_ilks(self, **kwargs): # noqa: E501 + """Get all Ilks # noqa: E501 - exit ZAR token from Vat contract # noqa: E501 + Retrieve a list of all available ilks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_zarexit_post(stablecoin_system_zarexit_tx_request, async_req=True) + >>> thread = api.get_all_ilks(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemZarexitTxRequest stablecoin_system_zarexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -627,24 +644,23 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post(self, stablecoin_system_zarexit number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: IlksResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(stablecoin_system_zarexit_tx_request, **kwargs) # noqa: E501 + return self.get_all_ilks_with_http_info(**kwargs) # noqa: E501 - def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin_system_zarexit_tx_request, **kwargs): # noqa: E501 - """exit ZAR token from Vat contract # noqa: E501 + def get_all_ilks_with_http_info(self, **kwargs): # noqa: E501 + """Get all Ilks # noqa: E501 - exit ZAR token from Vat contract # noqa: E501 + Retrieve a list of all available ilks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(stablecoin_system_zarexit_tx_request, async_req=True) + >>> thread = api.get_all_ilks_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemZarexitTxRequest stablecoin_system_zarexit_tx_request: exit Zar token from Vat contract transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -654,7 +670,7 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(IlksResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -662,7 +678,6 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin local_var_params = locals() all_params = [ - 'stablecoin_system_zarexit_tx_request' ] all_params.extend( [ @@ -677,14 +692,10 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_auctions_tx_zarexit_post" % key + " to method get_all_ilks" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_zarexit_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_zarexit_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_zarexit_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_zarexit_tx_request` when calling `v2_stablecoinsystem_auctions_tx_zarexit_post`") # noqa: E501 collection_formats = {} @@ -698,28 +709,22 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin local_var_files = {} body_params = None - if 'stablecoin_system_zarexit_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_zarexit_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/auctions/tx/zarexit', 'POST', + '/v2/ilks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='IlksResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -727,17 +732,16 @@ def v2_stablecoinsystem_auctions_tx_zarexit_post_with_http_info(self, stablecoin _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_auctions_tx_zarjoin_post(self, stablecoin_system_zarjoin_tx_request, **kwargs): # noqa: E501 - """approve and join ZAR token into Vat contract # noqa: E501 + def get_collector_data(self, **kwargs): # noqa: E501 + """Get collector data # noqa: E501 - approve and join ZAR token into Vat contract # noqa: E501 + Get collector data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_zarjoin_post(stablecoin_system_zarjoin_tx_request, async_req=True) + >>> thread = api.get_collector_data(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemZarjoinTxRequest stablecoin_system_zarjoin_tx_request: Approve and join Zar token into Vat contract transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -745,24 +749,23 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post(self, stablecoin_system_zarjoin number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: Stats If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(stablecoin_system_zarjoin_tx_request, **kwargs) # noqa: E501 + return self.get_collector_data_with_http_info(**kwargs) # noqa: E501 - def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin_system_zarjoin_tx_request, **kwargs): # noqa: E501 - """approve and join ZAR token into Vat contract # noqa: E501 + def get_collector_data_with_http_info(self, **kwargs): # noqa: E501 + """Get collector data # noqa: E501 - approve and join ZAR token into Vat contract # noqa: E501 + Get collector data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(stablecoin_system_zarjoin_tx_request, async_req=True) + >>> thread = api.get_collector_data_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemZarjoinTxRequest stablecoin_system_zarjoin_tx_request: Approve and join Zar token into Vat contract transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -772,7 +775,7 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(Stats, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -780,7 +783,6 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin local_var_params = locals() all_params = [ - 'stablecoin_system_zarjoin_tx_request' ] all_params.extend( [ @@ -795,14 +797,10 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_auctions_tx_zarjoin_post" % key + " to method get_collector_data" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_zarjoin_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_zarjoin_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_zarjoin_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_zarjoin_tx_request` when calling `v2_stablecoinsystem_auctions_tx_zarjoin_post`") # noqa: E501 collection_formats = {} @@ -816,28 +814,22 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin local_var_files = {} body_params = None - if 'stablecoin_system_zarjoin_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_zarjoin_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/auctions/tx/zarjoin', 'POST', + '/v2/stats', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='Stats', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -845,17 +837,17 @@ def v2_stablecoinsystem_auctions_tx_zarjoin_post_with_http_info(self, stablecoin _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_bark_post(self, stablecoin_system_bark_tx_request, **kwargs): # noqa: E501 - """liquidate a vault # noqa: E501 + def get_ilk_by_name(self, name, **kwargs): # noqa: E501 + """Get Ilk by name # noqa: E501 - liquidate a vault # noqa: E501 + Retrieve an Ilk by providing its name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_bark_post(stablecoin_system_bark_tx_request, async_req=True) + >>> thread = api.get_ilk_by_name(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemBarkTxRequest stablecoin_system_bark_tx_request: Liquidate a Vault transaction request (required) + :param str name: Name of the ILK (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -863,24 +855,24 @@ def v2_stablecoinsystem_tx_bark_post(self, stablecoin_system_bark_tx_request, ** number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: Ilk If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_bark_post_with_http_info(stablecoin_system_bark_tx_request, **kwargs) # noqa: E501 + return self.get_ilk_by_name_with_http_info(name, **kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark_tx_request, **kwargs): # noqa: E501 - """liquidate a vault # noqa: E501 + def get_ilk_by_name_with_http_info(self, name, **kwargs): # noqa: E501 + """Get Ilk by name # noqa: E501 - liquidate a vault # noqa: E501 + Retrieve an Ilk by providing its name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_bark_post_with_http_info(stablecoin_system_bark_tx_request, async_req=True) + >>> thread = api.get_ilk_by_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemBarkTxRequest stablecoin_system_bark_tx_request: Liquidate a Vault transaction request (required) + :param str name: Name of the ILK (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -890,7 +882,7 @@ def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(Ilk, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -898,7 +890,7 @@ def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark local_var_params = locals() all_params = [ - 'stablecoin_system_bark_tx_request' + 'name' ] all_params.extend( [ @@ -913,18 +905,20 @@ def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_bark_post" % key + " to method get_ilk_by_name" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_bark_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_bark_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_bark_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_bark_tx_request` when calling `v2_stablecoinsystem_tx_bark_post`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_ilk_by_name`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] @@ -934,28 +928,22 @@ def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark local_var_files = {} body_params = None - if 'stablecoin_system_bark_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_bark_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/bark', 'POST', + '/v2/ilks/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='Ilk', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -963,17 +951,16 @@ def v2_stablecoinsystem_tx_bark_post_with_http_info(self, stablecoin_system_bark _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_createvault_post(self, stablecoin_system_create_vault_tx_request, **kwargs): # noqa: E501 - """Create vault # noqa: E501 + def get_vault_by_id(self, id, **kwargs): # noqa: E501 + """Get a vault by ID # noqa: E501 - Create vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_createvault_post(stablecoin_system_create_vault_tx_request, async_req=True) + >>> thread = api.get_vault_by_id(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemCreateVaultTxRequest stablecoin_system_create_vault_tx_request: Create vault transaction request (required) + :param int id: Vault ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -981,24 +968,23 @@ def v2_stablecoinsystem_tx_createvault_post(self, stablecoin_system_create_vault number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: Vault If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_createvault_post_with_http_info(stablecoin_system_create_vault_tx_request, **kwargs) # noqa: E501 + return self.get_vault_by_id_with_http_info(id, **kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_system_create_vault_tx_request, **kwargs): # noqa: E501 - """Create vault # noqa: E501 + def get_vault_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a vault by ID # noqa: E501 - Create vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_createvault_post_with_http_info(stablecoin_system_create_vault_tx_request, async_req=True) + >>> thread = api.get_vault_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemCreateVaultTxRequest stablecoin_system_create_vault_tx_request: Create vault transaction request (required) + :param int id: Vault ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1008,7 +994,7 @@ def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_syst number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(Vault, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1016,7 +1002,7 @@ def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_syst local_var_params = locals() all_params = [ - 'stablecoin_system_create_vault_tx_request' + 'id' ] all_params.extend( [ @@ -1031,18 +1017,20 @@ def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_syst if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_createvault_post" % key + " to method get_vault_by_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_create_vault_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_create_vault_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_create_vault_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_create_vault_tx_request` when calling `v2_stablecoinsystem_tx_createvault_post`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_vault_by_id`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] @@ -1052,28 +1040,22 @@ def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_syst local_var_files = {} body_params = None - if 'stablecoin_system_create_vault_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_create_vault_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/createvault', 'POST', + '/v2/vaults/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='Vault', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1081,17 +1063,17 @@ def v2_stablecoinsystem_tx_createvault_post_with_http_info(self, stablecoin_syst _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_depositcollateral_post(self, stablecoin_system_deposit_collateral_tx_request, **kwargs): # noqa: E501 - """Deposit collateral # noqa: E501 + def get_vault_events_by_id(self, id, **kwargs): # noqa: E501 + """Get vault events by ID # noqa: E501 - Deposit collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_depositcollateral_post(stablecoin_system_deposit_collateral_tx_request, async_req=True) + >>> thread = api.get_vault_events_by_id(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemDepositCollateralTxRequest stablecoin_system_deposit_collateral_tx_request: Deposit collateral transaction request (required) + :param int id: Vault ID (required) + :param str type: Event type :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1099,24 +1081,24 @@ def v2_stablecoinsystem_tx_depositcollateral_post(self, stablecoin_system_deposi number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: VaultEventsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(stablecoin_system_deposit_collateral_tx_request, **kwargs) # noqa: E501 + return self.get_vault_events_by_id_with_http_info(id, **kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoin_system_deposit_collateral_tx_request, **kwargs): # noqa: E501 - """Deposit collateral # noqa: E501 + def get_vault_events_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get vault events by ID # noqa: E501 - Deposit collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(stablecoin_system_deposit_collateral_tx_request, async_req=True) + >>> thread = api.get_vault_events_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemDepositCollateralTxRequest stablecoin_system_deposit_collateral_tx_request: Deposit collateral transaction request (required) + :param int id: Vault ID (required) + :param str type: Event type :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1126,7 +1108,7 @@ def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoi number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(VaultEventsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1134,7 +1116,8 @@ def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoi local_var_params = locals() all_params = [ - 'stablecoin_system_deposit_collateral_tx_request' + 'id', + 'type' ] all_params.extend( [ @@ -1149,20 +1132,24 @@ def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoi if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_depositcollateral_post" % key + " to method get_vault_events_by_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_deposit_collateral_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_deposit_collateral_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_deposit_collateral_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_deposit_collateral_tx_request` when calling `v2_stablecoinsystem_tx_depositcollateral_post`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_vault_events_by_id`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 header_params = {} @@ -1170,28 +1157,22 @@ def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoi local_var_files = {} body_params = None - if 'stablecoin_system_deposit_collateral_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_deposit_collateral_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/depositcollateral', 'POST', + '/v2/vaults/{id}/events', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='VaultEventsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1199,17 +1180,16 @@ def v2_stablecoinsystem_tx_depositcollateral_post_with_http_info(self, stablecoi _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_mintzar_post(self, stablecoin_system_mint_zar_tx_request, **kwargs): # noqa: E501 - """Mint ZAR # noqa: E501 + def get_vaults_by_owner(self, **kwargs): # noqa: E501 + """Get vaults by owner query # noqa: E501 - Mint ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_mintzar_post(stablecoin_system_mint_zar_tx_request, async_req=True) + >>> thread = api.get_vaults_by_owner(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemMintZarTxRequest stablecoin_system_mint_zar_tx_request: Mint ZAR transaction request (required) + :param str owner: Ethereum address of the owner :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1217,24 +1197,23 @@ def v2_stablecoinsystem_tx_mintzar_post(self, stablecoin_system_mint_zar_tx_requ number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: ChainActivity + :return: VaultsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_mintzar_post_with_http_info(stablecoin_system_mint_zar_tx_request, **kwargs) # noqa: E501 + return self.get_vaults_by_owner_with_http_info(**kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_mint_zar_tx_request, **kwargs): # noqa: E501 - """Mint ZAR # noqa: E501 + def get_vaults_by_owner_with_http_info(self, **kwargs): # noqa: E501 + """Get vaults by owner query # noqa: E501 - Mint ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_mintzar_post_with_http_info(stablecoin_system_mint_zar_tx_request, async_req=True) + >>> thread = api.get_vaults_by_owner_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemMintZarTxRequest stablecoin_system_mint_zar_tx_request: Mint ZAR transaction request (required) + :param str owner: Ethereum address of the owner :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1244,7 +1223,7 @@ def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_m number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(VaultsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1252,7 +1231,7 @@ def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_m local_var_params = locals() all_params = [ - 'stablecoin_system_mint_zar_tx_request' + 'owner' ] all_params.extend( [ @@ -1267,20 +1246,18 @@ def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_m if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_mintzar_post" % key + " to method get_vaults_by_owner" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_mint_zar_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_mint_zar_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_mint_zar_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_mint_zar_tx_request` when calling `v2_stablecoinsystem_tx_mintzar_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'owner' in local_var_params and local_var_params['owner'] is not None: # noqa: E501 + query_params.append(('owner', local_var_params['owner'])) # noqa: E501 header_params = {} @@ -1288,28 +1265,22 @@ def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_m local_var_files = {} body_params = None - if 'stablecoin_system_mint_zar_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_mint_zar_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/mintzar', 'POST', + '/v2/vaults', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ChainActivity', # noqa: E501 + response_type='VaultsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1317,17 +1288,17 @@ def v2_stablecoinsystem_tx_mintzar_post_with_http_info(self, stablecoin_system_m _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_repayzar_post(self, stablecoin_system_repay_zar_tx_request, **kwargs): # noqa: E501 - """Repay ZAR # noqa: E501 + def liquidate_vault_transaction(self, stablecoin_system_bark_tx_request, **kwargs): # noqa: E501 + """liquidate a vault # noqa: E501 - Repay ZAR # noqa: E501 + liquidate a vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_repayzar_post(stablecoin_system_repay_zar_tx_request, async_req=True) + >>> thread = api.liquidate_vault_transaction(stablecoin_system_bark_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemRepayZarTxRequest stablecoin_system_repay_zar_tx_request: Repay ZAR transaction request (required) + :param StablecoinSystemBarkTxRequest stablecoin_system_bark_tx_request: Liquidate a Vault transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1340,19 +1311,19 @@ def v2_stablecoinsystem_tx_repayzar_post(self, stablecoin_system_repay_zar_tx_re returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_repayzar_post_with_http_info(stablecoin_system_repay_zar_tx_request, **kwargs) # noqa: E501 + return self.liquidate_vault_transaction_with_http_info(stablecoin_system_bark_tx_request, **kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_repay_zar_tx_request, **kwargs): # noqa: E501 - """Repay ZAR # noqa: E501 + def liquidate_vault_transaction_with_http_info(self, stablecoin_system_bark_tx_request, **kwargs): # noqa: E501 + """liquidate a vault # noqa: E501 - Repay ZAR # noqa: E501 + liquidate a vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_repayzar_post_with_http_info(stablecoin_system_repay_zar_tx_request, async_req=True) + >>> thread = api.liquidate_vault_transaction_with_http_info(stablecoin_system_bark_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemRepayZarTxRequest stablecoin_system_repay_zar_tx_request: Repay ZAR transaction request (required) + :param StablecoinSystemBarkTxRequest stablecoin_system_bark_tx_request: Liquidate a Vault transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1370,7 +1341,7 @@ def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_ local_var_params = locals() all_params = [ - 'stablecoin_system_repay_zar_tx_request' + 'stablecoin_system_bark_tx_request' ] all_params.extend( [ @@ -1385,14 +1356,14 @@ def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_ if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_repayzar_post" % key + " to method liquidate_vault_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_repay_zar_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_repay_zar_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_repay_zar_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_repay_zar_tx_request` when calling `v2_stablecoinsystem_tx_repayzar_post`") # noqa: E501 + # verify the required parameter 'stablecoin_system_bark_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_bark_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_bark_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_bark_tx_request` when calling `liquidate_vault_transaction`") # noqa: E501 collection_formats = {} @@ -1406,8 +1377,8 @@ def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_ local_var_files = {} body_params = None - if 'stablecoin_system_repay_zar_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_repay_zar_tx_request'] + if 'stablecoin_system_bark_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_bark_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1420,7 +1391,7 @@ def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_ auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/repayzar', 'POST', + '/v2/stablecoinsystem/tx/bark', 'POST', path_params, query_params, header_params, @@ -1435,17 +1406,17 @@ def v2_stablecoinsystem_tx_repayzar_post_with_http_info(self, stablecoin_system_ _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stablecoinsystem_tx_withdrawcollateral_post(self, stablecoin_system_withdraw_collateral_tx_request, **kwargs): # noqa: E501 - """Withdraw collateral # noqa: E501 + def mint_zar_transaction(self, stablecoin_system_mint_zar_tx_request, **kwargs): # noqa: E501 + """Mint ZAR # noqa: E501 - Withdraw collateral # noqa: E501 + Mint ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_withdrawcollateral_post(stablecoin_system_withdraw_collateral_tx_request, async_req=True) + >>> thread = api.mint_zar_transaction(stablecoin_system_mint_zar_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemWithdrawCollateralTxRequest stablecoin_system_withdraw_collateral_tx_request: Withdraw collateral transaction request (required) + :param StablecoinSystemMintZarTxRequest stablecoin_system_mint_zar_tx_request: Mint ZAR transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1458,19 +1429,19 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post(self, stablecoin_system_withd returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(stablecoin_system_withdraw_collateral_tx_request, **kwargs) # noqa: E501 + return self.mint_zar_transaction_with_http_info(stablecoin_system_mint_zar_tx_request, **kwargs) # noqa: E501 - def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stablecoin_system_withdraw_collateral_tx_request, **kwargs): # noqa: E501 - """Withdraw collateral # noqa: E501 + def mint_zar_transaction_with_http_info(self, stablecoin_system_mint_zar_tx_request, **kwargs): # noqa: E501 + """Mint ZAR # noqa: E501 - Withdraw collateral # noqa: E501 + Mint ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(stablecoin_system_withdraw_collateral_tx_request, async_req=True) + >>> thread = api.mint_zar_transaction_with_http_info(stablecoin_system_mint_zar_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param StablecoinSystemWithdrawCollateralTxRequest stablecoin_system_withdraw_collateral_tx_request: Withdraw collateral transaction request (required) + :param StablecoinSystemMintZarTxRequest stablecoin_system_mint_zar_tx_request: Mint ZAR transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1488,7 +1459,7 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stableco local_var_params = locals() all_params = [ - 'stablecoin_system_withdraw_collateral_tx_request' + 'stablecoin_system_mint_zar_tx_request' ] all_params.extend( [ @@ -1503,14 +1474,14 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stableco if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stablecoinsystem_tx_withdrawcollateral_post" % key + " to method mint_zar_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'stablecoin_system_withdraw_collateral_tx_request' is set - if self.api_client.client_side_validation and ('stablecoin_system_withdraw_collateral_tx_request' not in local_var_params or # noqa: E501 - local_var_params['stablecoin_system_withdraw_collateral_tx_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stablecoin_system_withdraw_collateral_tx_request` when calling `v2_stablecoinsystem_tx_withdrawcollateral_post`") # noqa: E501 + # verify the required parameter 'stablecoin_system_mint_zar_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_mint_zar_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_mint_zar_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_mint_zar_tx_request` when calling `mint_zar_transaction`") # noqa: E501 collection_formats = {} @@ -1524,8 +1495,8 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stableco local_var_files = {} body_params = None - if 'stablecoin_system_withdraw_collateral_tx_request' in local_var_params: - body_params = local_var_params['stablecoin_system_withdraw_collateral_tx_request'] + if 'stablecoin_system_mint_zar_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_mint_zar_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1538,7 +1509,7 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stableco auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stablecoinsystem/tx/withdrawcollateral', 'POST', + '/v2/stablecoinsystem/tx/mintzar', 'POST', path_params, query_params, header_params, @@ -1553,16 +1524,17 @@ def v2_stablecoinsystem_tx_withdrawcollateral_post_with_http_info(self, stableco _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_stats_get(self, **kwargs): # noqa: E501 - """Get collector data # noqa: E501 + def repay_zar_transaction(self, stablecoin_system_repay_zar_tx_request, **kwargs): # noqa: E501 + """Repay ZAR # noqa: E501 - Get collector data # noqa: E501 + Repay ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stats_get(async_req=True) + >>> thread = api.repay_zar_transaction(stablecoin_system_repay_zar_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously + :param StablecoinSystemRepayZarTxRequest stablecoin_system_repay_zar_tx_request: Repay ZAR transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1570,23 +1542,24 @@ def v2_stats_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: Stats + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_stats_get_with_http_info(**kwargs) # noqa: E501 + return self.repay_zar_transaction_with_http_info(stablecoin_system_repay_zar_tx_request, **kwargs) # noqa: E501 - def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 - """Get collector data # noqa: E501 + def repay_zar_transaction_with_http_info(self, stablecoin_system_repay_zar_tx_request, **kwargs): # noqa: E501 + """Repay ZAR # noqa: E501 - Get collector data # noqa: E501 + Repay ZAR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_stats_get_with_http_info(async_req=True) + >>> thread = api.repay_zar_transaction_with_http_info(stablecoin_system_repay_zar_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously + :param StablecoinSystemRepayZarTxRequest stablecoin_system_repay_zar_tx_request: Repay ZAR transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1596,7 +1569,7 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(Stats, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1604,6 +1577,7 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'stablecoin_system_repay_zar_tx_request' ] all_params.extend( [ @@ -1618,10 +1592,14 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_stats_get" % key + " to method repay_zar_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'stablecoin_system_repay_zar_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_repay_zar_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_repay_zar_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_repay_zar_tx_request` when calling `repay_zar_transaction`") # noqa: E501 collection_formats = {} @@ -1635,22 +1613,28 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_repay_zar_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_repay_zar_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/stats', 'GET', + '/v2/stablecoinsystem/tx/repayzar', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Stats', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1658,16 +1642,17 @@ def v2_stats_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_vaults_get(self, **kwargs): # noqa: E501 - """Get vaults by owner query # noqa: E501 + def reset_auction_transaction(self, stablecoin_system_redo_tx_request, **kwargs): # noqa: E501 + """reset a auction # noqa: E501 + reset a auction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_get(async_req=True) + >>> thread = api.reset_auction_transaction(stablecoin_system_redo_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str owner: Ethereum address of the owner + :param StablecoinSystemRedoTxRequest stablecoin_system_redo_tx_request: Reset a Auction transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1675,23 +1660,24 @@ def v2_vaults_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Vault] + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_get_with_http_info(**kwargs) # noqa: E501 + return self.reset_auction_transaction_with_http_info(stablecoin_system_redo_tx_request, **kwargs) # noqa: E501 - def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 - """Get vaults by owner query # noqa: E501 + def reset_auction_transaction_with_http_info(self, stablecoin_system_redo_tx_request, **kwargs): # noqa: E501 + """reset a auction # noqa: E501 + reset a auction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_get_with_http_info(async_req=True) + >>> thread = api.reset_auction_transaction_with_http_info(stablecoin_system_redo_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str owner: Ethereum address of the owner + :param StablecoinSystemRedoTxRequest stablecoin_system_redo_tx_request: Reset a Auction transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1701,7 +1687,7 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Vault], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1709,7 +1695,7 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'owner' + 'stablecoin_system_redo_tx_request' ] all_params.extend( [ @@ -1724,18 +1710,20 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_get" % key + " to method reset_auction_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'stablecoin_system_redo_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_redo_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_redo_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_redo_tx_request` when calling `reset_auction_transaction`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'owner' in local_var_params and local_var_params['owner'] is not None: # noqa: E501 - query_params.append(('owner', local_var_params['owner'])) # noqa: E501 header_params = {} @@ -1743,22 +1731,28 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_redo_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_redo_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/vaults', 'GET', + '/v2/stablecoinsystem/auctions/tx/redo', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Vault]', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1766,17 +1760,17 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_vaults_id_events_get(self, id, **kwargs): # noqa: E501 - """Get vault events by ID # noqa: E501 + def take_auction_transaction(self, stablecoin_system_take_tx_request, **kwargs): # noqa: E501 + """take a auction # noqa: E501 + take a auction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_events_get(id, async_req=True) + >>> thread = api.take_auction_transaction(stablecoin_system_take_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) - :param str type: Event type + :param StablecoinSystemTakeTxRequest stablecoin_system_take_tx_request: Take a Auction transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1784,24 +1778,24 @@ def v2_vaults_id_events_get(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[BasicEvent] + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_id_events_get_with_http_info(id, **kwargs) # noqa: E501 + return self.take_auction_transaction_with_http_info(stablecoin_system_take_tx_request, **kwargs) # noqa: E501 - def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get vault events by ID # noqa: E501 + def take_auction_transaction_with_http_info(self, stablecoin_system_take_tx_request, **kwargs): # noqa: E501 + """take a auction # noqa: E501 + take a auction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_events_get_with_http_info(id, async_req=True) + >>> thread = api.take_auction_transaction_with_http_info(stablecoin_system_take_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) - :param str type: Event type + :param StablecoinSystemTakeTxRequest stablecoin_system_take_tx_request: Take a Auction transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1811,7 +1805,7 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[BasicEvent], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1819,8 +1813,7 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'id', - 'type' + 'stablecoin_system_take_tx_request' ] all_params.extend( [ @@ -1835,24 +1828,20 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_id_events_get" % key + " to method take_auction_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v2_vaults_id_events_get`") # noqa: E501 + # verify the required parameter 'stablecoin_system_take_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_take_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_take_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_take_tx_request` when calling `take_auction_transaction`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 header_params = {} @@ -1860,22 +1849,28 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_take_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_take_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/vaults/{id}/events', 'GET', + '/v2/stablecoinsystem/auctions/tx/take', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[BasicEvent]', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1883,16 +1878,17 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_vaults_id_get(self, id, **kwargs): # noqa: E501 - """Get a vault by ID # noqa: E501 + def withdraw_collateral_transaction(self, stablecoin_system_withdraw_collateral_tx_request, **kwargs): # noqa: E501 + """Withdraw collateral # noqa: E501 + Withdraw collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_get(id, async_req=True) + >>> thread = api.withdraw_collateral_transaction(stablecoin_system_withdraw_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) + :param StablecoinSystemWithdrawCollateralTxRequest stablecoin_system_withdraw_collateral_tx_request: Withdraw collateral transaction request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1900,23 +1896,24 @@ def v2_vaults_id_get(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: Vault + :return: ChainActivity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_id_get_with_http_info(id, **kwargs) # noqa: E501 + return self.withdraw_collateral_transaction_with_http_info(stablecoin_system_withdraw_collateral_tx_request, **kwargs) # noqa: E501 - def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get a vault by ID # noqa: E501 + def withdraw_collateral_transaction_with_http_info(self, stablecoin_system_withdraw_collateral_tx_request, **kwargs): # noqa: E501 + """Withdraw collateral # noqa: E501 + Withdraw collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_get_with_http_info(id, async_req=True) + >>> thread = api.withdraw_collateral_transaction_with_http_info(stablecoin_system_withdraw_collateral_tx_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) + :param StablecoinSystemWithdrawCollateralTxRequest stablecoin_system_withdraw_collateral_tx_request: Withdraw collateral transaction request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1926,7 +1923,7 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(Vault, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(ChainActivity, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -1934,7 +1931,7 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'id' + 'stablecoin_system_withdraw_collateral_tx_request' ] all_params.extend( [ @@ -1949,20 +1946,18 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_id_get" % key + " to method withdraw_collateral_transaction" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v2_vaults_id_get`") # noqa: E501 + # verify the required parameter 'stablecoin_system_withdraw_collateral_tx_request' is set + if self.api_client.client_side_validation and ('stablecoin_system_withdraw_collateral_tx_request' not in local_var_params or # noqa: E501 + local_var_params['stablecoin_system_withdraw_collateral_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stablecoin_system_withdraw_collateral_tx_request` when calling `withdraw_collateral_transaction`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] @@ -1972,22 +1967,28 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'stablecoin_system_withdraw_collateral_tx_request' in local_var_params: + body_params = local_var_params['stablecoin_system_withdraw_collateral_tx_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/vaults/{id}', 'GET', + '/v2/stablecoinsystem/tx/withdrawcollateral', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Vault', # noqa: E501 + response_type='ChainActivity', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/staking_api.py b/src/zarban/service/openapi_client/api/staking_api.py new file mode 100644 index 0000000..9e864de --- /dev/null +++ b/src/zarban/service/openapi_client/api/staking_api.py @@ -0,0 +1,631 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.service.openapi_client.api_client import ApiClient +from zarban.service.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StakingApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def collect_staking_reward(self, staking_collect_reward_tx_request, **kwargs): # noqa: E501 + """Collect staking reward # noqa: E501 + + Collect staking reward # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.collect_staking_reward(staking_collect_reward_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingCollectRewardTxRequest staking_collect_reward_tx_request: Collect reward transaction request (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: StakingCollectRewardTxResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.collect_staking_reward_with_http_info(staking_collect_reward_tx_request, **kwargs) # noqa: E501 + + def collect_staking_reward_with_http_info(self, staking_collect_reward_tx_request, **kwargs): # noqa: E501 + """Collect staking reward # noqa: E501 + + Collect staking reward # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.collect_staking_reward_with_http_info(staking_collect_reward_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingCollectRewardTxRequest staking_collect_reward_tx_request: Collect reward transaction request (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(StakingCollectRewardTxResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'staking_collect_reward_tx_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method collect_staking_reward" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'staking_collect_reward_tx_request' is set + if self.api_client.client_side_validation and ('staking_collect_reward_tx_request' not in local_var_params or # noqa: E501 + local_var_params['staking_collect_reward_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `staking_collect_reward_tx_request` when calling `collect_staking_reward`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'staking_collect_reward_tx_request' in local_var_params: + body_params = local_var_params['staking_collect_reward_tx_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/staking/tx/collectreward', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StakingCollectRewardTxResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_staking_plans(self, **kwargs): # noqa: E501 + """Get staking plans # noqa: E501 + + Get staking plans # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_staking_plans(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: StakePlansResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_staking_plans_with_http_info(**kwargs) # noqa: E501 + + def get_staking_plans_with_http_info(self, **kwargs): # noqa: E501 + """Get staking plans # noqa: E501 + + Get staking plans # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_staking_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(StakePlansResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_staking_plans" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/staking/plans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StakePlansResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_staking_stats(self, **kwargs): # noqa: E501 + """Get user staking stats # noqa: E501 + + Get user staking stats # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_staking_stats(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str user: Ethereum address of the user + :param str address: Ethereum address of the staking contract + :param bool active: Filter by active stakes + :param int cursor: Cursor for pagination + :param int limit: Limit the number of stakes returned (default is 50) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: UserStakesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_staking_stats_with_http_info(**kwargs) # noqa: E501 + + def get_user_staking_stats_with_http_info(self, **kwargs): # noqa: E501 + """Get user staking stats # noqa: E501 + + Get user staking stats # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_staking_stats_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str user: Ethereum address of the user + :param str address: Ethereum address of the staking contract + :param bool active: Filter by active stakes + :param int cursor: Cursor for pagination + :param int limit: Limit the number of stakes returned (default is 50) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(UserStakesResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user', + 'address', + 'active', + 'cursor', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_staking_stats" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'user' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['user']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `user` when calling `get_user_staking_stats`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + if self.api_client.client_side_validation and 'address' in local_var_params and not re.search(r'0x[a-fA-F0-9]{40}', local_var_params['address']): # noqa: E501 + raise ApiValueError("Invalid value for parameter `address` when calling `get_user_staking_stats`, must conform to the pattern `/0x[a-fA-F0-9]{40}/`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 + query_params.append(('user', local_var_params['user'])) # noqa: E501 + if 'address' in local_var_params and local_var_params['address'] is not None: # noqa: E501 + query_params.append(('address', local_var_params['address'])) # noqa: E501 + if 'active' in local_var_params and local_var_params['active'] is not None: # noqa: E501 + query_params.append(('active', local_var_params['active'])) # noqa: E501 + if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/staking/stats', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserStakesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def stake_to_staking_contract(self, staking_stake_tx_request, **kwargs): # noqa: E501 + """Stake to staking contract # noqa: E501 + + Stake to staking contract # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stake_to_staking_contract(staking_stake_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingStakeTxRequest staking_stake_tx_request: Stake transaction request, if amount is not provided, then the whole wallet balance will be used (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: StakingStakeTxResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.stake_to_staking_contract_with_http_info(staking_stake_tx_request, **kwargs) # noqa: E501 + + def stake_to_staking_contract_with_http_info(self, staking_stake_tx_request, **kwargs): # noqa: E501 + """Stake to staking contract # noqa: E501 + + Stake to staking contract # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stake_to_staking_contract_with_http_info(staking_stake_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingStakeTxRequest staking_stake_tx_request: Stake transaction request, if amount is not provided, then the whole wallet balance will be used (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(StakingStakeTxResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'staking_stake_tx_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method stake_to_staking_contract" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'staking_stake_tx_request' is set + if self.api_client.client_side_validation and ('staking_stake_tx_request' not in local_var_params or # noqa: E501 + local_var_params['staking_stake_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `staking_stake_tx_request` when calling `stake_to_staking_contract`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'staking_stake_tx_request' in local_var_params: + body_params = local_var_params['staking_stake_tx_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/staking/tx/stake', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StakingStakeTxResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def withdraw_staked_asset(self, staking_withdraw_tx_request, **kwargs): # noqa: E501 + """Withdraw staked asset # noqa: E501 + + Withdraw staked asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw_staked_asset(staking_withdraw_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingWithdrawTxRequest staking_withdraw_tx_request: Withdraw transaction request, if amount is not provided, then the whole staked amount will be withdrawn (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: StakingWithdrawTxResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.withdraw_staked_asset_with_http_info(staking_withdraw_tx_request, **kwargs) # noqa: E501 + + def withdraw_staked_asset_with_http_info(self, staking_withdraw_tx_request, **kwargs): # noqa: E501 + """Withdraw staked asset # noqa: E501 + + Withdraw staked asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw_staked_asset_with_http_info(staking_withdraw_tx_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param StakingWithdrawTxRequest staking_withdraw_tx_request: Withdraw transaction request, if amount is not provided, then the whole staked amount will be withdrawn (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(StakingWithdrawTxResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'staking_withdraw_tx_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method withdraw_staked_asset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'staking_withdraw_tx_request' is set + if self.api_client.client_side_validation and ('staking_withdraw_tx_request' not in local_var_params or # noqa: E501 + local_var_params['staking_withdraw_tx_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `staking_withdraw_tx_request` when calling `withdraw_staked_asset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'staking_withdraw_tx_request' in local_var_params: + body_params = local_var_params['staking_withdraw_tx_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v2/staking/tx/withdraw', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StakingWithdrawTxResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/service/openapi_client/api/swap_api.py b/src/zarban/service/openapi_client/api/swap_api.py index e1a257c..a4bd51a 100644 --- a/src/zarban/service/openapi_client/api/swap_api.py +++ b/src/zarban/service/openapi_client/api/swap_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_swap_quote_post(self, quote_request, **kwargs): # noqa: E501 + def get_swap_quote(self, quote_request, **kwargs): # noqa: E501 """Get a quote for a swap # noqa: E501 Get a quote for a swap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_swap_quote_post(quote_request, async_req=True) + >>> thread = api.get_swap_quote(quote_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -59,15 +60,15 @@ def v2_swap_quote_post(self, quote_request, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_swap_quote_post_with_http_info(quote_request, **kwargs) # noqa: E501 + return self.get_swap_quote_with_http_info(quote_request, **kwargs) # noqa: E501 - def v2_swap_quote_post_with_http_info(self, quote_request, **kwargs): # noqa: E501 + def get_swap_quote_with_http_info(self, quote_request, **kwargs): # noqa: E501 """Get a quote for a swap # noqa: E501 Get a quote for a swap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_swap_quote_post_with_http_info(quote_request, async_req=True) + >>> thread = api.get_swap_quote_with_http_info(quote_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -104,14 +105,14 @@ def v2_swap_quote_post_with_http_info(self, quote_request, **kwargs): # noqa: E if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_swap_quote_post" % key + " to method get_swap_quote" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'quote_request' is set if self.api_client.client_side_validation and ('quote_request' not in local_var_params or # noqa: E501 local_var_params['quote_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `quote_request` when calling `v2_swap_quote_post`") # noqa: E501 + raise ApiValueError("Missing the required parameter `quote_request` when calling `get_swap_quote`") # noqa: E501 collection_formats = {} diff --git a/src/zarban/service/openapi_client/api/vaults_api.py b/src/zarban/service/openapi_client/api/vaults_api.py index 96e2547..12b310e 100644 --- a/src/zarban/service/openapi_client/api/vaults_api.py +++ b/src/zarban/service/openapi_client/api/vaults_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,16 +37,16 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_vaults_get(self, **kwargs): # noqa: E501 - """Get vaults by owner query # noqa: E501 + def get_vault_by_id(self, id, **kwargs): # noqa: E501 + """Get a vault by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_get(async_req=True) + >>> thread = api.get_vault_by_id(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str owner: Ethereum address of the owner + :param int id: Vault ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -53,23 +54,23 @@ def v2_vaults_get(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Vault] + :return: Vault If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_get_with_http_info(**kwargs) # noqa: E501 + return self.get_vault_by_id_with_http_info(id, **kwargs) # noqa: E501 - def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 - """Get vaults by owner query # noqa: E501 + def get_vault_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a vault by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_get_with_http_info(async_req=True) + >>> thread = api.get_vault_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str owner: Ethereum address of the owner + :param int id: Vault ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -79,7 +80,7 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[Vault], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(Vault, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -87,7 +88,7 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'owner' + 'id' ] all_params.extend( [ @@ -102,18 +103,22 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_get" % key + " to method get_vault_by_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_vault_by_id`") # noqa: E501 collection_formats = {} path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] - if 'owner' in local_var_params and local_var_params['owner'] is not None: # noqa: E501 - query_params.append(('owner', local_var_params['owner'])) # noqa: E501 header_params = {} @@ -129,14 +134,14 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/vaults', 'GET', + '/v2/vaults/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Vault]', # noqa: E501 + response_type='Vault', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -144,12 +149,12 @@ def v2_vaults_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_vaults_id_events_get(self, id, **kwargs): # noqa: E501 + def get_vault_events_by_id(self, id, **kwargs): # noqa: E501 """Get vault events by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_events_get(id, async_req=True) + >>> thread = api.get_vault_events_by_id(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -162,19 +167,19 @@ def v2_vaults_id_events_get(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[BasicEvent] + :return: VaultEventsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_id_events_get_with_http_info(id, **kwargs) # noqa: E501 + return self.get_vault_events_by_id_with_http_info(id, **kwargs) # noqa: E501 - def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 + def get_vault_events_by_id_with_http_info(self, id, **kwargs): # noqa: E501 """Get vault events by ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_events_get_with_http_info(id, async_req=True) + >>> thread = api.get_vault_events_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -189,7 +194,7 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(list[BasicEvent], status_code(int), headers(HTTPHeaderDict)) + :return: tuple(VaultEventsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -213,14 +218,14 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_id_events_get" % key + " to method get_vault_events_by_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v2_vaults_id_events_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_vault_events_by_id`") # noqa: E501 collection_formats = {} @@ -253,7 +258,7 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[BasicEvent]', # noqa: E501 + response_type='VaultEventsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -261,16 +266,16 @@ def v2_vaults_id_events_get_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def v2_vaults_id_get(self, id, **kwargs): # noqa: E501 - """Get a vault by ID # noqa: E501 + def get_vaults_by_owner(self, **kwargs): # noqa: E501 + """Get vaults by owner query # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_get(id, async_req=True) + >>> thread = api.get_vaults_by_owner(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) + :param str owner: Ethereum address of the owner :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,23 +283,23 @@ def v2_vaults_id_get(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: Vault + :return: VaultsResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_vaults_id_get_with_http_info(id, **kwargs) # noqa: E501 + return self.get_vaults_by_owner_with_http_info(**kwargs) # noqa: E501 - def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get a vault by ID # noqa: E501 + def get_vaults_by_owner_with_http_info(self, **kwargs): # noqa: E501 + """Get vaults by owner query # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_vaults_id_get_with_http_info(id, async_req=True) + >>> thread = api.get_vaults_by_owner_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param int id: Vault ID (required) + :param str owner: Ethereum address of the owner :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -304,7 +309,7 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(Vault, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(VaultsResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -312,7 +317,7 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'id' + 'owner' ] all_params.extend( [ @@ -327,22 +332,18 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_vaults_id_get" % key + " to method get_vaults_by_owner" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v2_vaults_id_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] + if 'owner' in local_var_params and local_var_params['owner'] is not None: # noqa: E501 + query_params.append(('owner', local_var_params['owner'])) # noqa: E501 header_params = {} @@ -358,14 +359,14 @@ def v2_vaults_id_get_with_http_info(self, id, **kwargs): # noqa: E501 auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v2/vaults/{id}', 'GET', + '/v2/vaults', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Vault', # noqa: E501 + response_type='VaultsResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/service/openapi_client/api/websocket_api.py b/src/zarban/service/openapi_client/api/websocket_api.py index 8028d0d..5ea0bd1 100644 --- a/src/zarban/service/openapi_client/api/websocket_api.py +++ b/src/zarban/service/openapi_client/api/websocket_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def v2_ws_get(self, **kwargs): # noqa: E501 + def get_unfilled_orders_websocket(self, **kwargs): # noqa: E501 """Websocket Upgrade # noqa: E501 Upgrade to websocket connection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ws_get(async_req=True) + >>> thread = api.get_unfilled_orders_websocket(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -58,15 +59,15 @@ def v2_ws_get(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.v2_ws_get_with_http_info(**kwargs) # noqa: E501 + return self.get_unfilled_orders_websocket_with_http_info(**kwargs) # noqa: E501 - def v2_ws_get_with_http_info(self, **kwargs): # noqa: E501 + def get_unfilled_orders_websocket_with_http_info(self, **kwargs): # noqa: E501 """Websocket Upgrade # noqa: E501 Upgrade to websocket connection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.v2_ws_get_with_http_info(async_req=True) + >>> thread = api.get_unfilled_orders_websocket_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -101,7 +102,7 @@ def v2_ws_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method v2_ws_get" % key + " to method get_unfilled_orders_websocket" % key ) local_var_params[key] = val del local_var_params['kwargs'] diff --git a/src/zarban/service/openapi_client/api_client.py b/src/zarban/service/openapi_client/api_client.py index db125ff..6dfd6f6 100644 --- a/src/zarban/service/openapi_client/api_client.py +++ b/src/zarban/service/openapi_client/api_client.py @@ -5,6 +5,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/configuration.py b/src/zarban/service/openapi_client/configuration.py index 6546d08..147ae9e 100644 --- a/src/zarban/service/openapi_client/configuration.py +++ b/src/zarban/service/openapi_client/configuration.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/exceptions.py b/src/zarban/service/openapi_client/exceptions.py index c9b119b..d9e0bdd 100644 --- a/src/zarban/service/openapi_client/exceptions.py +++ b/src/zarban/service/openapi_client/exceptions.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/__init__.py b/src/zarban/service/openapi_client/models/__init__.py index cfd47d7..0611591 100644 --- a/src/zarban/service/openapi_client/models/__init__.py +++ b/src/zarban/service/openapi_client/models/__init__.py @@ -7,6 +7,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -17,58 +18,56 @@ from zarban.service.openapi_client.models.account import Account from zarban.service.openapi_client.models.account_lendingpool_summary import AccountLendingpoolSummary from zarban.service.openapi_client.models.account_stablecoin_system_summary import AccountStablecoinSystemSummary +from zarban.service.openapi_client.models.account_staking_summary import AccountStakingSummary from zarban.service.openapi_client.models.address import Address -from zarban.service.openapi_client.models.answer_updated_response import AnswerUpdatedResponse -from zarban.service.openapi_client.models.auth_matrix import AuthMatrix +from zarban.service.openapi_client.models.address_response import AddressResponse from zarban.service.openapi_client.models.balance import Balance from zarban.service.openapi_client.models.basic_event import BasicEvent -from zarban.service.openapi_client.models.better_error import BetterError -from zarban.service.openapi_client.models.better_error_messages import BetterErrorMessages from zarban.service.openapi_client.models.chain_activity import ChainActivity from zarban.service.openapi_client.models.chain_activity_step import ChainActivityStep -from zarban.service.openapi_client.models.chain_id import ChainId +from zarban.service.openapi_client.models.chain_activity_step_data import ChainActivityStepData from zarban.service.openapi_client.models.dutch_amount import DutchAmount from zarban.service.openapi_client.models.eip712_sign_request import EIP712SignRequest from zarban.service.openapi_client.models.error import Error +from zarban.service.openapi_client.models.error_message import ErrorMessage +from zarban.service.openapi_client.models.event_details_response import EventDetailsResponse from zarban.service.openapi_client.models.event_domain import EventDomain from zarban.service.openapi_client.models.event_name import EventName from zarban.service.openapi_client.models.event_type import EventType -from zarban.service.openapi_client.models.file import File +from zarban.service.openapi_client.models.extended_event import ExtendedEvent from zarban.service.openapi_client.models.formatted_reserve_data import FormattedReserveData from zarban.service.openapi_client.models.ilk import Ilk -from zarban.service.openapi_client.models.inline_response200 import InlineResponse200 +from zarban.service.openapi_client.models.ilks_response import IlksResponse from zarban.service.openapi_client.models.lendingpool_borrow import LendingpoolBorrow -from zarban.service.openapi_client.models.lendingpool_borrow_event import LendingpoolBorrowEvent from zarban.service.openapi_client.models.lendingpool_borrow_tx_request import LendingpoolBorrowTxRequest +from zarban.service.openapi_client.models.lendingpool_borrow_tx_response import LendingpoolBorrowTxResponse from zarban.service.openapi_client.models.lendingpool_deposit import LendingpoolDeposit -from zarban.service.openapi_client.models.lendingpool_deposit_event import LendingpoolDepositEvent from zarban.service.openapi_client.models.lendingpool_deposit_tx_request import LendingpoolDepositTxRequest -from zarban.service.openapi_client.models.lendingpool_flash_loan_event import LendingpoolFlashLoanEvent -from zarban.service.openapi_client.models.lendingpool_liquidation_call_event import LendingpoolLiquidationCallEvent -from zarban.service.openapi_client.models.lendingpool_repay_event import LendingpoolRepayEvent +from zarban.service.openapi_client.models.lendingpool_deposit_tx_response import LendingpoolDepositTxResponse from zarban.service.openapi_client.models.lendingpool_repay_tx_request import LendingpoolRepayTxRequest +from zarban.service.openapi_client.models.lendingpool_repay_tx_response import LendingpoolRepayTxResponse from zarban.service.openapi_client.models.lendingpool_stats import LendingpoolStats from zarban.service.openapi_client.models.lendingpool_tx_response import LendingpoolTxResponse from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_request import LendingpoolUseAssetAsCollateralTxRequest -from zarban.service.openapi_client.models.lendingpool_withdraw_event import LendingpoolWithdrawEvent +from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_response import LendingpoolUseAssetAsCollateralTxResponse from zarban.service.openapi_client.models.lendingpool_withdraw_tx_request import LendingpoolWithdrawTxRequest +from zarban.service.openapi_client.models.lendingpool_withdraw_tx_response import LendingpoolWithdrawTxResponse from zarban.service.openapi_client.models.log import Log -from zarban.service.openapi_client.models.median_event import MedianEvent from zarban.service.openapi_client.models.method_parameters import MethodParameters from zarban.service.openapi_client.models.order import Order from zarban.service.openapi_client.models.order_info import OrderInfo +from zarban.service.openapi_client.models.order_response import OrderResponse from zarban.service.openapi_client.models.order_type import OrderType -from zarban.service.openapi_client.models.permission import Permission -from zarban.service.openapi_client.models.permit_details import PermitDetails from zarban.service.openapi_client.models.permit_single import PermitSingle from zarban.service.openapi_client.models.personal_sign_request import PersonalSignRequest from zarban.service.openapi_client.models.prepared_tx import PreparedTx from zarban.service.openapi_client.models.price import Price -from zarban.service.openapi_client.models.proxy import Proxy +from zarban.service.openapi_client.models.price_list_response import PriceListResponse from zarban.service.openapi_client.models.quote_request import QuoteRequest from zarban.service.openapi_client.models.quote_request_options import QuoteRequestOptions from zarban.service.openapi_client.models.quote_response import QuoteResponse from zarban.service.openapi_client.models.raw_dutch_amount import RawDutchAmount +from zarban.service.openapi_client.models.route_item import RouteItem from zarban.service.openapi_client.models.scoreboard import Scoreboard from zarban.service.openapi_client.models.scoreboard_item import ScoreboardItem from zarban.service.openapi_client.models.stablecoin_system_bark_tx_request import StablecoinSystemBarkTxRequest @@ -83,8 +82,23 @@ from zarban.service.openapi_client.models.stablecoin_system_withdraw_collateral_tx_request import StablecoinSystemWithdrawCollateralTxRequest from zarban.service.openapi_client.models.stablecoin_system_zarexit_tx_request import StablecoinSystemZarexitTxRequest from zarban.service.openapi_client.models.stablecoin_system_zarjoin_tx_request import StablecoinSystemZarjoinTxRequest +from zarban.service.openapi_client.models.stake_balance import StakeBalance +from zarban.service.openapi_client.models.stake_plan import StakePlan +from zarban.service.openapi_client.models.stake_plans_response import StakePlansResponse +from zarban.service.openapi_client.models.staking_collect_reward_tx_request import StakingCollectRewardTxRequest +from zarban.service.openapi_client.models.staking_collect_reward_tx_response import StakingCollectRewardTxResponse +from zarban.service.openapi_client.models.staking_stake_tx_request import StakingStakeTxRequest +from zarban.service.openapi_client.models.staking_stake_tx_response import StakingStakeTxResponse +from zarban.service.openapi_client.models.staking_withdraw_tx_request import StakingWithdrawTxRequest +from zarban.service.openapi_client.models.staking_withdraw_tx_response import StakingWithdrawTxResponse from zarban.service.openapi_client.models.stats import Stats from zarban.service.openapi_client.models.symbol import Symbol +from zarban.service.openapi_client.models.system_bad_debt import SystemBadDebt +from zarban.service.openapi_client.models.system_debt import SystemDebt +from zarban.service.openapi_client.models.system_debt_ceiling import SystemDebtCeiling +from zarban.service.openapi_client.models.system_surplus import SystemSurplus +from zarban.service.openapi_client.models.system_surplus_buffer import SystemSurplusBuffer +from zarban.service.openapi_client.models.system_surplus_lot_size import SystemSurplusLotSize from zarban.service.openapi_client.models.time_range import TimeRange from zarban.service.openapi_client.models.timestamp import Timestamp from zarban.service.openapi_client.models.token import Token @@ -92,8 +106,18 @@ from zarban.service.openapi_client.models.type import Type from zarban.service.openapi_client.models.typed_data import TypedData from zarban.service.openapi_client.models.typed_data_domain import TypedDataDomain +from zarban.service.openapi_client.models.unclaimed_reward import UnclaimedReward from zarban.service.openapi_client.models.update_order_request import UpdateOrderRequest +from zarban.service.openapi_client.models.user_borrows_response import UserBorrowsResponse +from zarban.service.openapi_client.models.user_deposits_response import UserDepositsResponse +from zarban.service.openapi_client.models.user_error import UserError +from zarban.service.openapi_client.models.user_stake import UserStake +from zarban.service.openapi_client.models.user_stakes_response import UserStakesResponse from zarban.service.openapi_client.models.v3_pool_in_route import V3PoolInRoute from zarban.service.openapi_client.models.vault import Vault from zarban.service.openapi_client.models.vault_event import VaultEvent +from zarban.service.openapi_client.models.vault_event_extension import VaultEventExtension +from zarban.service.openapi_client.models.vault_event_item import VaultEventItem +from zarban.service.openapi_client.models.vault_events_response import VaultEventsResponse +from zarban.service.openapi_client.models.vaults_response import VaultsResponse from zarban.service.openapi_client.models.wallet_balance import WalletBalance diff --git a/src/zarban/service/openapi_client/models/account.py b/src/zarban/service/openapi_client/models/account.py index 38c1686..4faeefc 100644 --- a/src/zarban/service/openapi_client/models/account.py +++ b/src/zarban/service/openapi_client/models/account.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -40,7 +41,8 @@ class Account(object): 'total_debt': 'dict(str, str)', 'total_deposits': 'dict(str, str)', 'lendingpool_summary': 'AccountLendingpoolSummary', - 'stabelcoin_system_summary': 'AccountStablecoinSystemSummary' + 'stabelcoin_system_summary': 'AccountStablecoinSystemSummary', + 'staking_summary': 'AccountStakingSummary' } attribute_map = { @@ -51,10 +53,11 @@ class Account(object): 'total_debt': 'totalDebt', 'total_deposits': 'totalDeposits', 'lendingpool_summary': 'lendingpoolSummary', - 'stabelcoin_system_summary': 'stabelcoinSystemSummary' + 'stabelcoin_system_summary': 'stabelcoinSystemSummary', + 'staking_summary': 'stakingSummary' } - def __init__(self, points=None, address=None, wallet_balance=None, net_worth=None, total_debt=None, total_deposits=None, lendingpool_summary=None, stabelcoin_system_summary=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, points=None, address=None, wallet_balance=None, net_worth=None, total_debt=None, total_deposits=None, lendingpool_summary=None, stabelcoin_system_summary=None, staking_summary=None, local_vars_configuration=None): # noqa: E501 """Account - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -68,6 +71,7 @@ def __init__(self, points=None, address=None, wallet_balance=None, net_worth=Non self._total_deposits = None self._lendingpool_summary = None self._stabelcoin_system_summary = None + self._staking_summary = None self.discriminator = None self.points = points @@ -78,6 +82,7 @@ def __init__(self, points=None, address=None, wallet_balance=None, net_worth=Non self.total_deposits = total_deposits self.lendingpool_summary = lendingpool_summary self.stabelcoin_system_summary = stabelcoin_system_summary + self.staking_summary = staking_summary @property def points(self): @@ -267,6 +272,29 @@ def stabelcoin_system_summary(self, stabelcoin_system_summary): self._stabelcoin_system_summary = stabelcoin_system_summary + @property + def staking_summary(self): + """Gets the staking_summary of this Account. # noqa: E501 + + + :return: The staking_summary of this Account. # noqa: E501 + :rtype: AccountStakingSummary + """ + return self._staking_summary + + @staking_summary.setter + def staking_summary(self, staking_summary): + """Sets the staking_summary of this Account. + + + :param staking_summary: The staking_summary of this Account. # noqa: E501 + :type: AccountStakingSummary + """ + if self.local_vars_configuration.client_side_validation and staking_summary is None: # noqa: E501 + raise ValueError("Invalid value for `staking_summary`, must not be `None`") # noqa: E501 + + self._staking_summary = staking_summary + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/zarban/service/openapi_client/models/account_lendingpool_summary.py b/src/zarban/service/openapi_client/models/account_lendingpool_summary.py index 2bd1e15..aa09892 100644 --- a/src/zarban/service/openapi_client/models/account_lendingpool_summary.py +++ b/src/zarban/service/openapi_client/models/account_lendingpool_summary.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/account_stablecoin_system_summary.py b/src/zarban/service/openapi_client/models/account_stablecoin_system_summary.py index 1fbedb2..d0091e6 100644 --- a/src/zarban/service/openapi_client/models/account_stablecoin_system_summary.py +++ b/src/zarban/service/openapi_client/models/account_stablecoin_system_summary.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/account_staking_summary.py b/src/zarban/service/openapi_client/models/account_staking_summary.py new file mode 100644 index 0000000..6aa2f1a --- /dev/null +++ b/src/zarban/service/openapi_client/models/account_staking_summary.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class AccountStakingSummary(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total_stake': 'dict(str, str)', + 'unclaimed_reward': 'dict(str, str)', + 'net_apy': 'str' + } + + attribute_map = { + 'total_stake': 'totalStake', + 'unclaimed_reward': 'unclaimedReward', + 'net_apy': 'netApy' + } + + def __init__(self, total_stake=None, unclaimed_reward=None, net_apy=None, local_vars_configuration=None): # noqa: E501 + """AccountStakingSummary - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total_stake = None + self._unclaimed_reward = None + self._net_apy = None + self.discriminator = None + + self.total_stake = total_stake + self.unclaimed_reward = unclaimed_reward + self.net_apy = net_apy + + @property + def total_stake(self): + """Gets the total_stake of this AccountStakingSummary. # noqa: E501 + + + :return: The total_stake of this AccountStakingSummary. # noqa: E501 + :rtype: dict(str, str) + """ + return self._total_stake + + @total_stake.setter + def total_stake(self, total_stake): + """Sets the total_stake of this AccountStakingSummary. + + + :param total_stake: The total_stake of this AccountStakingSummary. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and total_stake is None: # noqa: E501 + raise ValueError("Invalid value for `total_stake`, must not be `None`") # noqa: E501 + + self._total_stake = total_stake + + @property + def unclaimed_reward(self): + """Gets the unclaimed_reward of this AccountStakingSummary. # noqa: E501 + + + :return: The unclaimed_reward of this AccountStakingSummary. # noqa: E501 + :rtype: dict(str, str) + """ + return self._unclaimed_reward + + @unclaimed_reward.setter + def unclaimed_reward(self, unclaimed_reward): + """Sets the unclaimed_reward of this AccountStakingSummary. + + + :param unclaimed_reward: The unclaimed_reward of this AccountStakingSummary. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and unclaimed_reward is None: # noqa: E501 + raise ValueError("Invalid value for `unclaimed_reward`, must not be `None`") # noqa: E501 + + self._unclaimed_reward = unclaimed_reward + + @property + def net_apy(self): + """Gets the net_apy of this AccountStakingSummary. # noqa: E501 + + Net annual percentage yield in staking contract # noqa: E501 + + :return: The net_apy of this AccountStakingSummary. # noqa: E501 + :rtype: str + """ + return self._net_apy + + @net_apy.setter + def net_apy(self, net_apy): + """Sets the net_apy of this AccountStakingSummary. + + Net annual percentage yield in staking contract # noqa: E501 + + :param net_apy: The net_apy of this AccountStakingSummary. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and net_apy is None: # noqa: E501 + raise ValueError("Invalid value for `net_apy`, must not be `None`") # noqa: E501 + + self._net_apy = net_apy + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountStakingSummary): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountStakingSummary): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/address.py b/src/zarban/service/openapi_client/models/address.py index 16b97db..208075b 100644 --- a/src/zarban/service/openapi_client/models/address.py +++ b/src/zarban/service/openapi_client/models/address.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/address_response.py b/src/zarban/service/openapi_client/models/address_response.py new file mode 100644 index 0000000..be234fa --- /dev/null +++ b/src/zarban/service/openapi_client/models/address_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class AddressResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Address]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """AddressResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this AddressResponse. # noqa: E501 + + + :return: The data of this AddressResponse. # noqa: E501 + :rtype: list[Address] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AddressResponse. + + + :param data: The data of this AddressResponse. # noqa: E501 + :type: list[Address] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddressResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddressResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/answer_updated_response.py b/src/zarban/service/openapi_client/models/answer_updated_response.py deleted file mode 100644 index 27db22d..0000000 --- a/src/zarban/service/openapi_client/models/answer_updated_response.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class AnswerUpdatedResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'current': 'str', - 'round_id': 'str', - 'updated_at': 'str', - 'raw': 'Log' - } - - attribute_map = { - 'current': 'current', - 'round_id': 'roundId', - 'updated_at': 'updatedAt', - 'raw': 'raw' - } - - def __init__(self, current=None, round_id=None, updated_at=None, raw=None, local_vars_configuration=None): # noqa: E501 - """AnswerUpdatedResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._current = None - self._round_id = None - self._updated_at = None - self._raw = None - self.discriminator = None - - self.current = current - self.round_id = round_id - self.updated_at = updated_at - self.raw = raw - - @property - def current(self): - """Gets the current of this AnswerUpdatedResponse. # noqa: E501 - - The current answer # noqa: E501 - - :return: The current of this AnswerUpdatedResponse. # noqa: E501 - :rtype: str - """ - return self._current - - @current.setter - def current(self, current): - """Sets the current of this AnswerUpdatedResponse. - - The current answer # noqa: E501 - - :param current: The current of this AnswerUpdatedResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and current is None: # noqa: E501 - raise ValueError("Invalid value for `current`, must not be `None`") # noqa: E501 - - self._current = current - - @property - def round_id(self): - """Gets the round_id of this AnswerUpdatedResponse. # noqa: E501 - - The ID of the round # noqa: E501 - - :return: The round_id of this AnswerUpdatedResponse. # noqa: E501 - :rtype: str - """ - return self._round_id - - @round_id.setter - def round_id(self, round_id): - """Sets the round_id of this AnswerUpdatedResponse. - - The ID of the round # noqa: E501 - - :param round_id: The round_id of this AnswerUpdatedResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and round_id is None: # noqa: E501 - raise ValueError("Invalid value for `round_id`, must not be `None`") # noqa: E501 - - self._round_id = round_id - - @property - def updated_at(self): - """Gets the updated_at of this AnswerUpdatedResponse. # noqa: E501 - - The time the answer was updated # noqa: E501 - - :return: The updated_at of this AnswerUpdatedResponse. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this AnswerUpdatedResponse. - - The time the answer was updated # noqa: E501 - - :param updated_at: The updated_at of this AnswerUpdatedResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - - @property - def raw(self): - """Gets the raw of this AnswerUpdatedResponse. # noqa: E501 - - - :return: The raw of this AnswerUpdatedResponse. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this AnswerUpdatedResponse. - - - :param raw: The raw of this AnswerUpdatedResponse. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AnswerUpdatedResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AnswerUpdatedResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/auth_matrix.py b/src/zarban/service/openapi_client/models/auth_matrix.py deleted file mode 100644 index e0aac5b..0000000 --- a/src/zarban/service/openapi_client/models/auth_matrix.py +++ /dev/null @@ -1,183 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class AuthMatrix(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'wheres': 'list[Address]', - 'whos': 'list[Address]', - 'values': 'list[list[int]]' - } - - attribute_map = { - 'wheres': 'wheres', - 'whos': 'whos', - 'values': 'values' - } - - def __init__(self, wheres=None, whos=None, values=None, local_vars_configuration=None): # noqa: E501 - """AuthMatrix - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._wheres = None - self._whos = None - self._values = None - self.discriminator = None - - self.wheres = wheres - self.whos = whos - self.values = values - - @property - def wheres(self): - """Gets the wheres of this AuthMatrix. # noqa: E501 - - - :return: The wheres of this AuthMatrix. # noqa: E501 - :rtype: list[Address] - """ - return self._wheres - - @wheres.setter - def wheres(self, wheres): - """Sets the wheres of this AuthMatrix. - - - :param wheres: The wheres of this AuthMatrix. # noqa: E501 - :type: list[Address] - """ - if self.local_vars_configuration.client_side_validation and wheres is None: # noqa: E501 - raise ValueError("Invalid value for `wheres`, must not be `None`") # noqa: E501 - - self._wheres = wheres - - @property - def whos(self): - """Gets the whos of this AuthMatrix. # noqa: E501 - - - :return: The whos of this AuthMatrix. # noqa: E501 - :rtype: list[Address] - """ - return self._whos - - @whos.setter - def whos(self, whos): - """Sets the whos of this AuthMatrix. - - - :param whos: The whos of this AuthMatrix. # noqa: E501 - :type: list[Address] - """ - if self.local_vars_configuration.client_side_validation and whos is None: # noqa: E501 - raise ValueError("Invalid value for `whos`, must not be `None`") # noqa: E501 - - self._whos = whos - - @property - def values(self): - """Gets the values of this AuthMatrix. # noqa: E501 - - - :return: The values of this AuthMatrix. # noqa: E501 - :rtype: list[list[int]] - """ - return self._values - - @values.setter - def values(self, values): - """Sets the values of this AuthMatrix. - - - :param values: The values of this AuthMatrix. # noqa: E501 - :type: list[list[int]] - """ - if self.local_vars_configuration.client_side_validation and values is None: # noqa: E501 - raise ValueError("Invalid value for `values`, must not be `None`") # noqa: E501 - allowed_values = [0, 1] # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - not set(values).issubset(set(allowed_values))): # noqa: E501 - raise ValueError( - "Invalid values for `values` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(values) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - - self._values = values - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthMatrix): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AuthMatrix): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/balance.py b/src/zarban/service/openapi_client/models/balance.py index 268cb68..fd04f76 100644 --- a/src/zarban/service/openapi_client/models/balance.py +++ b/src/zarban/service/openapi_client/models/balance.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/basic_event.py b/src/zarban/service/openapi_client/models/basic_event.py index 02e8fe1..e2aa325 100644 --- a/src/zarban/service/openapi_client/models/basic_event.py +++ b/src/zarban/service/openapi_client/models/basic_event.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/chain_activity.py b/src/zarban/service/openapi_client/models/chain_activity.py index 5f9508e..fb7a1a1 100644 --- a/src/zarban/service/openapi_client/models/chain_activity.py +++ b/src/zarban/service/openapi_client/models/chain_activity.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/chain_activity_step.py b/src/zarban/service/openapi_client/models/chain_activity_step.py index 560769d..29e1331 100644 --- a/src/zarban/service/openapi_client/models/chain_activity_step.py +++ b/src/zarban/service/openapi_client/models/chain_activity_step.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -34,7 +35,7 @@ class ChainActivityStep(object): """ openapi_types = { 'type': 'str', - 'data': 'OneOfPreparedTxEIP712SignRequestPersonalSignRequest' + 'data': 'ChainActivityStepData' } attribute_map = { @@ -90,7 +91,7 @@ def data(self): :return: The data of this ChainActivityStep. # noqa: E501 - :rtype: OneOfPreparedTxEIP712SignRequestPersonalSignRequest + :rtype: ChainActivityStepData """ return self._data @@ -100,7 +101,7 @@ def data(self, data): :param data: The data of this ChainActivityStep. # noqa: E501 - :type: OneOfPreparedTxEIP712SignRequestPersonalSignRequest + :type: ChainActivityStepData """ if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 diff --git a/src/zarban/service/openapi_client/models/chain_activity_step_data.py b/src/zarban/service/openapi_client/models/chain_activity_step_data.py new file mode 100644 index 0000000..d668779 --- /dev/null +++ b/src/zarban/service/openapi_client/models/chain_activity_step_data.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class ChainActivityStepData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'type': 'str', + 'label': 'dict(str, str)', + 'gas_use_estimate': 'int', + 'gas_fee_estimate': 'dict(str, str)', + 'method_parameters': 'MethodParameters', + 'name': 'str', + 'typed_data': 'TypedData', + 'hash': 'str', + 'message': 'str' + } + + attribute_map = { + 'type': 'type', + 'label': 'label', + 'gas_use_estimate': 'gasUseEstimate', + 'gas_fee_estimate': 'gasFeeEstimate', + 'method_parameters': 'methodParameters', + 'name': 'name', + 'typed_data': 'typedData', + 'hash': 'hash', + 'message': 'message' + } + + def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, name=None, typed_data=None, hash=None, message=None, local_vars_configuration=None): # noqa: E501 + """ChainActivityStepData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type = None + self._label = None + self._gas_use_estimate = None + self._gas_fee_estimate = None + self._method_parameters = None + self._name = None + self._typed_data = None + self._hash = None + self._message = None + self.discriminator = None + + self.type = type + self.label = label + self.gas_use_estimate = gas_use_estimate + self.gas_fee_estimate = gas_fee_estimate + self.method_parameters = method_parameters + self.name = name + self.typed_data = typed_data + self.hash = hash + self.message = message + + @property + def type(self): + """Gets the type of this ChainActivityStepData. # noqa: E501 + + + :return: The type of this ChainActivityStepData. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ChainActivityStepData. + + + :param type: The type of this ChainActivityStepData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def label(self): + """Gets the label of this ChainActivityStepData. # noqa: E501 + + + :return: The label of this ChainActivityStepData. # noqa: E501 + :rtype: dict(str, str) + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ChainActivityStepData. + + + :param label: The label of this ChainActivityStepData. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 + raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 + + self._label = label + + @property + def gas_use_estimate(self): + """Gets the gas_use_estimate of this ChainActivityStepData. # noqa: E501 + + + :return: The gas_use_estimate of this ChainActivityStepData. # noqa: E501 + :rtype: int + """ + return self._gas_use_estimate + + @gas_use_estimate.setter + def gas_use_estimate(self, gas_use_estimate): + """Sets the gas_use_estimate of this ChainActivityStepData. + + + :param gas_use_estimate: The gas_use_estimate of this ChainActivityStepData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and gas_use_estimate is None: # noqa: E501 + raise ValueError("Invalid value for `gas_use_estimate`, must not be `None`") # noqa: E501 + + self._gas_use_estimate = gas_use_estimate + + @property + def gas_fee_estimate(self): + """Gets the gas_fee_estimate of this ChainActivityStepData. # noqa: E501 + + + :return: The gas_fee_estimate of this ChainActivityStepData. # noqa: E501 + :rtype: dict(str, str) + """ + return self._gas_fee_estimate + + @gas_fee_estimate.setter + def gas_fee_estimate(self, gas_fee_estimate): + """Sets the gas_fee_estimate of this ChainActivityStepData. + + + :param gas_fee_estimate: The gas_fee_estimate of this ChainActivityStepData. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and gas_fee_estimate is None: # noqa: E501 + raise ValueError("Invalid value for `gas_fee_estimate`, must not be `None`") # noqa: E501 + + self._gas_fee_estimate = gas_fee_estimate + + @property + def method_parameters(self): + """Gets the method_parameters of this ChainActivityStepData. # noqa: E501 + + + :return: The method_parameters of this ChainActivityStepData. # noqa: E501 + :rtype: MethodParameters + """ + return self._method_parameters + + @method_parameters.setter + def method_parameters(self, method_parameters): + """Sets the method_parameters of this ChainActivityStepData. + + + :param method_parameters: The method_parameters of this ChainActivityStepData. # noqa: E501 + :type: MethodParameters + """ + if self.local_vars_configuration.client_side_validation and method_parameters is None: # noqa: E501 + raise ValueError("Invalid value for `method_parameters`, must not be `None`") # noqa: E501 + + self._method_parameters = method_parameters + + @property + def name(self): + """Gets the name of this ChainActivityStepData. # noqa: E501 + + The name of the EIP712 signature # noqa: E501 + + :return: The name of this ChainActivityStepData. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ChainActivityStepData. + + The name of the EIP712 signature # noqa: E501 + + :param name: The name of this ChainActivityStepData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def typed_data(self): + """Gets the typed_data of this ChainActivityStepData. # noqa: E501 + + + :return: The typed_data of this ChainActivityStepData. # noqa: E501 + :rtype: TypedData + """ + return self._typed_data + + @typed_data.setter + def typed_data(self, typed_data): + """Sets the typed_data of this ChainActivityStepData. + + + :param typed_data: The typed_data of this ChainActivityStepData. # noqa: E501 + :type: TypedData + """ + if self.local_vars_configuration.client_side_validation and typed_data is None: # noqa: E501 + raise ValueError("Invalid value for `typed_data`, must not be `None`") # noqa: E501 + + self._typed_data = typed_data + + @property + def hash(self): + """Gets the hash of this ChainActivityStepData. # noqa: E501 + + The hash of the EIP712 signature that needs to be signed # noqa: E501 + + :return: The hash of this ChainActivityStepData. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this ChainActivityStepData. + + The hash of the EIP712 signature that needs to be signed # noqa: E501 + + :param hash: The hash of this ChainActivityStepData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hash is None: # noqa: E501 + raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + hash is not None and not re.search(r'^(0x)?[0-9a-fA-F]{64}$', hash)): # noqa: E501 + raise ValueError(r"Invalid value for `hash`, must be a follow pattern or equal to `/^(0x)?[0-9a-fA-F]{64}$/`") # noqa: E501 + + self._hash = hash + + @property + def message(self): + """Gets the message of this ChainActivityStepData. # noqa: E501 + + The message that needs to be signed # noqa: E501 + + :return: The message of this ChainActivityStepData. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ChainActivityStepData. + + The message that needs to be signed # noqa: E501 + + :param message: The message of this ChainActivityStepData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ChainActivityStepData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChainActivityStepData): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/dutch_amount.py b/src/zarban/service/openapi_client/models/dutch_amount.py index 8f05280..ce7baf6 100644 --- a/src/zarban/service/openapi_client/models/dutch_amount.py +++ b/src/zarban/service/openapi_client/models/dutch_amount.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/eip712_sign_request.py b/src/zarban/service/openapi_client/models/eip712_sign_request.py index de7ad48..9d1da7d 100644 --- a/src/zarban/service/openapi_client/models/eip712_sign_request.py +++ b/src/zarban/service/openapi_client/models/eip712_sign_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/error.py b/src/zarban/service/openapi_client/models/error.py index c85d2d2..74012d7 100644 --- a/src/zarban/service/openapi_client/models/error.py +++ b/src/zarban/service/openapi_client/models/error.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -53,8 +54,7 @@ def __init__(self, msg=None, reasons=None, local_vars_configuration=None): # no self.discriminator = None self.msg = msg - if reasons is not None: - self.reasons = reasons + self.reasons = reasons @property def msg(self): @@ -99,6 +99,8 @@ def reasons(self, reasons): :param reasons: The reasons of this Error. # noqa: E501 :type: list[str] """ + if self.local_vars_configuration.client_side_validation and reasons is None: # noqa: E501 + raise ValueError("Invalid value for `reasons`, must not be `None`") # noqa: E501 self._reasons = reasons diff --git a/src/zarban/service/openapi_client/models/better_error_messages.py b/src/zarban/service/openapi_client/models/error_message.py similarity index 78% rename from src/zarban/service/openapi_client/models/better_error_messages.py rename to src/zarban/service/openapi_client/models/error_message.py index 68846b5..133bf1f 100644 --- a/src/zarban/service/openapi_client/models/better_error_messages.py +++ b/src/zarban/service/openapi_client/models/error_message.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.service.openapi_client.configuration import Configuration -class BetterErrorMessages(object): +class ErrorMessage(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,7 +44,7 @@ class BetterErrorMessages(object): } def __init__(self, user_message=None, solutions=None, local_vars_configuration=None): # noqa: E501 - """BetterErrorMessages - a model defined in OpenAPI""" # noqa: E501 + """ErrorMessage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -53,27 +54,26 @@ def __init__(self, user_message=None, solutions=None, local_vars_configuration=N self.discriminator = None self.user_message = user_message - if solutions is not None: - self.solutions = solutions + self.solutions = solutions @property def user_message(self): - """Gets the user_message of this BetterErrorMessages. # noqa: E501 + """Gets the user_message of this ErrorMessage. # noqa: E501 User-friendly error message # noqa: E501 - :return: The user_message of this BetterErrorMessages. # noqa: E501 + :return: The user_message of this ErrorMessage. # noqa: E501 :rtype: str """ return self._user_message @user_message.setter def user_message(self, user_message): - """Sets the user_message of this BetterErrorMessages. + """Sets the user_message of this ErrorMessage. User-friendly error message # noqa: E501 - :param user_message: The user_message of this BetterErrorMessages. # noqa: E501 + :param user_message: The user_message of this ErrorMessage. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_message is None: # noqa: E501 @@ -83,22 +83,24 @@ def user_message(self, user_message): @property def solutions(self): - """Gets the solutions of this BetterErrorMessages. # noqa: E501 + """Gets the solutions of this ErrorMessage. # noqa: E501 - :return: The solutions of this BetterErrorMessages. # noqa: E501 + :return: The solutions of this ErrorMessage. # noqa: E501 :rtype: list[str] """ return self._solutions @solutions.setter def solutions(self, solutions): - """Sets the solutions of this BetterErrorMessages. + """Sets the solutions of this ErrorMessage. - :param solutions: The solutions of this BetterErrorMessages. # noqa: E501 + :param solutions: The solutions of this ErrorMessage. # noqa: E501 :type: list[str] """ + if self.local_vars_configuration.client_side_validation and solutions is None: # noqa: E501 + raise ValueError("Invalid value for `solutions`, must not be `None`") # noqa: E501 self._solutions = solutions @@ -136,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, BetterErrorMessages): + if not isinstance(other, ErrorMessage): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, BetterErrorMessages): + if not isinstance(other, ErrorMessage): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/event_details_response.py b/src/zarban/service/openapi_client/models/event_details_response.py new file mode 100644 index 0000000..28ceb36 --- /dev/null +++ b/src/zarban/service/openapi_client/models/event_details_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class EventDetailsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Log]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """EventDetailsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this EventDetailsResponse. # noqa: E501 + + + :return: The data of this EventDetailsResponse. # noqa: E501 + :rtype: list[Log] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this EventDetailsResponse. + + + :param data: The data of this EventDetailsResponse. # noqa: E501 + :type: list[Log] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EventDetailsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EventDetailsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/event_domain.py b/src/zarban/service/openapi_client/models/event_domain.py index 78bfe01..e81e29b 100644 --- a/src/zarban/service/openapi_client/models/event_domain.py +++ b/src/zarban/service/openapi_client/models/event_domain.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/event_name.py b/src/zarban/service/openapi_client/models/event_name.py index 62a91fe..6050d91 100644 --- a/src/zarban/service/openapi_client/models/event_name.py +++ b/src/zarban/service/openapi_client/models/event_name.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/event_type.py b/src/zarban/service/openapi_client/models/event_type.py index 30f2685..b789b50 100644 --- a/src/zarban/service/openapi_client/models/event_type.py +++ b/src/zarban/service/openapi_client/models/event_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/extended_event.py b/src/zarban/service/openapi_client/models/extended_event.py new file mode 100644 index 0000000..c6cf02d --- /dev/null +++ b/src/zarban/service/openapi_client/models/extended_event.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class ExtendedEvent(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain': 'EventDomain', + 'id': 'int', + 'name': 'EventName', + 'raw': 'Log', + 'type': 'EventType', + 'payload': 'dict(str, object)' + } + + attribute_map = { + 'domain': 'domain', + 'id': 'id', + 'name': 'name', + 'raw': 'raw', + 'type': 'type', + 'payload': 'payload' + } + + def __init__(self, domain=None, id=None, name=None, raw=None, type=None, payload=None, local_vars_configuration=None): # noqa: E501 + """ExtendedEvent - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain = None + self._id = None + self._name = None + self._raw = None + self._type = None + self._payload = None + self.discriminator = None + + self.domain = domain + self.id = id + self.name = name + self.raw = raw + self.type = type + self.payload = payload + + @property + def domain(self): + """Gets the domain of this ExtendedEvent. # noqa: E501 + + + :return: The domain of this ExtendedEvent. # noqa: E501 + :rtype: EventDomain + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this ExtendedEvent. + + + :param domain: The domain of this ExtendedEvent. # noqa: E501 + :type: EventDomain + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def id(self): + """Gets the id of this ExtendedEvent. # noqa: E501 + + Identifier for the event. # noqa: E501 + + :return: The id of this ExtendedEvent. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ExtendedEvent. + + Identifier for the event. # noqa: E501 + + :param id: The id of this ExtendedEvent. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this ExtendedEvent. # noqa: E501 + + + :return: The name of this ExtendedEvent. # noqa: E501 + :rtype: EventName + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ExtendedEvent. + + + :param name: The name of this ExtendedEvent. # noqa: E501 + :type: EventName + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def raw(self): + """Gets the raw of this ExtendedEvent. # noqa: E501 + + + :return: The raw of this ExtendedEvent. # noqa: E501 + :rtype: Log + """ + return self._raw + + @raw.setter + def raw(self, raw): + """Sets the raw of this ExtendedEvent. + + + :param raw: The raw of this ExtendedEvent. # noqa: E501 + :type: Log + """ + if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 + raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 + + self._raw = raw + + @property + def type(self): + """Gets the type of this ExtendedEvent. # noqa: E501 + + + :return: The type of this ExtendedEvent. # noqa: E501 + :rtype: EventType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ExtendedEvent. + + + :param type: The type of this ExtendedEvent. # noqa: E501 + :type: EventType + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def payload(self): + """Gets the payload of this ExtendedEvent. # noqa: E501 + + The payload of the event. The payload is a JSON-marshalled # noqa: E501 + + :return: The payload of this ExtendedEvent. # noqa: E501 + :rtype: dict(str, object) + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this ExtendedEvent. + + The payload of the event. The payload is a JSON-marshalled # noqa: E501 + + :param payload: The payload of this ExtendedEvent. # noqa: E501 + :type: dict(str, object) + """ + if self.local_vars_configuration.client_side_validation and payload is None: # noqa: E501 + raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 + + self._payload = payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExtendedEvent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExtendedEvent): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/file.py b/src/zarban/service/openapi_client/models/file.py deleted file mode 100644 index 5bb435a..0000000 --- a/src/zarban/service/openapi_client/models/file.py +++ /dev/null @@ -1,294 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class File(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'time': 'str', - 'where': 'str', - 'ilk': 'str', - 'what': 'str', - 'data': 'str', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'where': 'where', - 'ilk': 'ilk', - 'what': 'what', - 'data': 'data', - 'raw': 'raw' - } - - def __init__(self, id=None, time=None, where=None, ilk=None, what=None, data=None, raw=None, local_vars_configuration=None): # noqa: E501 - """File - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._where = None - self._ilk = None - self._what = None - self._data = None - self._raw = None - self.discriminator = None - - self.id = id - self.time = time - self.where = where - if ilk is not None: - self.ilk = ilk - self.what = what - self.data = data - self.raw = raw - - @property - def id(self): - """Gets the id of this File. # noqa: E501 - - The file's ID # noqa: E501 - - :return: The id of this File. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this File. - - The file's ID # noqa: E501 - - :param id: The id of this File. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def time(self): - """Gets the time of this File. # noqa: E501 - - The time the file was created # noqa: E501 - - :return: The time of this File. # noqa: E501 - :rtype: str - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this File. - - The time the file was created # noqa: E501 - - :param time: The time of this File. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and time is None: # noqa: E501 - raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 - - self._time = time - - @property - def where(self): - """Gets the where of this File. # noqa: E501 - - The file's location or source # noqa: E501 - - :return: The where of this File. # noqa: E501 - :rtype: str - """ - return self._where - - @where.setter - def where(self, where): - """Sets the where of this File. - - The file's location or source # noqa: E501 - - :param where: The where of this File. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and where is None: # noqa: E501 - raise ValueError("Invalid value for `where`, must not be `None`") # noqa: E501 - - self._where = where - - @property - def ilk(self): - """Gets the ilk of this File. # noqa: E501 - - The file's ilk # noqa: E501 - - :return: The ilk of this File. # noqa: E501 - :rtype: str - """ - return self._ilk - - @ilk.setter - def ilk(self, ilk): - """Sets the ilk of this File. - - The file's ilk # noqa: E501 - - :param ilk: The ilk of this File. # noqa: E501 - :type: str - """ - - self._ilk = ilk - - @property - def what(self): - """Gets the what of this File. # noqa: E501 - - The file's description or purpose # noqa: E501 - - :return: The what of this File. # noqa: E501 - :rtype: str - """ - return self._what - - @what.setter - def what(self, what): - """Sets the what of this File. - - The file's description or purpose # noqa: E501 - - :param what: The what of this File. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and what is None: # noqa: E501 - raise ValueError("Invalid value for `what`, must not be `None`") # noqa: E501 - - self._what = what - - @property - def data(self): - """Gets the data of this File. # noqa: E501 - - The file's data # noqa: E501 - - :return: The data of this File. # noqa: E501 - :rtype: str - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this File. - - The file's data # noqa: E501 - - :param data: The data of this File. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 - raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - - self._data = data - - @property - def raw(self): - """Gets the raw of this File. # noqa: E501 - - - :return: The raw of this File. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this File. - - - :param raw: The raw of this File. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, File): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, File): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/formatted_reserve_data.py b/src/zarban/service/openapi_client/models/formatted_reserve_data.py index 5aaf94c..dff295f 100644 --- a/src/zarban/service/openapi_client/models/formatted_reserve_data.py +++ b/src/zarban/service/openapi_client/models/formatted_reserve_data.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/ilk.py b/src/zarban/service/openapi_client/models/ilk.py index 409ac91..b54f401 100644 --- a/src/zarban/service/openapi_client/models/ilk.py +++ b/src/zarban/service/openapi_client/models/ilk.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/ilks_response.py b/src/zarban/service/openapi_client/models/ilks_response.py new file mode 100644 index 0000000..d24a9e6 --- /dev/null +++ b/src/zarban/service/openapi_client/models/ilks_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class IlksResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Ilk]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """IlksResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this IlksResponse. # noqa: E501 + + + :return: The data of this IlksResponse. # noqa: E501 + :rtype: list[Ilk] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this IlksResponse. + + + :param data: The data of this IlksResponse. # noqa: E501 + :type: list[Ilk] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IlksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IlksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_borrow.py b/src/zarban/service/openapi_client/models/lendingpool_borrow.py index 638b92e..e959578 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_borrow.py +++ b/src/zarban/service/openapi_client/models/lendingpool_borrow.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_borrow_event.py b/src/zarban/service/openapi_client/models/lendingpool_borrow_event.py deleted file mode 100644 index 3e36cc9..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_borrow_event.py +++ /dev/null @@ -1,351 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolBorrowEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'reserve': 'str', - 'user': 'str', - 'on_behalf_of': 'str', - 'amount': 'str', - 'borrow_rate_mode': 'str', - 'borrow_rate': 'str', - 'referral': 'int', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'reserve': 'reserve', - 'user': 'user', - 'on_behalf_of': 'onBehalfOf', - 'amount': 'amount', - 'borrow_rate_mode': 'borrowRateMode', - 'borrow_rate': 'borrowRate', - 'referral': 'referral', - 'raw': 'raw' - } - - def __init__(self, id=None, reserve=None, user=None, on_behalf_of=None, amount=None, borrow_rate_mode=None, borrow_rate=None, referral=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolBorrowEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._reserve = None - self._user = None - self._on_behalf_of = None - self._amount = None - self._borrow_rate_mode = None - self._borrow_rate = None - self._referral = None - self._raw = None - self.discriminator = None - - self.id = id - self.reserve = reserve - self.user = user - if on_behalf_of is not None: - self.on_behalf_of = on_behalf_of - self.amount = amount - self.borrow_rate_mode = borrow_rate_mode - self.borrow_rate = borrow_rate - if referral is not None: - self.referral = referral - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolBorrowEvent. # noqa: E501 - - Identifier for the borrow event. # noqa: E501 - - :return: The id of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolBorrowEvent. - - Identifier for the borrow event. # noqa: E501 - - :param id: The id of this LendingpoolBorrowEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def reserve(self): - """Gets the reserve of this LendingpoolBorrowEvent. # noqa: E501 - - Ethereum address of the reserve from which the amount was borrowed. # noqa: E501 - - :return: The reserve of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._reserve - - @reserve.setter - def reserve(self, reserve): - """Sets the reserve of this LendingpoolBorrowEvent. - - Ethereum address of the reserve from which the amount was borrowed. # noqa: E501 - - :param reserve: The reserve of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reserve is None: # noqa: E501 - raise ValueError("Invalid value for `reserve`, must not be `None`") # noqa: E501 - - self._reserve = reserve - - @property - def user(self): - """Gets the user of this LendingpoolBorrowEvent. # noqa: E501 - - Ethereum address of the user who borrowed. # noqa: E501 - - :return: The user of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this LendingpoolBorrowEvent. - - Ethereum address of the user who borrowed. # noqa: E501 - - :param user: The user of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def on_behalf_of(self): - """Gets the on_behalf_of of this LendingpoolBorrowEvent. # noqa: E501 - - Ethereum address of the entity on whose behalf the borrowing occurred. # noqa: E501 - - :return: The on_behalf_of of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._on_behalf_of - - @on_behalf_of.setter - def on_behalf_of(self, on_behalf_of): - """Sets the on_behalf_of of this LendingpoolBorrowEvent. - - Ethereum address of the entity on whose behalf the borrowing occurred. # noqa: E501 - - :param on_behalf_of: The on_behalf_of of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - - self._on_behalf_of = on_behalf_of - - @property - def amount(self): - """Gets the amount of this LendingpoolBorrowEvent. # noqa: E501 - - The borrowed amount. # noqa: E501 - - :return: The amount of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LendingpoolBorrowEvent. - - The borrowed amount. # noqa: E501 - - :param amount: The amount of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def borrow_rate_mode(self): - """Gets the borrow_rate_mode of this LendingpoolBorrowEvent. # noqa: E501 - - The mode of borrowing rate (e.g., stable, variable). # noqa: E501 - - :return: The borrow_rate_mode of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._borrow_rate_mode - - @borrow_rate_mode.setter - def borrow_rate_mode(self, borrow_rate_mode): - """Sets the borrow_rate_mode of this LendingpoolBorrowEvent. - - The mode of borrowing rate (e.g., stable, variable). # noqa: E501 - - :param borrow_rate_mode: The borrow_rate_mode of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_rate_mode is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_rate_mode`, must not be `None`") # noqa: E501 - - self._borrow_rate_mode = borrow_rate_mode - - @property - def borrow_rate(self): - """Gets the borrow_rate of this LendingpoolBorrowEvent. # noqa: E501 - - The interest rate for the borrowed amount. # noqa: E501 - - :return: The borrow_rate of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: str - """ - return self._borrow_rate - - @borrow_rate.setter - def borrow_rate(self, borrow_rate): - """Sets the borrow_rate of this LendingpoolBorrowEvent. - - The interest rate for the borrowed amount. # noqa: E501 - - :param borrow_rate: The borrow_rate of this LendingpoolBorrowEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_rate is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_rate`, must not be `None`") # noqa: E501 - - self._borrow_rate = borrow_rate - - @property - def referral(self): - """Gets the referral of this LendingpoolBorrowEvent. # noqa: E501 - - Referral code or identifier. # noqa: E501 - - :return: The referral of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: int - """ - return self._referral - - @referral.setter - def referral(self, referral): - """Sets the referral of this LendingpoolBorrowEvent. - - Referral code or identifier. # noqa: E501 - - :param referral: The referral of this LendingpoolBorrowEvent. # noqa: E501 - :type: int - """ - - self._referral = referral - - @property - def raw(self): - """Gets the raw of this LendingpoolBorrowEvent. # noqa: E501 - - - :return: The raw of this LendingpoolBorrowEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolBorrowEvent. - - - :param raw: The raw of this LendingpoolBorrowEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolBorrowEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolBorrowEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_request.py b/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_request.py index 33b4c9a..3507fc1 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_request.py +++ b/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_response.py b/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_response.py new file mode 100644 index 0000000..61d3666 --- /dev/null +++ b/src/zarban/service/openapi_client/models/lendingpool_borrow_tx_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class LendingpoolBorrowTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity', + 'response': 'LendingpoolTxResponse' + } + + attribute_map = { + 'chain_activity': 'chainActivity', + 'response': 'response' + } + + def __init__(self, chain_activity=None, response=None, local_vars_configuration=None): # noqa: E501 + """LendingpoolBorrowTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self._response = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + if response is not None: + self.response = response + + @property + def chain_activity(self): + """Gets the chain_activity of this LendingpoolBorrowTxResponse. # noqa: E501 + + + :return: The chain_activity of this LendingpoolBorrowTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this LendingpoolBorrowTxResponse. + + + :param chain_activity: The chain_activity of this LendingpoolBorrowTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + @property + def response(self): + """Gets the response of this LendingpoolBorrowTxResponse. # noqa: E501 + + + :return: The response of this LendingpoolBorrowTxResponse. # noqa: E501 + :rtype: LendingpoolTxResponse + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this LendingpoolBorrowTxResponse. + + + :param response: The response of this LendingpoolBorrowTxResponse. # noqa: E501 + :type: LendingpoolTxResponse + """ + + self._response = response + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LendingpoolBorrowTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LendingpoolBorrowTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_deposit.py b/src/zarban/service/openapi_client/models/lendingpool_deposit.py index fa3a2a8..b984226 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_deposit.py +++ b/src/zarban/service/openapi_client/models/lendingpool_deposit.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_deposit_event.py b/src/zarban/service/openapi_client/models/lendingpool_deposit_event.py deleted file mode 100644 index 0b775fd..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_deposit_event.py +++ /dev/null @@ -1,294 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolDepositEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'reserve': 'str', - 'user': 'str', - 'on_behalf_of': 'str', - 'amount': 'str', - 'referral': 'int', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'reserve': 'reserve', - 'user': 'user', - 'on_behalf_of': 'onBehalfOf', - 'amount': 'amount', - 'referral': 'referral', - 'raw': 'raw' - } - - def __init__(self, id=None, reserve=None, user=None, on_behalf_of=None, amount=None, referral=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolDepositEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._reserve = None - self._user = None - self._on_behalf_of = None - self._amount = None - self._referral = None - self._raw = None - self.discriminator = None - - self.id = id - self.reserve = reserve - self.user = user - self.on_behalf_of = on_behalf_of - self.amount = amount - if referral is not None: - self.referral = referral - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolDepositEvent. # noqa: E501 - - Identifier for the deposit event. # noqa: E501 - - :return: The id of this LendingpoolDepositEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolDepositEvent. - - Identifier for the deposit event. # noqa: E501 - - :param id: The id of this LendingpoolDepositEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def reserve(self): - """Gets the reserve of this LendingpoolDepositEvent. # noqa: E501 - - Ethereum address of the reserve where the deposit was made. # noqa: E501 - - :return: The reserve of this LendingpoolDepositEvent. # noqa: E501 - :rtype: str - """ - return self._reserve - - @reserve.setter - def reserve(self, reserve): - """Sets the reserve of this LendingpoolDepositEvent. - - Ethereum address of the reserve where the deposit was made. # noqa: E501 - - :param reserve: The reserve of this LendingpoolDepositEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reserve is None: # noqa: E501 - raise ValueError("Invalid value for `reserve`, must not be `None`") # noqa: E501 - - self._reserve = reserve - - @property - def user(self): - """Gets the user of this LendingpoolDepositEvent. # noqa: E501 - - Ethereum address of the user who made the deposit. # noqa: E501 - - :return: The user of this LendingpoolDepositEvent. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this LendingpoolDepositEvent. - - Ethereum address of the user who made the deposit. # noqa: E501 - - :param user: The user of this LendingpoolDepositEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def on_behalf_of(self): - """Gets the on_behalf_of of this LendingpoolDepositEvent. # noqa: E501 - - Ethereum address of the entity on whose behalf the deposit was made. # noqa: E501 - - :return: The on_behalf_of of this LendingpoolDepositEvent. # noqa: E501 - :rtype: str - """ - return self._on_behalf_of - - @on_behalf_of.setter - def on_behalf_of(self, on_behalf_of): - """Sets the on_behalf_of of this LendingpoolDepositEvent. - - Ethereum address of the entity on whose behalf the deposit was made. # noqa: E501 - - :param on_behalf_of: The on_behalf_of of this LendingpoolDepositEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and on_behalf_of is None: # noqa: E501 - raise ValueError("Invalid value for `on_behalf_of`, must not be `None`") # noqa: E501 - - self._on_behalf_of = on_behalf_of - - @property - def amount(self): - """Gets the amount of this LendingpoolDepositEvent. # noqa: E501 - - The deposited amount. # noqa: E501 - - :return: The amount of this LendingpoolDepositEvent. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LendingpoolDepositEvent. - - The deposited amount. # noqa: E501 - - :param amount: The amount of this LendingpoolDepositEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def referral(self): - """Gets the referral of this LendingpoolDepositEvent. # noqa: E501 - - Referral code or identifier. # noqa: E501 - - :return: The referral of this LendingpoolDepositEvent. # noqa: E501 - :rtype: int - """ - return self._referral - - @referral.setter - def referral(self, referral): - """Sets the referral of this LendingpoolDepositEvent. - - Referral code or identifier. # noqa: E501 - - :param referral: The referral of this LendingpoolDepositEvent. # noqa: E501 - :type: int - """ - - self._referral = referral - - @property - def raw(self): - """Gets the raw of this LendingpoolDepositEvent. # noqa: E501 - - - :return: The raw of this LendingpoolDepositEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolDepositEvent. - - - :param raw: The raw of this LendingpoolDepositEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolDepositEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolDepositEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_request.py b/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_request.py index 954f85c..9a41a40 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_request.py +++ b/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_response.py b/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_response.py new file mode 100644 index 0000000..f8232ce --- /dev/null +++ b/src/zarban/service/openapi_client/models/lendingpool_deposit_tx_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class LendingpoolDepositTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity', + 'response': 'LendingpoolTxResponse' + } + + attribute_map = { + 'chain_activity': 'chainActivity', + 'response': 'response' + } + + def __init__(self, chain_activity=None, response=None, local_vars_configuration=None): # noqa: E501 + """LendingpoolDepositTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self._response = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + if response is not None: + self.response = response + + @property + def chain_activity(self): + """Gets the chain_activity of this LendingpoolDepositTxResponse. # noqa: E501 + + + :return: The chain_activity of this LendingpoolDepositTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this LendingpoolDepositTxResponse. + + + :param chain_activity: The chain_activity of this LendingpoolDepositTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + @property + def response(self): + """Gets the response of this LendingpoolDepositTxResponse. # noqa: E501 + + + :return: The response of this LendingpoolDepositTxResponse. # noqa: E501 + :rtype: LendingpoolTxResponse + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this LendingpoolDepositTxResponse. + + + :param response: The response of this LendingpoolDepositTxResponse. # noqa: E501 + :type: LendingpoolTxResponse + """ + + self._response = response + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LendingpoolDepositTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LendingpoolDepositTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_flash_loan_event.py b/src/zarban/service/openapi_client/models/lendingpool_flash_loan_event.py deleted file mode 100644 index 1048dcf..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_flash_loan_event.py +++ /dev/null @@ -1,323 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolFlashLoanEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'target': 'str', - 'initiator': 'str', - 'asset': 'str', - 'amount': 'str', - 'premium': 'str', - 'referral_code': 'int', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'target': 'target', - 'initiator': 'initiator', - 'asset': 'asset', - 'amount': 'amount', - 'premium': 'premium', - 'referral_code': 'referralCode', - 'raw': 'raw' - } - - def __init__(self, id=None, target=None, initiator=None, asset=None, amount=None, premium=None, referral_code=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolFlashLoanEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._target = None - self._initiator = None - self._asset = None - self._amount = None - self._premium = None - self._referral_code = None - self._raw = None - self.discriminator = None - - self.id = id - self.target = target - self.initiator = initiator - self.asset = asset - self.amount = amount - self.premium = premium - if referral_code is not None: - self.referral_code = referral_code - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolFlashLoanEvent. # noqa: E501 - - Identifier for the flash loan event. # noqa: E501 - - :return: The id of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolFlashLoanEvent. - - Identifier for the flash loan event. # noqa: E501 - - :param id: The id of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def target(self): - """Gets the target of this LendingpoolFlashLoanEvent. # noqa: E501 - - Ethereum address of the target involved in the flash loan. # noqa: E501 - - :return: The target of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: str - """ - return self._target - - @target.setter - def target(self, target): - """Sets the target of this LendingpoolFlashLoanEvent. - - Ethereum address of the target involved in the flash loan. # noqa: E501 - - :param target: The target of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and target is None: # noqa: E501 - raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 - - self._target = target - - @property - def initiator(self): - """Gets the initiator of this LendingpoolFlashLoanEvent. # noqa: E501 - - Ethereum address of the initiator who triggered the flash loan. # noqa: E501 - - :return: The initiator of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: str - """ - return self._initiator - - @initiator.setter - def initiator(self, initiator): - """Sets the initiator of this LendingpoolFlashLoanEvent. - - Ethereum address of the initiator who triggered the flash loan. # noqa: E501 - - :param initiator: The initiator of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and initiator is None: # noqa: E501 - raise ValueError("Invalid value for `initiator`, must not be `None`") # noqa: E501 - - self._initiator = initiator - - @property - def asset(self): - """Gets the asset of this LendingpoolFlashLoanEvent. # noqa: E501 - - Ethereum address of the asset used in the flash loan. # noqa: E501 - - :return: The asset of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: str - """ - return self._asset - - @asset.setter - def asset(self, asset): - """Sets the asset of this LendingpoolFlashLoanEvent. - - Ethereum address of the asset used in the flash loan. # noqa: E501 - - :param asset: The asset of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and asset is None: # noqa: E501 - raise ValueError("Invalid value for `asset`, must not be `None`") # noqa: E501 - - self._asset = asset - - @property - def amount(self): - """Gets the amount of this LendingpoolFlashLoanEvent. # noqa: E501 - - The amount involved in the flash loan. # noqa: E501 - - :return: The amount of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LendingpoolFlashLoanEvent. - - The amount involved in the flash loan. # noqa: E501 - - :param amount: The amount of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def premium(self): - """Gets the premium of this LendingpoolFlashLoanEvent. # noqa: E501 - - The premium involved in the flash loan. # noqa: E501 - - :return: The premium of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: str - """ - return self._premium - - @premium.setter - def premium(self, premium): - """Sets the premium of this LendingpoolFlashLoanEvent. - - The premium involved in the flash loan. # noqa: E501 - - :param premium: The premium of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and premium is None: # noqa: E501 - raise ValueError("Invalid value for `premium`, must not be `None`") # noqa: E501 - - self._premium = premium - - @property - def referral_code(self): - """Gets the referral_code of this LendingpoolFlashLoanEvent. # noqa: E501 - - Referral code or identifier related to the flash loan. # noqa: E501 - - :return: The referral_code of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: int - """ - return self._referral_code - - @referral_code.setter - def referral_code(self, referral_code): - """Sets the referral_code of this LendingpoolFlashLoanEvent. - - Referral code or identifier related to the flash loan. # noqa: E501 - - :param referral_code: The referral_code of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: int - """ - - self._referral_code = referral_code - - @property - def raw(self): - """Gets the raw of this LendingpoolFlashLoanEvent. # noqa: E501 - - - :return: The raw of this LendingpoolFlashLoanEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolFlashLoanEvent. - - - :param raw: The raw of this LendingpoolFlashLoanEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolFlashLoanEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolFlashLoanEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_liquidation_call_event.py b/src/zarban/service/openapi_client/models/lendingpool_liquidation_call_event.py deleted file mode 100644 index 0b0470f..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_liquidation_call_event.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolLiquidationCallEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'collateral_asset': 'str', - 'debt_asset': 'str', - 'user': 'str', - 'debt_to_cover': 'str', - 'liquidated_collateral_amount': 'str', - 'liquidator': 'str', - 'receive_z_token': 'bool', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'collateral_asset': 'collateralAsset', - 'debt_asset': 'debtAsset', - 'user': 'user', - 'debt_to_cover': 'debtToCover', - 'liquidated_collateral_amount': 'liquidatedCollateralAmount', - 'liquidator': 'liquidator', - 'receive_z_token': 'receiveZToken', - 'raw': 'raw' - } - - def __init__(self, id=None, collateral_asset=None, debt_asset=None, user=None, debt_to_cover=None, liquidated_collateral_amount=None, liquidator=None, receive_z_token=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolLiquidationCallEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._collateral_asset = None - self._debt_asset = None - self._user = None - self._debt_to_cover = None - self._liquidated_collateral_amount = None - self._liquidator = None - self._receive_z_token = None - self._raw = None - self.discriminator = None - - self.id = id - self.collateral_asset = collateral_asset - self.debt_asset = debt_asset - self.user = user - self.debt_to_cover = debt_to_cover - self.liquidated_collateral_amount = liquidated_collateral_amount - self.liquidator = liquidator - self.receive_z_token = receive_z_token - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Identifier for the liquidation call event. # noqa: E501 - - :return: The id of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolLiquidationCallEvent. - - Identifier for the liquidation call event. # noqa: E501 - - :param id: The id of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def collateral_asset(self): - """Gets the collateral_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Ethereum address of the collateral asset involved in the liquidation call. # noqa: E501 - - :return: The collateral_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._collateral_asset - - @collateral_asset.setter - def collateral_asset(self, collateral_asset): - """Sets the collateral_asset of this LendingpoolLiquidationCallEvent. - - Ethereum address of the collateral asset involved in the liquidation call. # noqa: E501 - - :param collateral_asset: The collateral_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateral_asset is None: # noqa: E501 - raise ValueError("Invalid value for `collateral_asset`, must not be `None`") # noqa: E501 - - self._collateral_asset = collateral_asset - - @property - def debt_asset(self): - """Gets the debt_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Ethereum address of the debt asset involved in the liquidation call. # noqa: E501 - - :return: The debt_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._debt_asset - - @debt_asset.setter - def debt_asset(self, debt_asset): - """Sets the debt_asset of this LendingpoolLiquidationCallEvent. - - Ethereum address of the debt asset involved in the liquidation call. # noqa: E501 - - :param debt_asset: The debt_asset of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and debt_asset is None: # noqa: E501 - raise ValueError("Invalid value for `debt_asset`, must not be `None`") # noqa: E501 - - self._debt_asset = debt_asset - - @property - def user(self): - """Gets the user of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Ethereum address of the user being liquidated. # noqa: E501 - - :return: The user of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this LendingpoolLiquidationCallEvent. - - Ethereum address of the user being liquidated. # noqa: E501 - - :param user: The user of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def debt_to_cover(self): - """Gets the debt_to_cover of this LendingpoolLiquidationCallEvent. # noqa: E501 - - The amount of debt to cover during the liquidation. # noqa: E501 - - :return: The debt_to_cover of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._debt_to_cover - - @debt_to_cover.setter - def debt_to_cover(self, debt_to_cover): - """Sets the debt_to_cover of this LendingpoolLiquidationCallEvent. - - The amount of debt to cover during the liquidation. # noqa: E501 - - :param debt_to_cover: The debt_to_cover of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and debt_to_cover is None: # noqa: E501 - raise ValueError("Invalid value for `debt_to_cover`, must not be `None`") # noqa: E501 - - self._debt_to_cover = debt_to_cover - - @property - def liquidated_collateral_amount(self): - """Gets the liquidated_collateral_amount of this LendingpoolLiquidationCallEvent. # noqa: E501 - - The amount of collateral that was liquidated. # noqa: E501 - - :return: The liquidated_collateral_amount of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._liquidated_collateral_amount - - @liquidated_collateral_amount.setter - def liquidated_collateral_amount(self, liquidated_collateral_amount): - """Sets the liquidated_collateral_amount of this LendingpoolLiquidationCallEvent. - - The amount of collateral that was liquidated. # noqa: E501 - - :param liquidated_collateral_amount: The liquidated_collateral_amount of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and liquidated_collateral_amount is None: # noqa: E501 - raise ValueError("Invalid value for `liquidated_collateral_amount`, must not be `None`") # noqa: E501 - - self._liquidated_collateral_amount = liquidated_collateral_amount - - @property - def liquidator(self): - """Gets the liquidator of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Ethereum address of the liquidator who initiated the liquidation. # noqa: E501 - - :return: The liquidator of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: str - """ - return self._liquidator - - @liquidator.setter - def liquidator(self, liquidator): - """Sets the liquidator of this LendingpoolLiquidationCallEvent. - - Ethereum address of the liquidator who initiated the liquidation. # noqa: E501 - - :param liquidator: The liquidator of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and liquidator is None: # noqa: E501 - raise ValueError("Invalid value for `liquidator`, must not be `None`") # noqa: E501 - - self._liquidator = liquidator - - @property - def receive_z_token(self): - """Gets the receive_z_token of this LendingpoolLiquidationCallEvent. # noqa: E501 - - Indicates if the liquidator chose to receive ZTokens. # noqa: E501 - - :return: The receive_z_token of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: bool - """ - return self._receive_z_token - - @receive_z_token.setter - def receive_z_token(self, receive_z_token): - """Sets the receive_z_token of this LendingpoolLiquidationCallEvent. - - Indicates if the liquidator chose to receive ZTokens. # noqa: E501 - - :param receive_z_token: The receive_z_token of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: bool - """ - if self.local_vars_configuration.client_side_validation and receive_z_token is None: # noqa: E501 - raise ValueError("Invalid value for `receive_z_token`, must not be `None`") # noqa: E501 - - self._receive_z_token = receive_z_token - - @property - def raw(self): - """Gets the raw of this LendingpoolLiquidationCallEvent. # noqa: E501 - - - :return: The raw of this LendingpoolLiquidationCallEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolLiquidationCallEvent. - - - :param raw: The raw of this LendingpoolLiquidationCallEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolLiquidationCallEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolLiquidationCallEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_repay_event.py b/src/zarban/service/openapi_client/models/lendingpool_repay_event.py deleted file mode 100644 index 3e9f39a..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_repay_event.py +++ /dev/null @@ -1,266 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolRepayEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'reserve': 'str', - 'user': 'str', - 'repayer': 'str', - 'amount': 'str', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'reserve': 'reserve', - 'user': 'user', - 'repayer': 'repayer', - 'amount': 'amount', - 'raw': 'raw' - } - - def __init__(self, id=None, reserve=None, user=None, repayer=None, amount=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolRepayEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._reserve = None - self._user = None - self._repayer = None - self._amount = None - self._raw = None - self.discriminator = None - - self.id = id - self.reserve = reserve - self.user = user - self.repayer = repayer - self.amount = amount - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolRepayEvent. # noqa: E501 - - Identifier for the repay event. # noqa: E501 - - :return: The id of this LendingpoolRepayEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolRepayEvent. - - Identifier for the repay event. # noqa: E501 - - :param id: The id of this LendingpoolRepayEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def reserve(self): - """Gets the reserve of this LendingpoolRepayEvent. # noqa: E501 - - Ethereum address of the reserve related to the repay. # noqa: E501 - - :return: The reserve of this LendingpoolRepayEvent. # noqa: E501 - :rtype: str - """ - return self._reserve - - @reserve.setter - def reserve(self, reserve): - """Sets the reserve of this LendingpoolRepayEvent. - - Ethereum address of the reserve related to the repay. # noqa: E501 - - :param reserve: The reserve of this LendingpoolRepayEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reserve is None: # noqa: E501 - raise ValueError("Invalid value for `reserve`, must not be `None`") # noqa: E501 - - self._reserve = reserve - - @property - def user(self): - """Gets the user of this LendingpoolRepayEvent. # noqa: E501 - - Ethereum address of the user who was repaid. # noqa: E501 - - :return: The user of this LendingpoolRepayEvent. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this LendingpoolRepayEvent. - - Ethereum address of the user who was repaid. # noqa: E501 - - :param user: The user of this LendingpoolRepayEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def repayer(self): - """Gets the repayer of this LendingpoolRepayEvent. # noqa: E501 - - Ethereum address of the entity that made the repay. # noqa: E501 - - :return: The repayer of this LendingpoolRepayEvent. # noqa: E501 - :rtype: str - """ - return self._repayer - - @repayer.setter - def repayer(self, repayer): - """Sets the repayer of this LendingpoolRepayEvent. - - Ethereum address of the entity that made the repay. # noqa: E501 - - :param repayer: The repayer of this LendingpoolRepayEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and repayer is None: # noqa: E501 - raise ValueError("Invalid value for `repayer`, must not be `None`") # noqa: E501 - - self._repayer = repayer - - @property - def amount(self): - """Gets the amount of this LendingpoolRepayEvent. # noqa: E501 - - The amount that was repaid. # noqa: E501 - - :return: The amount of this LendingpoolRepayEvent. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LendingpoolRepayEvent. - - The amount that was repaid. # noqa: E501 - - :param amount: The amount of this LendingpoolRepayEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def raw(self): - """Gets the raw of this LendingpoolRepayEvent. # noqa: E501 - - - :return: The raw of this LendingpoolRepayEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolRepayEvent. - - - :param raw: The raw of this LendingpoolRepayEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolRepayEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolRepayEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_repay_tx_request.py b/src/zarban/service/openapi_client/models/lendingpool_repay_tx_request.py index de5a12f..3c6e774 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_repay_tx_request.py +++ b/src/zarban/service/openapi_client/models/lendingpool_repay_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/inline_response200.py b/src/zarban/service/openapi_client/models/lendingpool_repay_tx_response.py similarity index 78% rename from src/zarban/service/openapi_client/models/inline_response200.py rename to src/zarban/service/openapi_client/models/lendingpool_repay_tx_response.py index d390a69..80ff9c9 100644 --- a/src/zarban/service/openapi_client/models/inline_response200.py +++ b/src/zarban/service/openapi_client/models/lendingpool_repay_tx_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.service.openapi_client.configuration import Configuration -class InlineResponse200(object): +class LendingpoolRepayTxResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,7 +44,7 @@ class InlineResponse200(object): } def __init__(self, chain_activity=None, response=None, local_vars_configuration=None): # noqa: E501 - """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 + """LendingpoolRepayTxResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -59,20 +60,20 @@ def __init__(self, chain_activity=None, response=None, local_vars_configuration= @property def chain_activity(self): - """Gets the chain_activity of this InlineResponse200. # noqa: E501 + """Gets the chain_activity of this LendingpoolRepayTxResponse. # noqa: E501 - :return: The chain_activity of this InlineResponse200. # noqa: E501 + :return: The chain_activity of this LendingpoolRepayTxResponse. # noqa: E501 :rtype: ChainActivity """ return self._chain_activity @chain_activity.setter def chain_activity(self, chain_activity): - """Sets the chain_activity of this InlineResponse200. + """Sets the chain_activity of this LendingpoolRepayTxResponse. - :param chain_activity: The chain_activity of this InlineResponse200. # noqa: E501 + :param chain_activity: The chain_activity of this LendingpoolRepayTxResponse. # noqa: E501 :type: ChainActivity """ @@ -80,20 +81,20 @@ def chain_activity(self, chain_activity): @property def response(self): - """Gets the response of this InlineResponse200. # noqa: E501 + """Gets the response of this LendingpoolRepayTxResponse. # noqa: E501 - :return: The response of this InlineResponse200. # noqa: E501 + :return: The response of this LendingpoolRepayTxResponse. # noqa: E501 :rtype: LendingpoolTxResponse """ return self._response @response.setter def response(self, response): - """Sets the response of this InlineResponse200. + """Sets the response of this LendingpoolRepayTxResponse. - :param response: The response of this InlineResponse200. # noqa: E501 + :param response: The response of this LendingpoolRepayTxResponse. # noqa: E501 :type: LendingpoolTxResponse """ @@ -133,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse200): + if not isinstance(other, LendingpoolRepayTxResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, InlineResponse200): + if not isinstance(other, LendingpoolRepayTxResponse): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_stats.py b/src/zarban/service/openapi_client/models/lendingpool_stats.py index 0cbea9b..27f7d81 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_stats.py +++ b/src/zarban/service/openapi_client/models/lendingpool_stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,9 +34,9 @@ class LendingpoolStats(object): and the value is json key in definition. """ openapi_types = { - 'total_available': 'dict(str, str)', - 'total_borrows': 'dict(str, str)', - 'total_market_size': 'dict(str, str)' + 'total_available': 'dict', + 'total_borrows': 'dict', + 'total_market_size': 'dict' } attribute_map = { @@ -65,7 +66,7 @@ def total_available(self): :return: The total_available of this LendingpoolStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict """ return self._total_available @@ -75,7 +76,7 @@ def total_available(self, total_available): :param total_available: The total_available of this LendingpoolStats. # noqa: E501 - :type: dict(str, str) + :type: dict """ if self.local_vars_configuration.client_side_validation and total_available is None: # noqa: E501 raise ValueError("Invalid value for `total_available`, must not be `None`") # noqa: E501 @@ -88,7 +89,7 @@ def total_borrows(self): :return: The total_borrows of this LendingpoolStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict """ return self._total_borrows @@ -98,7 +99,7 @@ def total_borrows(self, total_borrows): :param total_borrows: The total_borrows of this LendingpoolStats. # noqa: E501 - :type: dict(str, str) + :type: dict """ if self.local_vars_configuration.client_side_validation and total_borrows is None: # noqa: E501 raise ValueError("Invalid value for `total_borrows`, must not be `None`") # noqa: E501 @@ -111,7 +112,7 @@ def total_market_size(self): :return: The total_market_size of this LendingpoolStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict """ return self._total_market_size @@ -121,7 +122,7 @@ def total_market_size(self, total_market_size): :param total_market_size: The total_market_size of this LendingpoolStats. # noqa: E501 - :type: dict(str, str) + :type: dict """ if self.local_vars_configuration.client_side_validation and total_market_size is None: # noqa: E501 raise ValueError("Invalid value for `total_market_size`, must not be `None`") # noqa: E501 diff --git a/src/zarban/service/openapi_client/models/lendingpool_tx_response.py b/src/zarban/service/openapi_client/models/lendingpool_tx_response.py index 7375169..314ac54 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_tx_response.py +++ b/src/zarban/service/openapi_client/models/lendingpool_tx_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_request.py b/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_request.py index 9add189..4e20a2b 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_request.py +++ b/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_response.py b/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_response.py new file mode 100644 index 0000000..f3aaae7 --- /dev/null +++ b/src/zarban/service/openapi_client/models/lendingpool_use_asset_as_collateral_tx_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class LendingpoolUseAssetAsCollateralTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity', + 'response': 'LendingpoolTxResponse' + } + + attribute_map = { + 'chain_activity': 'chainActivity', + 'response': 'response' + } + + def __init__(self, chain_activity=None, response=None, local_vars_configuration=None): # noqa: E501 + """LendingpoolUseAssetAsCollateralTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self._response = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + if response is not None: + self.response = response + + @property + def chain_activity(self): + """Gets the chain_activity of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + + + :return: The chain_activity of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this LendingpoolUseAssetAsCollateralTxResponse. + + + :param chain_activity: The chain_activity of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + @property + def response(self): + """Gets the response of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + + + :return: The response of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + :rtype: LendingpoolTxResponse + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this LendingpoolUseAssetAsCollateralTxResponse. + + + :param response: The response of this LendingpoolUseAssetAsCollateralTxResponse. # noqa: E501 + :type: LendingpoolTxResponse + """ + + self._response = response + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LendingpoolUseAssetAsCollateralTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LendingpoolUseAssetAsCollateralTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_withdraw_event.py b/src/zarban/service/openapi_client/models/lendingpool_withdraw_event.py deleted file mode 100644 index 36d06a7..0000000 --- a/src/zarban/service/openapi_client/models/lendingpool_withdraw_event.py +++ /dev/null @@ -1,266 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class LendingpoolWithdrawEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'reserve': 'str', - 'user': 'str', - 'to': 'str', - 'amount': 'str', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'reserve': 'reserve', - 'user': 'user', - 'to': 'to', - 'amount': 'amount', - 'raw': 'raw' - } - - def __init__(self, id=None, reserve=None, user=None, to=None, amount=None, raw=None, local_vars_configuration=None): # noqa: E501 - """LendingpoolWithdrawEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._reserve = None - self._user = None - self._to = None - self._amount = None - self._raw = None - self.discriminator = None - - self.id = id - self.reserve = reserve - self.user = user - self.to = to - self.amount = amount - self.raw = raw - - @property - def id(self): - """Gets the id of this LendingpoolWithdrawEvent. # noqa: E501 - - Identifier for the withdraw event. # noqa: E501 - - :return: The id of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LendingpoolWithdrawEvent. - - Identifier for the withdraw event. # noqa: E501 - - :param id: The id of this LendingpoolWithdrawEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def reserve(self): - """Gets the reserve of this LendingpoolWithdrawEvent. # noqa: E501 - - Ethereum address of the reserve from which funds were withdrawn. # noqa: E501 - - :return: The reserve of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: str - """ - return self._reserve - - @reserve.setter - def reserve(self, reserve): - """Sets the reserve of this LendingpoolWithdrawEvent. - - Ethereum address of the reserve from which funds were withdrawn. # noqa: E501 - - :param reserve: The reserve of this LendingpoolWithdrawEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and reserve is None: # noqa: E501 - raise ValueError("Invalid value for `reserve`, must not be `None`") # noqa: E501 - - self._reserve = reserve - - @property - def user(self): - """Gets the user of this LendingpoolWithdrawEvent. # noqa: E501 - - Ethereum address of the user who initiated the withdrawal. # noqa: E501 - - :return: The user of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this LendingpoolWithdrawEvent. - - Ethereum address of the user who initiated the withdrawal. # noqa: E501 - - :param user: The user of this LendingpoolWithdrawEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def to(self): - """Gets the to of this LendingpoolWithdrawEvent. # noqa: E501 - - Ethereum address of the recipient. # noqa: E501 - - :return: The to of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: str - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this LendingpoolWithdrawEvent. - - Ethereum address of the recipient. # noqa: E501 - - :param to: The to of this LendingpoolWithdrawEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - - self._to = to - - @property - def amount(self): - """Gets the amount of this LendingpoolWithdrawEvent. # noqa: E501 - - The amount that was withdrawn. # noqa: E501 - - :return: The amount of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LendingpoolWithdrawEvent. - - The amount that was withdrawn. # noqa: E501 - - :param amount: The amount of this LendingpoolWithdrawEvent. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def raw(self): - """Gets the raw of this LendingpoolWithdrawEvent. # noqa: E501 - - - :return: The raw of this LendingpoolWithdrawEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this LendingpoolWithdrawEvent. - - - :param raw: The raw of this LendingpoolWithdrawEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LendingpoolWithdrawEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LendingpoolWithdrawEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_request.py b/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_request.py index 2aae8e1..daed73c 100644 --- a/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_request.py +++ b/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_response.py b/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_response.py new file mode 100644 index 0000000..d1fb99a --- /dev/null +++ b/src/zarban/service/openapi_client/models/lendingpool_withdraw_tx_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class LendingpoolWithdrawTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity', + 'response': 'LendingpoolTxResponse' + } + + attribute_map = { + 'chain_activity': 'chainActivity', + 'response': 'response' + } + + def __init__(self, chain_activity=None, response=None, local_vars_configuration=None): # noqa: E501 + """LendingpoolWithdrawTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self._response = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + if response is not None: + self.response = response + + @property + def chain_activity(self): + """Gets the chain_activity of this LendingpoolWithdrawTxResponse. # noqa: E501 + + + :return: The chain_activity of this LendingpoolWithdrawTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this LendingpoolWithdrawTxResponse. + + + :param chain_activity: The chain_activity of this LendingpoolWithdrawTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + @property + def response(self): + """Gets the response of this LendingpoolWithdrawTxResponse. # noqa: E501 + + + :return: The response of this LendingpoolWithdrawTxResponse. # noqa: E501 + :rtype: LendingpoolTxResponse + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this LendingpoolWithdrawTxResponse. + + + :param response: The response of this LendingpoolWithdrawTxResponse. # noqa: E501 + :type: LendingpoolTxResponse + """ + + self._response = response + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LendingpoolWithdrawTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LendingpoolWithdrawTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/log.py b/src/zarban/service/openapi_client/models/log.py index 33dd2e8..25a8c56 100644 --- a/src/zarban/service/openapi_client/models/log.py +++ b/src/zarban/service/openapi_client/models/log.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/median_event.py b/src/zarban/service/openapi_client/models/median_event.py deleted file mode 100644 index cec69df..0000000 --- a/src/zarban/service/openapi_client/models/median_event.py +++ /dev/null @@ -1,230 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class MedianEvent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'symbol': 'Symbol', - 'value': 'dict(str, str)', - 'timestamp': 'Timestamp', - 'raw': 'Log' - } - - attribute_map = { - 'id': 'id', - 'symbol': 'symbol', - 'value': 'value', - 'timestamp': 'timestamp', - 'raw': 'raw' - } - - def __init__(self, id=None, symbol=None, value=None, timestamp=None, raw=None, local_vars_configuration=None): # noqa: E501 - """MedianEvent - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._symbol = None - self._value = None - self._timestamp = None - self._raw = None - self.discriminator = None - - self.id = id - if symbol is not None: - self.symbol = symbol - self.value = value - self.timestamp = timestamp - self.raw = raw - - @property - def id(self): - """Gets the id of this MedianEvent. # noqa: E501 - - Identifier for the median. # noqa: E501 - - :return: The id of this MedianEvent. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this MedianEvent. - - Identifier for the median. # noqa: E501 - - :param id: The id of this MedianEvent. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def symbol(self): - """Gets the symbol of this MedianEvent. # noqa: E501 - - - :return: The symbol of this MedianEvent. # noqa: E501 - :rtype: Symbol - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this MedianEvent. - - - :param symbol: The symbol of this MedianEvent. # noqa: E501 - :type: Symbol - """ - - self._symbol = symbol - - @property - def value(self): - """Gets the value of this MedianEvent. # noqa: E501 - - - :return: The value of this MedianEvent. # noqa: E501 - :rtype: dict(str, str) - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this MedianEvent. - - - :param value: The value of this MedianEvent. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - - @property - def timestamp(self): - """Gets the timestamp of this MedianEvent. # noqa: E501 - - - :return: The timestamp of this MedianEvent. # noqa: E501 - :rtype: Timestamp - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this MedianEvent. - - - :param timestamp: The timestamp of this MedianEvent. # noqa: E501 - :type: Timestamp - """ - if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - - self._timestamp = timestamp - - @property - def raw(self): - """Gets the raw of this MedianEvent. # noqa: E501 - - - :return: The raw of this MedianEvent. # noqa: E501 - :rtype: Log - """ - return self._raw - - @raw.setter - def raw(self, raw): - """Sets the raw of this MedianEvent. - - - :param raw: The raw of this MedianEvent. # noqa: E501 - :type: Log - """ - if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 - raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 - - self._raw = raw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MedianEvent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MedianEvent): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/method_parameters.py b/src/zarban/service/openapi_client/models/method_parameters.py index a67a967..c19173f 100644 --- a/src/zarban/service/openapi_client/models/method_parameters.py +++ b/src/zarban/service/openapi_client/models/method_parameters.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/order.py b/src/zarban/service/openapi_client/models/order.py index db450df..5aa61b4 100644 --- a/src/zarban/service/openapi_client/models/order.py +++ b/src/zarban/service/openapi_client/models/order.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -82,8 +83,7 @@ def __init__(self, quote_id=None, outputs=None, encoded_order=None, signature=No self.order_status = order_status self.chain_id = chain_id self.order_hash = order_hash - if order_type is not None: - self.order_type = order_type + self.order_type = order_type @property def quote_id(self): @@ -303,6 +303,8 @@ def order_type(self, order_type): :param order_type: The order_type of this Order. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and order_type is None: # noqa: E501 + raise ValueError("Invalid value for `order_type`, must not be `None`") # noqa: E501 allowed_values = ["dutch", "limit"] # noqa: E501 if self.local_vars_configuration.client_side_validation and order_type not in allowed_values: # noqa: E501 raise ValueError( diff --git a/src/zarban/service/openapi_client/models/order_info.py b/src/zarban/service/openapi_client/models/order_info.py index b0adc50..9c6ffb5 100644 --- a/src/zarban/service/openapi_client/models/order_info.py +++ b/src/zarban/service/openapi_client/models/order_info.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/order_response.py b/src/zarban/service/openapi_client/models/order_response.py new file mode 100644 index 0000000..0385dc2 --- /dev/null +++ b/src/zarban/service/openapi_client/models/order_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class OrderResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Order]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """OrderResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this OrderResponse. # noqa: E501 + + + :return: The data of this OrderResponse. # noqa: E501 + :rtype: list[Order] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OrderResponse. + + + :param data: The data of this OrderResponse. # noqa: E501 + :type: list[Order] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/order_type.py b/src/zarban/service/openapi_client/models/order_type.py index 9972f2b..14da079 100644 --- a/src/zarban/service/openapi_client/models/order_type.py +++ b/src/zarban/service/openapi_client/models/order_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/permission.py b/src/zarban/service/openapi_client/models/permission.py deleted file mode 100644 index 3c67e57..0000000 --- a/src/zarban/service/openapi_client/models/permission.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class Permission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'timestamp': 'Timestamp', - 'where': 'Address', - 'who': 'Address', - 'action': 'str' - } - - attribute_map = { - 'id': 'id', - 'timestamp': 'timestamp', - 'where': 'where', - 'who': 'who', - 'action': 'action' - } - - def __init__(self, id=None, timestamp=None, where=None, who=None, action=None, local_vars_configuration=None): # noqa: E501 - """Permission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._timestamp = None - self._where = None - self._who = None - self._action = None - self.discriminator = None - - self.id = id - self.timestamp = timestamp - self.where = where - self.who = who - self.action = action - - @property - def id(self): - """Gets the id of this Permission. # noqa: E501 - - - :return: The id of this Permission. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Permission. - - - :param id: The id of this Permission. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def timestamp(self): - """Gets the timestamp of this Permission. # noqa: E501 - - - :return: The timestamp of this Permission. # noqa: E501 - :rtype: Timestamp - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this Permission. - - - :param timestamp: The timestamp of this Permission. # noqa: E501 - :type: Timestamp - """ - if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - - self._timestamp = timestamp - - @property - def where(self): - """Gets the where of this Permission. # noqa: E501 - - - :return: The where of this Permission. # noqa: E501 - :rtype: Address - """ - return self._where - - @where.setter - def where(self, where): - """Sets the where of this Permission. - - - :param where: The where of this Permission. # noqa: E501 - :type: Address - """ - if self.local_vars_configuration.client_side_validation and where is None: # noqa: E501 - raise ValueError("Invalid value for `where`, must not be `None`") # noqa: E501 - - self._where = where - - @property - def who(self): - """Gets the who of this Permission. # noqa: E501 - - - :return: The who of this Permission. # noqa: E501 - :rtype: Address - """ - return self._who - - @who.setter - def who(self, who): - """Sets the who of this Permission. - - - :param who: The who of this Permission. # noqa: E501 - :type: Address - """ - if self.local_vars_configuration.client_side_validation and who is None: # noqa: E501 - raise ValueError("Invalid value for `who`, must not be `None`") # noqa: E501 - - self._who = who - - @property - def action(self): - """Gets the action of this Permission. # noqa: E501 - - - :return: The action of this Permission. # noqa: E501 - :rtype: str - """ - return self._action - - @action.setter - def action(self, action): - """Sets the action of this Permission. - - - :param action: The action of this Permission. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501 - raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 - allowed_values = ["rely", "deny", "hope", "nope"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and action not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 - .format(action, allowed_values) - ) - - self._action = action - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Permission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Permission): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/permit_details.py b/src/zarban/service/openapi_client/models/permit_details.py deleted file mode 100644 index a253f9d..0000000 --- a/src/zarban/service/openapi_client/models/permit_details.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class PermitDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'token': 'str', - 'amount': 'str', - 'expiration': 'int', - 'nonce': 'str' - } - - attribute_map = { - 'token': 'token', - 'amount': 'amount', - 'expiration': 'expiration', - 'nonce': 'nonce' - } - - def __init__(self, token=None, amount=None, expiration=None, nonce=None, local_vars_configuration=None): # noqa: E501 - """PermitDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._token = None - self._amount = None - self._expiration = None - self._nonce = None - self.discriminator = None - - self.token = token - self.amount = amount - self.expiration = expiration - self.nonce = nonce - - @property - def token(self): - """Gets the token of this PermitDetails. # noqa: E501 - - - :return: The token of this PermitDetails. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this PermitDetails. - - - :param token: The token of this PermitDetails. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and token is None: # noqa: E501 - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - token is not None and not re.search(r'^(0x)?[0-9a-fA-F]{40}$', token)): # noqa: E501 - raise ValueError(r"Invalid value for `token`, must be a follow pattern or equal to `/^(0x)?[0-9a-fA-F]{40}$/`") # noqa: E501 - - self._token = token - - @property - def amount(self): - """Gets the amount of this PermitDetails. # noqa: E501 - - - :return: The amount of this PermitDetails. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this PermitDetails. - - - :param amount: The amount of this PermitDetails. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def expiration(self): - """Gets the expiration of this PermitDetails. # noqa: E501 - - - :return: The expiration of this PermitDetails. # noqa: E501 - :rtype: int - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this PermitDetails. - - - :param expiration: The expiration of this PermitDetails. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and expiration is None: # noqa: E501 - raise ValueError("Invalid value for `expiration`, must not be `None`") # noqa: E501 - - self._expiration = expiration - - @property - def nonce(self): - """Gets the nonce of this PermitDetails. # noqa: E501 - - - :return: The nonce of this PermitDetails. # noqa: E501 - :rtype: str - """ - return self._nonce - - @nonce.setter - def nonce(self, nonce): - """Sets the nonce of this PermitDetails. - - - :param nonce: The nonce of this PermitDetails. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and nonce is None: # noqa: E501 - raise ValueError("Invalid value for `nonce`, must not be `None`") # noqa: E501 - - self._nonce = nonce - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PermitDetails): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PermitDetails): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/permit_single.py b/src/zarban/service/openapi_client/models/permit_single.py index de07af9..5296b57 100644 --- a/src/zarban/service/openapi_client/models/permit_single.py +++ b/src/zarban/service/openapi_client/models/permit_single.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/personal_sign_request.py b/src/zarban/service/openapi_client/models/personal_sign_request.py index 77d014c..449b659 100644 --- a/src/zarban/service/openapi_client/models/personal_sign_request.py +++ b/src/zarban/service/openapi_client/models/personal_sign_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/prepared_tx.py b/src/zarban/service/openapi_client/models/prepared_tx.py index f8a9b50..5b7db7e 100644 --- a/src/zarban/service/openapi_client/models/prepared_tx.py +++ b/src/zarban/service/openapi_client/models/prepared_tx.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/price.py b/src/zarban/service/openapi_client/models/price.py index e9b4708..a76f54e 100644 --- a/src/zarban/service/openapi_client/models/price.py +++ b/src/zarban/service/openapi_client/models/price.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/price_list_response.py b/src/zarban/service/openapi_client/models/price_list_response.py new file mode 100644 index 0000000..f5bc3e9 --- /dev/null +++ b/src/zarban/service/openapi_client/models/price_list_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class PriceListResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Price]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """PriceListResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this PriceListResponse. # noqa: E501 + + + :return: The data of this PriceListResponse. # noqa: E501 + :rtype: list[Price] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PriceListResponse. + + + :param data: The data of this PriceListResponse. # noqa: E501 + :type: list[Price] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PriceListResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PriceListResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/proxy.py b/src/zarban/service/openapi_client/models/proxy.py deleted file mode 100644 index a672b3c..0000000 --- a/src/zarban/service/openapi_client/models/proxy.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.service.openapi_client.configuration import Configuration - - -class Proxy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'address': 'str', - 'owner': 'str', - 'authority': 'str' - } - - attribute_map = { - 'address': 'address', - 'owner': 'owner', - 'authority': 'authority' - } - - def __init__(self, address=None, owner=None, authority=None, local_vars_configuration=None): # noqa: E501 - """Proxy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._address = None - self._owner = None - self._authority = None - self.discriminator = None - - self.address = address - self.owner = owner - self.authority = authority - - @property - def address(self): - """Gets the address of this Proxy. # noqa: E501 - - The Ethereum address of the proxy. # noqa: E501 - - :return: The address of this Proxy. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Proxy. - - The Ethereum address of the proxy. # noqa: E501 - - :param address: The address of this Proxy. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 - - self._address = address - - @property - def owner(self): - """Gets the owner of this Proxy. # noqa: E501 - - The Ethereum address of the owner. # noqa: E501 - - :return: The owner of this Proxy. # noqa: E501 - :rtype: str - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this Proxy. - - The Ethereum address of the owner. # noqa: E501 - - :param owner: The owner of this Proxy. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and owner is None: # noqa: E501 - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def authority(self): - """Gets the authority of this Proxy. # noqa: E501 - - The Ethereum address of the authority. # noqa: E501 - - :return: The authority of this Proxy. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this Proxy. - - The Ethereum address of the authority. # noqa: E501 - - :param authority: The authority of this Proxy. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and authority is None: # noqa: E501 - raise ValueError("Invalid value for `authority`, must not be `None`") # noqa: E501 - - self._authority = authority - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Proxy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Proxy): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/quote_request.py b/src/zarban/service/openapi_client/models/quote_request.py index 4691926..f7623c0 100644 --- a/src/zarban/service/openapi_client/models/quote_request.py +++ b/src/zarban/service/openapi_client/models/quote_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/quote_request_options.py b/src/zarban/service/openapi_client/models/quote_request_options.py index d799e31..cc0e749 100644 --- a/src/zarban/service/openapi_client/models/quote_request_options.py +++ b/src/zarban/service/openapi_client/models/quote_request_options.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/quote_response.py b/src/zarban/service/openapi_client/models/quote_response.py index 41d1ee4..1cbfbde 100644 --- a/src/zarban/service/openapi_client/models/quote_response.py +++ b/src/zarban/service/openapi_client/models/quote_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -44,7 +45,7 @@ class QuoteResponse(object): 'gas_fee_estimate': 'dict(str, str)', 'route_string': 'str', 'method_parameters': 'MethodParameters', - 'route': 'list[V3PoolInRoute]', + 'route': 'list[RouteItem]', 'order_info': 'OrderInfo', 'encoded_order': 'str', 'order_hash': 'str', @@ -373,7 +374,7 @@ def route(self): :return: The route of this QuoteResponse. # noqa: E501 - :rtype: list[V3PoolInRoute] + :rtype: list[RouteItem] """ return self._route @@ -383,7 +384,7 @@ def route(self, route): :param route: The route of this QuoteResponse. # noqa: E501 - :type: list[V3PoolInRoute] + :type: list[RouteItem] """ if self.local_vars_configuration.client_side_validation and route is None: # noqa: E501 raise ValueError("Invalid value for `route`, must not be `None`") # noqa: E501 diff --git a/src/zarban/service/openapi_client/models/raw_dutch_amount.py b/src/zarban/service/openapi_client/models/raw_dutch_amount.py index 28c51a7..5590bfa 100644 --- a/src/zarban/service/openapi_client/models/raw_dutch_amount.py +++ b/src/zarban/service/openapi_client/models/raw_dutch_amount.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/chain_id.py b/src/zarban/service/openapi_client/models/route_item.py similarity index 89% rename from src/zarban/service/openapi_client/models/chain_id.py rename to src/zarban/service/openapi_client/models/route_item.py index acebeb8..8ee1b04 100644 --- a/src/zarban/service/openapi_client/models/chain_id.py +++ b/src/zarban/service/openapi_client/models/route_item.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,21 +19,13 @@ from zarban.service.openapi_client.configuration import Configuration -class ChainId(object): +class RouteItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - """ - allowed enum values - """ - _1 = "1" - _137 = "137" - - allowable_values = [_1, _137] # noqa: E501 - """ Attributes: openapi_types (dict): The key is attribute name @@ -47,7 +40,7 @@ class ChainId(object): } def __init__(self, local_vars_configuration=None): # noqa: E501 - """ChainId - a model defined in OpenAPI""" # noqa: E501 + """RouteItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -87,14 +80,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ChainId): + if not isinstance(other, RouteItem): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ChainId): + if not isinstance(other, RouteItem): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/scoreboard.py b/src/zarban/service/openapi_client/models/scoreboard.py index 17a1c16..f79a792 100644 --- a/src/zarban/service/openapi_client/models/scoreboard.py +++ b/src/zarban/service/openapi_client/models/scoreboard.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/scoreboard_item.py b/src/zarban/service/openapi_client/models/scoreboard_item.py index 47b07b2..c11cf7f 100644 --- a/src/zarban/service/openapi_client/models/scoreboard_item.py +++ b/src/zarban/service/openapi_client/models/scoreboard_item.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_bark_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_bark_tx_request.py index 53cd12c..4632104 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_bark_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_bark_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_create_vault_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_create_vault_tx_request.py index 35c9f7f..b56b519 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_create_vault_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_create_vault_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_deposit_collateral_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_deposit_collateral_tx_request.py index 65f5d94..19c8937 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_deposit_collateral_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_deposit_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_gemexit_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_gemexit_tx_request.py index b361fa5..0954086 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_gemexit_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_gemexit_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_mint_zar_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_mint_zar_tx_request.py index f3e4574..a02114e 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_mint_zar_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_mint_zar_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_redo_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_redo_tx_request.py index 707fe52..dfb50d2 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_redo_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_redo_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_repay_zar_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_repay_zar_tx_request.py index b0e3963..0138ae9 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_repay_zar_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_repay_zar_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_stats.py b/src/zarban/service/openapi_client/models/stablecoin_system_stats.py index fb2af06..e4bf6f5 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_stats.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,12 +34,12 @@ class StablecoinSystemStats(object): and the value is json key in definition. """ openapi_types = { - 'system_surplus': 'dict(str, str)', - 'system_debt': 'dict(str, str)', - 'system_debt_ceiling': 'dict(str, str)', - 'system_surplus_buffer': 'dict(str, str)', - 'system_bad_debt': 'dict(str, str)', - 'system_surplus_lot_size': 'dict(str, str)' + 'system_surplus': 'SystemSurplus', + 'system_debt': 'SystemDebt', + 'system_debt_ceiling': 'SystemDebtCeiling', + 'system_surplus_buffer': 'SystemSurplusBuffer', + 'system_bad_debt': 'SystemBadDebt', + 'system_surplus_lot_size': 'SystemSurplusLotSize' } attribute_map = { @@ -77,7 +78,7 @@ def system_surplus(self): :return: The system_surplus of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemSurplus """ return self._system_surplus @@ -87,7 +88,7 @@ def system_surplus(self, system_surplus): :param system_surplus: The system_surplus of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemSurplus """ if self.local_vars_configuration.client_side_validation and system_surplus is None: # noqa: E501 raise ValueError("Invalid value for `system_surplus`, must not be `None`") # noqa: E501 @@ -100,7 +101,7 @@ def system_debt(self): :return: The system_debt of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemDebt """ return self._system_debt @@ -110,7 +111,7 @@ def system_debt(self, system_debt): :param system_debt: The system_debt of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemDebt """ if self.local_vars_configuration.client_side_validation and system_debt is None: # noqa: E501 raise ValueError("Invalid value for `system_debt`, must not be `None`") # noqa: E501 @@ -123,7 +124,7 @@ def system_debt_ceiling(self): :return: The system_debt_ceiling of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemDebtCeiling """ return self._system_debt_ceiling @@ -133,7 +134,7 @@ def system_debt_ceiling(self, system_debt_ceiling): :param system_debt_ceiling: The system_debt_ceiling of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemDebtCeiling """ if self.local_vars_configuration.client_side_validation and system_debt_ceiling is None: # noqa: E501 raise ValueError("Invalid value for `system_debt_ceiling`, must not be `None`") # noqa: E501 @@ -146,7 +147,7 @@ def system_surplus_buffer(self): :return: The system_surplus_buffer of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemSurplusBuffer """ return self._system_surplus_buffer @@ -156,7 +157,7 @@ def system_surplus_buffer(self, system_surplus_buffer): :param system_surplus_buffer: The system_surplus_buffer of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemSurplusBuffer """ if self.local_vars_configuration.client_side_validation and system_surplus_buffer is None: # noqa: E501 raise ValueError("Invalid value for `system_surplus_buffer`, must not be `None`") # noqa: E501 @@ -169,7 +170,7 @@ def system_bad_debt(self): :return: The system_bad_debt of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemBadDebt """ return self._system_bad_debt @@ -179,7 +180,7 @@ def system_bad_debt(self, system_bad_debt): :param system_bad_debt: The system_bad_debt of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemBadDebt """ if self.local_vars_configuration.client_side_validation and system_bad_debt is None: # noqa: E501 raise ValueError("Invalid value for `system_bad_debt`, must not be `None`") # noqa: E501 @@ -192,7 +193,7 @@ def system_surplus_lot_size(self): :return: The system_surplus_lot_size of this StablecoinSystemStats. # noqa: E501 - :rtype: dict(str, str) + :rtype: SystemSurplusLotSize """ return self._system_surplus_lot_size @@ -202,7 +203,7 @@ def system_surplus_lot_size(self, system_surplus_lot_size): :param system_surplus_lot_size: The system_surplus_lot_size of this StablecoinSystemStats. # noqa: E501 - :type: dict(str, str) + :type: SystemSurplusLotSize """ if self.local_vars_configuration.client_side_validation and system_surplus_lot_size is None: # noqa: E501 raise ValueError("Invalid value for `system_surplus_lot_size`, must not be `None`") # noqa: E501 diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_take_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_take_tx_request.py index 9faee67..487c186 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_take_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_take_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_withdraw_collateral_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_withdraw_collateral_tx_request.py index 513ee74..2d84580 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_withdraw_collateral_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_withdraw_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_zarexit_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_zarexit_tx_request.py index 53f981f..47a5e15 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_zarexit_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_zarexit_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stablecoin_system_zarjoin_tx_request.py b/src/zarban/service/openapi_client/models/stablecoin_system_zarjoin_tx_request.py index 954a50b..23c93f2 100644 --- a/src/zarban/service/openapi_client/models/stablecoin_system_zarjoin_tx_request.py +++ b/src/zarban/service/openapi_client/models/stablecoin_system_zarjoin_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/stake_balance.py b/src/zarban/service/openapi_client/models/stake_balance.py new file mode 100644 index 0000000..562bf3d --- /dev/null +++ b/src/zarban/service/openapi_client/models/stake_balance.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakeBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """StakeBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakeBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakeBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/stake_plan.py b/src/zarban/service/openapi_client/models/stake_plan.py new file mode 100644 index 0000000..7aa3665 --- /dev/null +++ b/src/zarban/service/openapi_client/models/stake_plan.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakePlan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'plan_name': 'str', + 'contract_address': 'str', + 'apy': 'str', + 'stake_token': 'Token', + 'reward_token': 'Token', + 'finish_at': 'Timestamp' + } + + attribute_map = { + 'plan_name': 'planName', + 'contract_address': 'contractAddress', + 'apy': 'apy', + 'stake_token': 'stakeToken', + 'reward_token': 'rewardToken', + 'finish_at': 'finishAt' + } + + def __init__(self, plan_name=None, contract_address=None, apy=None, stake_token=None, reward_token=None, finish_at=None, local_vars_configuration=None): # noqa: E501 + """StakePlan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._plan_name = None + self._contract_address = None + self._apy = None + self._stake_token = None + self._reward_token = None + self._finish_at = None + self.discriminator = None + + self.plan_name = plan_name + self.contract_address = contract_address + self.apy = apy + self.stake_token = stake_token + self.reward_token = reward_token + self.finish_at = finish_at + + @property + def plan_name(self): + """Gets the plan_name of this StakePlan. # noqa: E501 + + Name of staking plan # noqa: E501 + + :return: The plan_name of this StakePlan. # noqa: E501 + :rtype: str + """ + return self._plan_name + + @plan_name.setter + def plan_name(self, plan_name): + """Sets the plan_name of this StakePlan. + + Name of staking plan # noqa: E501 + + :param plan_name: The plan_name of this StakePlan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_name is None: # noqa: E501 + raise ValueError("Invalid value for `plan_name`, must not be `None`") # noqa: E501 + + self._plan_name = plan_name + + @property + def contract_address(self): + """Gets the contract_address of this StakePlan. # noqa: E501 + + Ethereum address of the staking contract # noqa: E501 + + :return: The contract_address of this StakePlan. # noqa: E501 + :rtype: str + """ + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this StakePlan. + + Ethereum address of the staking contract # noqa: E501 + + :param contract_address: The contract_address of this StakePlan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract_address is None: # noqa: E501 + raise ValueError("Invalid value for `contract_address`, must not be `None`") # noqa: E501 + + self._contract_address = contract_address + + @property + def apy(self): + """Gets the apy of this StakePlan. # noqa: E501 + + Annual percentage yield of the staking plan # noqa: E501 + + :return: The apy of this StakePlan. # noqa: E501 + :rtype: str + """ + return self._apy + + @apy.setter + def apy(self, apy): + """Sets the apy of this StakePlan. + + Annual percentage yield of the staking plan # noqa: E501 + + :param apy: The apy of this StakePlan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and apy is None: # noqa: E501 + raise ValueError("Invalid value for `apy`, must not be `None`") # noqa: E501 + + self._apy = apy + + @property + def stake_token(self): + """Gets the stake_token of this StakePlan. # noqa: E501 + + + :return: The stake_token of this StakePlan. # noqa: E501 + :rtype: Token + """ + return self._stake_token + + @stake_token.setter + def stake_token(self, stake_token): + """Sets the stake_token of this StakePlan. + + + :param stake_token: The stake_token of this StakePlan. # noqa: E501 + :type: Token + """ + if self.local_vars_configuration.client_side_validation and stake_token is None: # noqa: E501 + raise ValueError("Invalid value for `stake_token`, must not be `None`") # noqa: E501 + + self._stake_token = stake_token + + @property + def reward_token(self): + """Gets the reward_token of this StakePlan. # noqa: E501 + + + :return: The reward_token of this StakePlan. # noqa: E501 + :rtype: Token + """ + return self._reward_token + + @reward_token.setter + def reward_token(self, reward_token): + """Sets the reward_token of this StakePlan. + + + :param reward_token: The reward_token of this StakePlan. # noqa: E501 + :type: Token + """ + if self.local_vars_configuration.client_side_validation and reward_token is None: # noqa: E501 + raise ValueError("Invalid value for `reward_token`, must not be `None`") # noqa: E501 + + self._reward_token = reward_token + + @property + def finish_at(self): + """Gets the finish_at of this StakePlan. # noqa: E501 + + + :return: The finish_at of this StakePlan. # noqa: E501 + :rtype: Timestamp + """ + return self._finish_at + + @finish_at.setter + def finish_at(self, finish_at): + """Sets the finish_at of this StakePlan. + + + :param finish_at: The finish_at of this StakePlan. # noqa: E501 + :type: Timestamp + """ + if self.local_vars_configuration.client_side_validation and finish_at is None: # noqa: E501 + raise ValueError("Invalid value for `finish_at`, must not be `None`") # noqa: E501 + + self._finish_at = finish_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakePlan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakePlan): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/stake_plans_response.py b/src/zarban/service/openapi_client/models/stake_plans_response.py new file mode 100644 index 0000000..10bd120 --- /dev/null +++ b/src/zarban/service/openapi_client/models/stake_plans_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakePlansResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[StakePlan]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """StakePlansResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this StakePlansResponse. # noqa: E501 + + + :return: The data of this StakePlansResponse. # noqa: E501 + :rtype: list[StakePlan] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this StakePlansResponse. + + + :param data: The data of this StakePlansResponse. # noqa: E501 + :type: list[StakePlan] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakePlansResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakePlansResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/swap_quote_request.py b/src/zarban/service/openapi_client/models/staking_collect_reward_tx_request.py similarity index 52% rename from src/zarban/wallet/openapi_client/models/swap_quote_request.py rename to src/zarban/service/openapi_client/models/staking_collect_reward_tx_request.py index bd70d5d..8fba00a 100644 --- a/src/zarban/wallet/openapi_client/models/swap_quote_request.py +++ b/src/zarban/service/openapi_client/models/staking_collect_reward_tx_request.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Zarban Wallet API + Zarban API - API for Zarban wallet services. # noqa: E501 + API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,10 +16,10 @@ import six -from zarban.wallet.openapi_client.configuration import Configuration +from zarban.service.openapi_client.configuration import Configuration -class SwapQuoteRequest(object): +class StakingCollectRewardTxRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,77 +34,77 @@ class SwapQuoteRequest(object): and the value is json key in definition. """ openapi_types = { - 'quote_id': 'str', - 'quote': 'str' + 'user': 'str', + 'contract_address': 'str' } attribute_map = { - 'quote_id': 'quoteId', - 'quote': 'quote' + 'user': 'user', + 'contract_address': 'contractAddress' } - def __init__(self, quote_id=None, quote=None, local_vars_configuration=None): # noqa: E501 - """SwapQuoteRequest - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, user=None, contract_address=None, local_vars_configuration=None): # noqa: E501 + """StakingCollectRewardTxRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._quote_id = None - self._quote = None + self._user = None + self._contract_address = None self.discriminator = None - self.quote_id = quote_id - self.quote = quote + self.user = user + self.contract_address = contract_address @property - def quote_id(self): - """Gets the quote_id of this SwapQuoteRequest. # noqa: E501 + def user(self): + """Gets the user of this StakingCollectRewardTxRequest. # noqa: E501 - Quote ID, required if intent is Swap # noqa: E501 + Ethereum address of the user # noqa: E501 - :return: The quote_id of this SwapQuoteRequest. # noqa: E501 + :return: The user of this StakingCollectRewardTxRequest. # noqa: E501 :rtype: str """ - return self._quote_id + return self._user - @quote_id.setter - def quote_id(self, quote_id): - """Sets the quote_id of this SwapQuoteRequest. + @user.setter + def user(self, user): + """Sets the user of this StakingCollectRewardTxRequest. - Quote ID, required if intent is Swap # noqa: E501 + Ethereum address of the user # noqa: E501 - :param quote_id: The quote_id of this SwapQuoteRequest. # noqa: E501 + :param user: The user of this StakingCollectRewardTxRequest. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and quote_id is None: # noqa: E501 - raise ValueError("Invalid value for `quote_id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 + raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - self._quote_id = quote_id + self._user = user @property - def quote(self): - """Gets the quote of this SwapQuoteRequest. # noqa: E501 + def contract_address(self): + """Gets the contract_address of this StakingCollectRewardTxRequest. # noqa: E501 - Quote # noqa: E501 + Ethereum address of the staking contract # noqa: E501 - :return: The quote of this SwapQuoteRequest. # noqa: E501 + :return: The contract_address of this StakingCollectRewardTxRequest. # noqa: E501 :rtype: str """ - return self._quote + return self._contract_address - @quote.setter - def quote(self, quote): - """Sets the quote of this SwapQuoteRequest. + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this StakingCollectRewardTxRequest. - Quote # noqa: E501 + Ethereum address of the staking contract # noqa: E501 - :param quote: The quote of this SwapQuoteRequest. # noqa: E501 + :param contract_address: The contract_address of this StakingCollectRewardTxRequest. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and quote is None: # noqa: E501 - raise ValueError("Invalid value for `quote`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and contract_address is None: # noqa: E501 + raise ValueError("Invalid value for `contract_address`, must not be `None`") # noqa: E501 - self._quote = quote + self._contract_address = contract_address def to_dict(self): """Returns the model properties as a dict""" @@ -139,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, SwapQuoteRequest): + if not isinstance(other, StakingCollectRewardTxRequest): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, SwapQuoteRequest): + if not isinstance(other, StakingCollectRewardTxRequest): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/staking_collect_reward_tx_response.py b/src/zarban/service/openapi_client/models/staking_collect_reward_tx_response.py new file mode 100644 index 0000000..e0ee34b --- /dev/null +++ b/src/zarban/service/openapi_client/models/staking_collect_reward_tx_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakingCollectRewardTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity' + } + + attribute_map = { + 'chain_activity': 'chainActivity' + } + + def __init__(self, chain_activity=None, local_vars_configuration=None): # noqa: E501 + """StakingCollectRewardTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + + @property + def chain_activity(self): + """Gets the chain_activity of this StakingCollectRewardTxResponse. # noqa: E501 + + + :return: The chain_activity of this StakingCollectRewardTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this StakingCollectRewardTxResponse. + + + :param chain_activity: The chain_activity of this StakingCollectRewardTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakingCollectRewardTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakingCollectRewardTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/staking_stake_tx_request.py b/src/zarban/service/openapi_client/models/staking_stake_tx_request.py new file mode 100644 index 0000000..8ca5721 --- /dev/null +++ b/src/zarban/service/openapi_client/models/staking_stake_tx_request.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakingStakeTxRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user': 'str', + 'contract_address': 'str', + 'amount': 'str' + } + + attribute_map = { + 'user': 'user', + 'contract_address': 'contractAddress', + 'amount': 'amount' + } + + def __init__(self, user=None, contract_address=None, amount=None, local_vars_configuration=None): # noqa: E501 + """StakingStakeTxRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user = None + self._contract_address = None + self._amount = None + self.discriminator = None + + self.user = user + self.contract_address = contract_address + if amount is not None: + self.amount = amount + + @property + def user(self): + """Gets the user of this StakingStakeTxRequest. # noqa: E501 + + Ethereum address of the user # noqa: E501 + + :return: The user of this StakingStakeTxRequest. # noqa: E501 + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this StakingStakeTxRequest. + + Ethereum address of the user # noqa: E501 + + :param user: The user of this StakingStakeTxRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 + raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 + + self._user = user + + @property + def contract_address(self): + """Gets the contract_address of this StakingStakeTxRequest. # noqa: E501 + + Ethereum address of the staking contract # noqa: E501 + + :return: The contract_address of this StakingStakeTxRequest. # noqa: E501 + :rtype: str + """ + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this StakingStakeTxRequest. + + Ethereum address of the staking contract # noqa: E501 + + :param contract_address: The contract_address of this StakingStakeTxRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract_address is None: # noqa: E501 + raise ValueError("Invalid value for `contract_address`, must not be `None`") # noqa: E501 + + self._contract_address = contract_address + + @property + def amount(self): + """Gets the amount of this StakingStakeTxRequest. # noqa: E501 + + The amount of asset to stake in native token units # noqa: E501 + + :return: The amount of this StakingStakeTxRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this StakingStakeTxRequest. + + The amount of asset to stake in native token units # noqa: E501 + + :param amount: The amount of this StakingStakeTxRequest. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakingStakeTxRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakingStakeTxRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/staking_stake_tx_response.py b/src/zarban/service/openapi_client/models/staking_stake_tx_response.py new file mode 100644 index 0000000..fd56f9b --- /dev/null +++ b/src/zarban/service/openapi_client/models/staking_stake_tx_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakingStakeTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity' + } + + attribute_map = { + 'chain_activity': 'chainActivity' + } + + def __init__(self, chain_activity=None, local_vars_configuration=None): # noqa: E501 + """StakingStakeTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + + @property + def chain_activity(self): + """Gets the chain_activity of this StakingStakeTxResponse. # noqa: E501 + + + :return: The chain_activity of this StakingStakeTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this StakingStakeTxResponse. + + + :param chain_activity: The chain_activity of this StakingStakeTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakingStakeTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakingStakeTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/staking_withdraw_tx_request.py b/src/zarban/service/openapi_client/models/staking_withdraw_tx_request.py new file mode 100644 index 0000000..af5ac34 --- /dev/null +++ b/src/zarban/service/openapi_client/models/staking_withdraw_tx_request.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakingWithdrawTxRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user': 'str', + 'contract_address': 'str', + 'amount': 'str' + } + + attribute_map = { + 'user': 'user', + 'contract_address': 'contractAddress', + 'amount': 'amount' + } + + def __init__(self, user=None, contract_address=None, amount=None, local_vars_configuration=None): # noqa: E501 + """StakingWithdrawTxRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user = None + self._contract_address = None + self._amount = None + self.discriminator = None + + self.user = user + self.contract_address = contract_address + if amount is not None: + self.amount = amount + + @property + def user(self): + """Gets the user of this StakingWithdrawTxRequest. # noqa: E501 + + Ethereum address of the user # noqa: E501 + + :return: The user of this StakingWithdrawTxRequest. # noqa: E501 + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this StakingWithdrawTxRequest. + + Ethereum address of the user # noqa: E501 + + :param user: The user of this StakingWithdrawTxRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 + raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 + + self._user = user + + @property + def contract_address(self): + """Gets the contract_address of this StakingWithdrawTxRequest. # noqa: E501 + + Ethereum address of the staking contract # noqa: E501 + + :return: The contract_address of this StakingWithdrawTxRequest. # noqa: E501 + :rtype: str + """ + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this StakingWithdrawTxRequest. + + Ethereum address of the staking contract # noqa: E501 + + :param contract_address: The contract_address of this StakingWithdrawTxRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract_address is None: # noqa: E501 + raise ValueError("Invalid value for `contract_address`, must not be `None`") # noqa: E501 + + self._contract_address = contract_address + + @property + def amount(self): + """Gets the amount of this StakingWithdrawTxRequest. # noqa: E501 + + The amount of asset to withdraw in native token units # noqa: E501 + + :return: The amount of this StakingWithdrawTxRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this StakingWithdrawTxRequest. + + The amount of asset to withdraw in native token units # noqa: E501 + + :param amount: The amount of this StakingWithdrawTxRequest. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakingWithdrawTxRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakingWithdrawTxRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/staking_withdraw_tx_response.py b/src/zarban/service/openapi_client/models/staking_withdraw_tx_response.py new file mode 100644 index 0000000..6e3af87 --- /dev/null +++ b/src/zarban/service/openapi_client/models/staking_withdraw_tx_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class StakingWithdrawTxResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain_activity': 'ChainActivity' + } + + attribute_map = { + 'chain_activity': 'chainActivity' + } + + def __init__(self, chain_activity=None, local_vars_configuration=None): # noqa: E501 + """StakingWithdrawTxResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain_activity = None + self.discriminator = None + + if chain_activity is not None: + self.chain_activity = chain_activity + + @property + def chain_activity(self): + """Gets the chain_activity of this StakingWithdrawTxResponse. # noqa: E501 + + + :return: The chain_activity of this StakingWithdrawTxResponse. # noqa: E501 + :rtype: ChainActivity + """ + return self._chain_activity + + @chain_activity.setter + def chain_activity(self, chain_activity): + """Sets the chain_activity of this StakingWithdrawTxResponse. + + + :param chain_activity: The chain_activity of this StakingWithdrawTxResponse. # noqa: E501 + :type: ChainActivity + """ + + self._chain_activity = chain_activity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StakingWithdrawTxResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StakingWithdrawTxResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/stats.py b/src/zarban/service/openapi_client/models/stats.py index 467d4bb..0d3d979 100644 --- a/src/zarban/service/openapi_client/models/stats.py +++ b/src/zarban/service/openapi_client/models/stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/symbol.py b/src/zarban/service/openapi_client/models/symbol.py index 5ed06e9..d3d4ce2 100644 --- a/src/zarban/service/openapi_client/models/symbol.py +++ b/src/zarban/service/openapi_client/models/symbol.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/system_bad_debt.py b/src/zarban/service/openapi_client/models/system_bad_debt.py new file mode 100644 index 0000000..38b3fc7 --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_bad_debt.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemBadDebt(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemBadDebt - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemBadDebt): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemBadDebt): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/system_debt.py b/src/zarban/service/openapi_client/models/system_debt.py new file mode 100644 index 0000000..0a2192b --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_debt.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemDebt(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemDebt - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemDebt): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemDebt): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/system_debt_ceiling.py b/src/zarban/service/openapi_client/models/system_debt_ceiling.py new file mode 100644 index 0000000..e7d169d --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_debt_ceiling.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemDebtCeiling(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemDebtCeiling - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemDebtCeiling): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemDebtCeiling): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/system_surplus.py b/src/zarban/service/openapi_client/models/system_surplus.py new file mode 100644 index 0000000..2565e88 --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_surplus.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemSurplus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemSurplus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemSurplus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemSurplus): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/system_surplus_buffer.py b/src/zarban/service/openapi_client/models/system_surplus_buffer.py new file mode 100644 index 0000000..5863849 --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_surplus_buffer.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemSurplusBuffer(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemSurplusBuffer - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemSurplusBuffer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemSurplusBuffer): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/system_surplus_lot_size.py b/src/zarban/service/openapi_client/models/system_surplus_lot_size.py new file mode 100644 index 0000000..ba14974 --- /dev/null +++ b/src/zarban/service/openapi_client/models/system_surplus_lot_size.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class SystemSurplusLotSize(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """SystemSurplusLotSize - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemSurplusLotSize): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemSurplusLotSize): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/time_range.py b/src/zarban/service/openapi_client/models/time_range.py index f4deb17..9bdbada 100644 --- a/src/zarban/service/openapi_client/models/time_range.py +++ b/src/zarban/service/openapi_client/models/time_range.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/timestamp.py b/src/zarban/service/openapi_client/models/timestamp.py index bdaf801..f42352f 100644 --- a/src/zarban/service/openapi_client/models/timestamp.py +++ b/src/zarban/service/openapi_client/models/timestamp.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/token.py b/src/zarban/service/openapi_client/models/token.py index 1306903..c155f7e 100644 --- a/src/zarban/service/openapi_client/models/token.py +++ b/src/zarban/service/openapi_client/models/token.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/trade_type.py b/src/zarban/service/openapi_client/models/trade_type.py index 73bd6df..035e32b 100644 --- a/src/zarban/service/openapi_client/models/trade_type.py +++ b/src/zarban/service/openapi_client/models/trade_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/type.py b/src/zarban/service/openapi_client/models/type.py index 5b2166c..4cfae38 100644 --- a/src/zarban/service/openapi_client/models/type.py +++ b/src/zarban/service/openapi_client/models/type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/typed_data.py b/src/zarban/service/openapi_client/models/typed_data.py index a1c850b..74f9106 100644 --- a/src/zarban/service/openapi_client/models/typed_data.py +++ b/src/zarban/service/openapi_client/models/typed_data.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/typed_data_domain.py b/src/zarban/service/openapi_client/models/typed_data_domain.py index 59962bb..bae17d9 100644 --- a/src/zarban/service/openapi_client/models/typed_data_domain.py +++ b/src/zarban/service/openapi_client/models/typed_data_domain.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/unclaimed_reward.py b/src/zarban/service/openapi_client/models/unclaimed_reward.py new file mode 100644 index 0000000..9661bbc --- /dev/null +++ b/src/zarban/service/openapi_client/models/unclaimed_reward.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class UnclaimedReward(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """UnclaimedReward - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnclaimedReward): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnclaimedReward): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/update_order_request.py b/src/zarban/service/openapi_client/models/update_order_request.py index 1a3d926..7134a6a 100644 --- a/src/zarban/service/openapi_client/models/update_order_request.py +++ b/src/zarban/service/openapi_client/models/update_order_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/user_borrows_response.py b/src/zarban/service/openapi_client/models/user_borrows_response.py new file mode 100644 index 0000000..f17d291 --- /dev/null +++ b/src/zarban/service/openapi_client/models/user_borrows_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class UserBorrowsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[LendingpoolBorrow]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """UserBorrowsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this UserBorrowsResponse. # noqa: E501 + + + :return: The data of this UserBorrowsResponse. # noqa: E501 + :rtype: list[LendingpoolBorrow] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this UserBorrowsResponse. + + + :param data: The data of this UserBorrowsResponse. # noqa: E501 + :type: list[LendingpoolBorrow] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserBorrowsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserBorrowsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/user_deposits_response.py b/src/zarban/service/openapi_client/models/user_deposits_response.py new file mode 100644 index 0000000..dbcc3bd --- /dev/null +++ b/src/zarban/service/openapi_client/models/user_deposits_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class UserDepositsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[LendingpoolDeposit]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """UserDepositsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this UserDepositsResponse. # noqa: E501 + + + :return: The data of this UserDepositsResponse. # noqa: E501 + :rtype: list[LendingpoolDeposit] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this UserDepositsResponse. + + + :param data: The data of this UserDepositsResponse. # noqa: E501 + :type: list[LendingpoolDeposit] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserDepositsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserDepositsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/better_error.py b/src/zarban/service/openapi_client/models/user_error.py similarity index 76% rename from src/zarban/service/openapi_client/models/better_error.py rename to src/zarban/service/openapi_client/models/user_error.py index 4c78bfa..32adad0 100644 --- a/src/zarban/service/openapi_client/models/better_error.py +++ b/src/zarban/service/openapi_client/models/user_error.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.service.openapi_client.configuration import Configuration -class BetterError(object): +class UserError(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +34,7 @@ class BetterError(object): and the value is json key in definition. """ openapi_types = { - 'messages': 'dict(str, BetterErrorMessages)', + 'messages': 'dict(str, ErrorMessage)', 'reasons': 'list[str]' } @@ -43,7 +44,7 @@ class BetterError(object): } def __init__(self, messages=None, reasons=None, local_vars_configuration=None): # noqa: E501 - """BetterError - a model defined in OpenAPI""" # noqa: E501 + """UserError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -53,28 +54,27 @@ def __init__(self, messages=None, reasons=None, local_vars_configuration=None): self.discriminator = None self.messages = messages - if reasons is not None: - self.reasons = reasons + self.reasons = reasons @property def messages(self): - """Gets the messages of this BetterError. # noqa: E501 + """Gets the messages of this UserError. # noqa: E501 Localized error messages # noqa: E501 - :return: The messages of this BetterError. # noqa: E501 - :rtype: dict(str, BetterErrorMessages) + :return: The messages of this UserError. # noqa: E501 + :rtype: dict(str, ErrorMessage) """ return self._messages @messages.setter def messages(self, messages): - """Sets the messages of this BetterError. + """Sets the messages of this UserError. Localized error messages # noqa: E501 - :param messages: The messages of this BetterError. # noqa: E501 - :type: dict(str, BetterErrorMessages) + :param messages: The messages of this UserError. # noqa: E501 + :type: dict(str, ErrorMessage) """ if self.local_vars_configuration.client_side_validation and messages is None: # noqa: E501 raise ValueError("Invalid value for `messages`, must not be `None`") # noqa: E501 @@ -83,22 +83,24 @@ def messages(self, messages): @property def reasons(self): - """Gets the reasons of this BetterError. # noqa: E501 + """Gets the reasons of this UserError. # noqa: E501 - :return: The reasons of this BetterError. # noqa: E501 + :return: The reasons of this UserError. # noqa: E501 :rtype: list[str] """ return self._reasons @reasons.setter def reasons(self, reasons): - """Sets the reasons of this BetterError. + """Sets the reasons of this UserError. - :param reasons: The reasons of this BetterError. # noqa: E501 + :param reasons: The reasons of this UserError. # noqa: E501 :type: list[str] """ + if self.local_vars_configuration.client_side_validation and reasons is None: # noqa: E501 + raise ValueError("Invalid value for `reasons`, must not be `None`") # noqa: E501 self._reasons = reasons @@ -136,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, BetterError): + if not isinstance(other, UserError): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, BetterError): + if not isinstance(other, UserError): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/user_stake.py b/src/zarban/service/openapi_client/models/user_stake.py new file mode 100644 index 0000000..57e35a9 --- /dev/null +++ b/src/zarban/service/openapi_client/models/user_stake.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class UserStake(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user': 'str', + 'balance': 'StakeBalance', + 'unclaimed_reward': 'UnclaimedReward', + 'contract_address': 'str', + 'plan_name': 'str' + } + + attribute_map = { + 'user': 'user', + 'balance': 'balance', + 'unclaimed_reward': 'unclaimedReward', + 'contract_address': 'contractAddress', + 'plan_name': 'planName' + } + + def __init__(self, user=None, balance=None, unclaimed_reward=None, contract_address=None, plan_name=None, local_vars_configuration=None): # noqa: E501 + """UserStake - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user = None + self._balance = None + self._unclaimed_reward = None + self._contract_address = None + self._plan_name = None + self.discriminator = None + + self.user = user + self.balance = balance + self.unclaimed_reward = unclaimed_reward + self.contract_address = contract_address + self.plan_name = plan_name + + @property + def user(self): + """Gets the user of this UserStake. # noqa: E501 + + Ethereum address of the user # noqa: E501 + + :return: The user of this UserStake. # noqa: E501 + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this UserStake. + + Ethereum address of the user # noqa: E501 + + :param user: The user of this UserStake. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 + raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 + + self._user = user + + @property + def balance(self): + """Gets the balance of this UserStake. # noqa: E501 + + + :return: The balance of this UserStake. # noqa: E501 + :rtype: StakeBalance + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this UserStake. + + + :param balance: The balance of this UserStake. # noqa: E501 + :type: StakeBalance + """ + if self.local_vars_configuration.client_side_validation and balance is None: # noqa: E501 + raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 + + self._balance = balance + + @property + def unclaimed_reward(self): + """Gets the unclaimed_reward of this UserStake. # noqa: E501 + + + :return: The unclaimed_reward of this UserStake. # noqa: E501 + :rtype: UnclaimedReward + """ + return self._unclaimed_reward + + @unclaimed_reward.setter + def unclaimed_reward(self, unclaimed_reward): + """Sets the unclaimed_reward of this UserStake. + + + :param unclaimed_reward: The unclaimed_reward of this UserStake. # noqa: E501 + :type: UnclaimedReward + """ + if self.local_vars_configuration.client_side_validation and unclaimed_reward is None: # noqa: E501 + raise ValueError("Invalid value for `unclaimed_reward`, must not be `None`") # noqa: E501 + + self._unclaimed_reward = unclaimed_reward + + @property + def contract_address(self): + """Gets the contract_address of this UserStake. # noqa: E501 + + Ethereum address of the staking contract # noqa: E501 + + :return: The contract_address of this UserStake. # noqa: E501 + :rtype: str + """ + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this UserStake. + + Ethereum address of the staking contract # noqa: E501 + + :param contract_address: The contract_address of this UserStake. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract_address is None: # noqa: E501 + raise ValueError("Invalid value for `contract_address`, must not be `None`") # noqa: E501 + + self._contract_address = contract_address + + @property + def plan_name(self): + """Gets the plan_name of this UserStake. # noqa: E501 + + Name of staking plan # noqa: E501 + + :return: The plan_name of this UserStake. # noqa: E501 + :rtype: str + """ + return self._plan_name + + @plan_name.setter + def plan_name(self, plan_name): + """Sets the plan_name of this UserStake. + + Name of staking plan # noqa: E501 + + :param plan_name: The plan_name of this UserStake. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_name is None: # noqa: E501 + raise ValueError("Invalid value for `plan_name`, must not be `None`") # noqa: E501 + + self._plan_name = plan_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserStake): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserStake): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/user_stakes_response.py b/src/zarban/service/openapi_client/models/user_stakes_response.py new file mode 100644 index 0000000..3256ad9 --- /dev/null +++ b/src/zarban/service/openapi_client/models/user_stakes_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class UserStakesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[UserStake]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """UserStakesResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this UserStakesResponse. # noqa: E501 + + + :return: The data of this UserStakesResponse. # noqa: E501 + :rtype: list[UserStake] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this UserStakesResponse. + + + :param data: The data of this UserStakesResponse. # noqa: E501 + :type: list[UserStake] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserStakesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserStakesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/v3_pool_in_route.py b/src/zarban/service/openapi_client/models/v3_pool_in_route.py index e6645b6..b7fdf67 100644 --- a/src/zarban/service/openapi_client/models/v3_pool_in_route.py +++ b/src/zarban/service/openapi_client/models/v3_pool_in_route.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/vault.py b/src/zarban/service/openapi_client/models/vault.py index 1a238ad..d22fb7b 100644 --- a/src/zarban/service/openapi_client/models/vault.py +++ b/src/zarban/service/openapi_client/models/vault.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/vault_event.py b/src/zarban/service/openapi_client/models/vault_event.py index 01472bb..7645f51 100644 --- a/src/zarban/service/openapi_client/models/vault_event.py +++ b/src/zarban/service/openapi_client/models/vault_event.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/models/vault_event_extension.py b/src/zarban/service/openapi_client/models/vault_event_extension.py new file mode 100644 index 0000000..c86e84e --- /dev/null +++ b/src/zarban/service/openapi_client/models/vault_event_extension.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class VaultEventExtension(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'payload': 'VaultEvent' + } + + attribute_map = { + 'payload': 'payload' + } + + def __init__(self, payload=None, local_vars_configuration=None): # noqa: E501 + """VaultEventExtension - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._payload = None + self.discriminator = None + + if payload is not None: + self.payload = payload + + @property + def payload(self): + """Gets the payload of this VaultEventExtension. # noqa: E501 + + + :return: The payload of this VaultEventExtension. # noqa: E501 + :rtype: VaultEvent + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this VaultEventExtension. + + + :param payload: The payload of this VaultEventExtension. # noqa: E501 + :type: VaultEvent + """ + + self._payload = payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VaultEventExtension): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VaultEventExtension): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/vault_event_item.py b/src/zarban/service/openapi_client/models/vault_event_item.py new file mode 100644 index 0000000..204a170 --- /dev/null +++ b/src/zarban/service/openapi_client/models/vault_event_item.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class VaultEventItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'name': 'EventName', + 'type': 'EventType', + 'domain': 'EventDomain', + 'raw': 'Log', + 'payload': 'VaultEvent' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'type': 'type', + 'domain': 'domain', + 'raw': 'raw', + 'payload': 'payload' + } + + def __init__(self, id=None, name=None, type=None, domain=None, raw=None, payload=None, local_vars_configuration=None): # noqa: E501 + """VaultEventItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._type = None + self._domain = None + self._raw = None + self._payload = None + self.discriminator = None + + self.id = id + self.name = name + self.type = type + self.domain = domain + self.raw = raw + if payload is not None: + self.payload = payload + + @property + def id(self): + """Gets the id of this VaultEventItem. # noqa: E501 + + Identifier for the event. # noqa: E501 + + :return: The id of this VaultEventItem. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this VaultEventItem. + + Identifier for the event. # noqa: E501 + + :param id: The id of this VaultEventItem. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this VaultEventItem. # noqa: E501 + + + :return: The name of this VaultEventItem. # noqa: E501 + :rtype: EventName + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this VaultEventItem. + + + :param name: The name of this VaultEventItem. # noqa: E501 + :type: EventName + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this VaultEventItem. # noqa: E501 + + + :return: The type of this VaultEventItem. # noqa: E501 + :rtype: EventType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this VaultEventItem. + + + :param type: The type of this VaultEventItem. # noqa: E501 + :type: EventType + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def domain(self): + """Gets the domain of this VaultEventItem. # noqa: E501 + + + :return: The domain of this VaultEventItem. # noqa: E501 + :rtype: EventDomain + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this VaultEventItem. + + + :param domain: The domain of this VaultEventItem. # noqa: E501 + :type: EventDomain + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def raw(self): + """Gets the raw of this VaultEventItem. # noqa: E501 + + + :return: The raw of this VaultEventItem. # noqa: E501 + :rtype: Log + """ + return self._raw + + @raw.setter + def raw(self, raw): + """Sets the raw of this VaultEventItem. + + + :param raw: The raw of this VaultEventItem. # noqa: E501 + :type: Log + """ + if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 + raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 + + self._raw = raw + + @property + def payload(self): + """Gets the payload of this VaultEventItem. # noqa: E501 + + + :return: The payload of this VaultEventItem. # noqa: E501 + :rtype: VaultEvent + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this VaultEventItem. + + + :param payload: The payload of this VaultEventItem. # noqa: E501 + :type: VaultEvent + """ + + self._payload = payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VaultEventItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VaultEventItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/vault_events_response.py b/src/zarban/service/openapi_client/models/vault_events_response.py new file mode 100644 index 0000000..569882c --- /dev/null +++ b/src/zarban/service/openapi_client/models/vault_events_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class VaultEventsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[ExtendedEvent]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """VaultEventsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this VaultEventsResponse. # noqa: E501 + + + :return: The data of this VaultEventsResponse. # noqa: E501 + :rtype: list[ExtendedEvent] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this VaultEventsResponse. + + + :param data: The data of this VaultEventsResponse. # noqa: E501 + :type: list[ExtendedEvent] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VaultEventsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VaultEventsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/vaults_response.py b/src/zarban/service/openapi_client/models/vaults_response.py new file mode 100644 index 0000000..c4527c6 --- /dev/null +++ b/src/zarban/service/openapi_client/models/vaults_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.service.openapi_client.configuration import Configuration + + +class VaultsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Vault]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """VaultsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this VaultsResponse. # noqa: E501 + + + :return: The data of this VaultsResponse. # noqa: E501 + :rtype: list[Vault] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this VaultsResponse. + + + :param data: The data of this VaultsResponse. # noqa: E501 + :type: list[Vault] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VaultsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VaultsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/service/openapi_client/models/wallet_balance.py b/src/zarban/service/openapi_client/models/wallet_balance.py index 5d3234f..e5dee88 100644 --- a/src/zarban/service/openapi_client/models/wallet_balance.py +++ b/src/zarban/service/openapi_client/models/wallet_balance.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/openapi_client/rest.py b/src/zarban/service/openapi_client/rest.py index c66b1e2..7a626e6 100644 --- a/src/zarban/service/openapi_client/rest.py +++ b/src/zarban/service/openapi_client/rest.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/service/test/test_account.py b/src/zarban/service/test/test_account.py index fce9aa2..67052d4 100644 --- a/src/zarban/service/test/test_account.py +++ b/src/zarban/service/test/test_account.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.account import Account # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.account import Account # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAccount(unittest.TestCase): """Account unit test stubs""" @@ -33,15 +34,15 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.account.Account() # noqa: E501 + # model = zarban.service.openapi_client.models.account.Account() # noqa: E501 if include_optional : return Account( points = 100, address = '0x1234567890123456789012345678901234567890', - wallet_balance = openapi_client.models.wallet_balance.WalletBalance( + wallet_balance = zarban.service.openapi_client.models.wallet_balance.WalletBalance( balances = [ - openapi_client.models.balance.Balance( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.balance.Balance( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -54,7 +55,7 @@ def make_instance(self, include_optional): net_worth = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - lendingpool_summary = openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary( + lendingpool_summary = zarban.service.openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, @@ -66,19 +67,23 @@ def make_instance(self, include_optional): borrow_power_used = '0.30', current_liquidation_threshold = '0.30', loan_to_value = '0.30', ), - stabelcoin_system_summary = openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary( + stabelcoin_system_summary = zarban.service.openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + net_apy = '0.30', ), + staking_summary = zarban.service.openapi_client.models.account_staking_summary.AccountStakingSummary( + total_stake = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + unclaimed_reward = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, net_apy = '0.30', ) ) else : return Account( points = 100, address = '0x1234567890123456789012345678901234567890', - wallet_balance = openapi_client.models.wallet_balance.WalletBalance( + wallet_balance = zarban.service.openapi_client.models.wallet_balance.WalletBalance( balances = [ - openapi_client.models.balance.Balance( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.balance.Balance( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -91,7 +96,7 @@ def make_instance(self, include_optional): net_worth = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - lendingpool_summary = openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary( + lendingpool_summary = zarban.service.openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, @@ -103,10 +108,14 @@ def make_instance(self, include_optional): borrow_power_used = '0.30', current_liquidation_threshold = '0.30', loan_to_value = '0.30', ), - stabelcoin_system_summary = openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary( + stabelcoin_system_summary = zarban.service.openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, total_deposits = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, net_apy = '0.30', ), + staking_summary = zarban.service.openapi_client.models.account_staking_summary.AccountStakingSummary( + total_stake = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + unclaimed_reward = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + net_apy = '0.30', ), ) def testAccount(self): diff --git a/src/zarban/service/test/test_account_lendingpool_summary.py b/src/zarban/service/test/test_account_lendingpool_summary.py index b4bcfda..31dc7dc 100644 --- a/src/zarban/service/test/test_account_lendingpool_summary.py +++ b/src/zarban/service/test/test_account_lendingpool_summary.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.account_lendingpool_summary import AccountLendingpoolSummary # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.account_lendingpool_summary import AccountLendingpoolSummary # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAccountLendingpoolSummary(unittest.TestCase): """AccountLendingpoolSummary unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary() # noqa: E501 + # model = zarban.service.openapi_client.models.account_lendingpool_summary.AccountLendingpoolSummary() # noqa: E501 if include_optional : return AccountLendingpoolSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, diff --git a/src/zarban/service/test/test_account_stablecoin_system_summary.py b/src/zarban/service/test/test_account_stablecoin_system_summary.py index 49259d6..3ed0ddb 100644 --- a/src/zarban/service/test/test_account_stablecoin_system_summary.py +++ b/src/zarban/service/test/test_account_stablecoin_system_summary.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.account_stablecoin_system_summary import AccountStablecoinSystemSummary # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.account_stablecoin_system_summary import AccountStablecoinSystemSummary # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAccountStablecoinSystemSummary(unittest.TestCase): """AccountStablecoinSystemSummary unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary() # noqa: E501 + # model = zarban.service.openapi_client.models.account_stablecoin_system_summary.AccountStablecoinSystemSummary() # noqa: E501 if include_optional : return AccountStablecoinSystemSummary( total_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, diff --git a/src/zarban/service/test/test_account_staking_summary.py b/src/zarban/service/test/test_account_staking_summary.py new file mode 100644 index 0000000..75c2a7b --- /dev/null +++ b/src/zarban/service/test/test_account_staking_summary.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.account_staking_summary import AccountStakingSummary # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestAccountStakingSummary(unittest.TestCase): + """AccountStakingSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AccountStakingSummary + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.account_staking_summary.AccountStakingSummary() # noqa: E501 + if include_optional : + return AccountStakingSummary( + total_stake = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + unclaimed_reward = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + net_apy = '0.30' + ) + else : + return AccountStakingSummary( + total_stake = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + unclaimed_reward = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + net_apy = '0.30', + ) + + def testAccountStakingSummary(self): + """Test AccountStakingSummary""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_accounts_api.py b/src/zarban/service/test/test_accounts_api.py index 97a1b3b..bff27df 100644 --- a/src/zarban/service/test/test_accounts_api.py +++ b/src/zarban/service/test/test_accounts_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.accounts_api import AccountsApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.accounts_api import AccountsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAccountsApi(unittest.TestCase): """AccountsApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.accounts_api.AccountsApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.accounts_api.AccountsApi() # noqa: E501 def tearDown(self): pass - def test_accounts_address_get(self): - """Test case for accounts_address_get + def test_get_account_by_address(self): + """Test case for get_account_by_address Get account by address # noqa: E501 """ diff --git a/src/zarban/service/test/test_address.py b/src/zarban/service/test/test_address.py index ddb5bb8..e216312 100644 --- a/src/zarban/service/test/test_address.py +++ b/src/zarban/service/test/test_address.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.address import Address # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.address import Address # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAddress(unittest.TestCase): """Address unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.address.Address() # noqa: E501 + # model = zarban.service.openapi_client.models.address.Address() # noqa: E501 if include_optional : return Address( label = 'vat', diff --git a/src/zarban/service/test/test_address_response.py b/src/zarban/service/test/test_address_response.py new file mode 100644 index 0000000..4271a70 --- /dev/null +++ b/src/zarban/service/test/test_address_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.address_response import AddressResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestAddressResponse(unittest.TestCase): + """AddressResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AddressResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.address_response.AddressResponse() # noqa: E501 + if include_optional : + return AddressResponse( + data = [ + zarban.service.openapi_client.models.address.Address( + label = 'vat', + address = '0x1234567890123456789012345678901234567890', ) + ] + ) + else : + return AddressResponse( + data = [ + zarban.service.openapi_client.models.address.Address( + label = 'vat', + address = '0x1234567890123456789012345678901234567890', ) + ], + ) + + def testAddressResponse(self): + """Test AddressResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_addresses_api.py b/src/zarban/service/test/test_addresses_api.py index b8a773f..29ae971 100644 --- a/src/zarban/service/test/test_addresses_api.py +++ b/src/zarban/service/test/test_addresses_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.addresses_api import AddressesApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.addresses_api import AddressesApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestAddressesApi(unittest.TestCase): """AddressesApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.addresses_api.AddressesApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.addresses_api.AddressesApi() # noqa: E501 def tearDown(self): pass - def test_addresses_get(self): - """Test case for addresses_get + def test_get_all_addresses(self): + """Test case for get_all_addresses Get all addresses # noqa: E501 """ diff --git a/src/zarban/service/test/test_answer_updated_response.py b/src/zarban/service/test/test_answer_updated_response.py deleted file mode 100644 index feeee40..0000000 --- a/src/zarban/service/test/test_answer_updated_response.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.answer_updated_response import AnswerUpdatedResponse # noqa: E501 -from openapi_client.rest import ApiException - -class TestAnswerUpdatedResponse(unittest.TestCase): - """AnswerUpdatedResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test AnswerUpdatedResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.answer_updated_response.AnswerUpdatedResponse() # noqa: E501 - if include_optional : - return AnswerUpdatedResponse( - current = '0', - round_id = '0', - updated_at = '0', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return AnswerUpdatedResponse( - current = '0', - round_id = '0', - updated_at = '0', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testAnswerUpdatedResponse(self): - """Test AnswerUpdatedResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_auth_matrix.py b/src/zarban/service/test/test_auth_matrix.py deleted file mode 100644 index c97645f..0000000 --- a/src/zarban/service/test/test_auth_matrix.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.auth_matrix import AuthMatrix # noqa: E501 -from openapi_client.rest import ApiException - -class TestAuthMatrix(unittest.TestCase): - """AuthMatrix unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test AuthMatrix - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.auth_matrix.AuthMatrix() # noqa: E501 - if include_optional : - return AuthMatrix( - wheres = [ - openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ) - ], - whos = [ - openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ) - ], - values = [[0,1,0],[1,0,1],[0,1,0]] - ) - else : - return AuthMatrix( - wheres = [ - openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ) - ], - whos = [ - openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ) - ], - values = [[0,1,0],[1,0,1],[0,1,0]], - ) - - def testAuthMatrix(self): - """Test AuthMatrix""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_balance.py b/src/zarban/service/test/test_balance.py index a075d31..13fd185 100644 --- a/src/zarban/service/test/test_balance.py +++ b/src/zarban/service/test/test_balance.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.balance import Balance # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.balance import Balance # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestBalance(unittest.TestCase): """Balance unit test stubs""" @@ -33,10 +34,10 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.balance.Balance() # noqa: E501 + # model = zarban.service.openapi_client.models.balance.Balance() # noqa: E501 if include_optional : return Balance( - token = openapi_client.models.token.Token( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -48,7 +49,7 @@ def make_instance(self, include_optional): ) else : return Balance( - token = openapi_client.models.token.Token( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_basic_event.py b/src/zarban/service/test/test_basic_event.py index 204785d..1548df9 100644 --- a/src/zarban/service/test/test_basic_event.py +++ b/src/zarban/service/test/test_basic_event.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.basic_event import BasicEvent # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.basic_event import BasicEvent # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestBasicEvent(unittest.TestCase): """BasicEvent unit test stubs""" @@ -33,27 +34,31 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.basic_event.BasicEvent() # noqa: E501 + # model = zarban.service.openapi_client.models.basic_event.BasicEvent() # noqa: E501 if include_optional : return BasicEvent( id = 1, name = 'VaultRepay', type = 'executive', domain = 'stableCoinSystem', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, topics = [ '0x1234567890abcdef1234567abcdef' ], - data = '0x1234567890abcdef1234567abcdef', ) + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ) ) else : return BasicEvent( @@ -61,20 +66,24 @@ def make_instance(self, include_optional): name = 'VaultRepay', type = 'executive', domain = 'stableCoinSystem', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, topics = [ '0x1234567890abcdef1234567abcdef' ], - data = '0x1234567890abcdef1234567abcdef', ), + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), ) def testBasicEvent(self): diff --git a/src/zarban/service/test/test_borrows_api.py b/src/zarban/service/test/test_borrows_api.py index 36bbe11..4d5780d 100644 --- a/src/zarban/service/test/test_borrows_api.py +++ b/src/zarban/service/test/test_borrows_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.borrows_api import BorrowsApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.borrows_api import BorrowsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestBorrowsApi(unittest.TestCase): """BorrowsApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.borrows_api.BorrowsApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.borrows_api.BorrowsApi() # noqa: E501 def tearDown(self): pass - def test_lendingpool_borrows_get(self): - """Test case for lendingpool_borrows_get + def test_get_user_borrows(self): + """Test case for get_user_borrows Get user borrows of lendingpool # noqa: E501 """ diff --git a/src/zarban/service/test/test_chain_activity.py b/src/zarban/service/test/test_chain_activity.py index c3acf21..2a8be09 100644 --- a/src/zarban/service/test/test_chain_activity.py +++ b/src/zarban/service/test/test_chain_activity.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.chain_activity import ChainActivity # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.chain_activity import ChainActivity # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestChainActivity(unittest.TestCase): """ChainActivity unit test stubs""" @@ -33,13 +34,13 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.chain_activity.ChainActivity() # noqa: E501 + # model = zarban.service.openapi_client.models.chain_activity.ChainActivity() # noqa: E501 if include_optional : return ChainActivity( step_number = 56, number_of_steps = 56, steps = [ - openapi_client.models.chain_activity_step.ChainActivityStep( + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( type = 'PreparedTx', data = null, ) ] @@ -49,7 +50,7 @@ def make_instance(self, include_optional): step_number = 56, number_of_steps = 56, steps = [ - openapi_client.models.chain_activity_step.ChainActivityStep( + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( type = 'PreparedTx', data = null, ) ], diff --git a/src/zarban/service/test/test_chain_activity_step.py b/src/zarban/service/test/test_chain_activity_step.py index 079c83a..c247851 100644 --- a/src/zarban/service/test/test_chain_activity_step.py +++ b/src/zarban/service/test/test_chain_activity_step.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.chain_activity_step import ChainActivityStep # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.chain_activity_step import ChainActivityStep # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestChainActivityStep(unittest.TestCase): """ChainActivityStep unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.chain_activity_step.ChainActivityStep() # noqa: E501 + # model = zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep() # noqa: E501 if include_optional : return ChainActivityStep( type = 'PreparedTx', diff --git a/src/zarban/service/test/test_chain_activity_step_data.py b/src/zarban/service/test/test_chain_activity_step_data.py new file mode 100644 index 0000000..6ccf314 --- /dev/null +++ b/src/zarban/service/test/test_chain_activity_step_data.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.chain_activity_step_data import ChainActivityStepData # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestChainActivityStepData(unittest.TestCase): + """ChainActivityStepData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ChainActivityStepData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.chain_activity_step_data.ChainActivityStepData() # noqa: E501 + if include_optional : + return ChainActivityStepData( + type = '0', + label = { + 'key' : '0' + }, + gas_use_estimate = 56, + gas_fee_estimate = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + method_parameters = zarban.service.openapi_client.models.method_parameters.MethodParameters( + to = 'a', + calldata = '0', + value = '0', ), + name = 'Permit2', + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( + types = { + 'key' : [ + zarban.service.openapi_client.models.type.Type( + name = '0', + type = '0', ) + ] + }, + primary_type = '0', + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( + name = '0', + version = '0', + chain_id = '0', + verifying_contract = '0', + salt = '0', ), + message = { }, ), + hash = 'a', + message = 'Hello, World!' + ) + else : + return ChainActivityStepData( + type = '0', + label = { + 'key' : '0' + }, + gas_use_estimate = 56, + gas_fee_estimate = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + method_parameters = zarban.service.openapi_client.models.method_parameters.MethodParameters( + to = 'a', + calldata = '0', + value = '0', ), + name = 'Permit2', + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( + types = { + 'key' : [ + zarban.service.openapi_client.models.type.Type( + name = '0', + type = '0', ) + ] + }, + primary_type = '0', + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( + name = '0', + version = '0', + chain_id = '0', + verifying_contract = '0', + salt = '0', ), + message = { }, ), + hash = 'a', + message = 'Hello, World!', + ) + + def testChainActivityStepData(self): + """Test ChainActivityStepData""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_collector_api.py b/src/zarban/service/test/test_collector_api.py index 3074b18..e815ef8 100644 --- a/src/zarban/service/test/test_collector_api.py +++ b/src/zarban/service/test/test_collector_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.collector_api import CollectorApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.collector_api import CollectorApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestCollectorApi(unittest.TestCase): """CollectorApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.collector_api.CollectorApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.collector_api.CollectorApi() # noqa: E501 def tearDown(self): pass - def test_stats_get(self): - """Test case for stats_get + def test_get_collector_data(self): + """Test case for get_collector_data Get collector data # noqa: E501 """ diff --git a/src/zarban/service/test/test_deposits_api.py b/src/zarban/service/test/test_deposits_api.py index cd8dfdb..83c473c 100644 --- a/src/zarban/service/test/test_deposits_api.py +++ b/src/zarban/service/test/test_deposits_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.deposits_api import DepositsApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.deposits_api import DepositsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestDepositsApi(unittest.TestCase): """DepositsApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.deposits_api.DepositsApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.deposits_api.DepositsApi() # noqa: E501 def tearDown(self): pass - def test_lendingpool_deposits_get(self): - """Test case for lendingpool_deposits_get + def test_get_user_deposits(self): + """Test case for get_user_deposits Get user deposits of Lendingpool # noqa: E501 """ diff --git a/src/zarban/service/test/test_dutch_amount.py b/src/zarban/service/test/test_dutch_amount.py index 5bfe71a..36f05f8 100644 --- a/src/zarban/service/test/test_dutch_amount.py +++ b/src/zarban/service/test/test_dutch_amount.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.dutch_amount import DutchAmount # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.dutch_amount import DutchAmount # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestDutchAmount(unittest.TestCase): """DutchAmount unit test stubs""" @@ -33,10 +34,10 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.dutch_amount.DutchAmount() # noqa: E501 + # model = zarban.service.openapi_client.models.dutch_amount.DutchAmount() # noqa: E501 if include_optional : return DutchAmount( - token = openapi_client.models.token.Token( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -50,7 +51,7 @@ def make_instance(self, include_optional): ) else : return DutchAmount( - token = openapi_client.models.token.Token( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_eip712_sign_request.py b/src/zarban/service/test/test_eip712_sign_request.py index d00ab8d..fb4139f 100644 --- a/src/zarban/service/test/test_eip712_sign_request.py +++ b/src/zarban/service/test/test_eip712_sign_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.eip712_sign_request import EIP712SignRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.eip712_sign_request import EIP712SignRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestEIP712SignRequest(unittest.TestCase): """EIP712SignRequest unit test stubs""" @@ -33,20 +34,20 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.eip712_sign_request.EIP712SignRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.eip712_sign_request.EIP712SignRequest() # noqa: E501 if include_optional : return EIP712SignRequest( name = 'Permit2', - typed_data = openapi_client.models.typed_data.TypedData( + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', @@ -58,16 +59,16 @@ def make_instance(self, include_optional): else : return EIP712SignRequest( name = 'Permit2', - typed_data = openapi_client.models.typed_data.TypedData( + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', diff --git a/src/zarban/service/test/test_error.py b/src/zarban/service/test/test_error.py index 2581a58..d72ed84 100644 --- a/src/zarban/service/test/test_error.py +++ b/src/zarban/service/test/test_error.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.error import Error # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.error import Error # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestError(unittest.TestCase): """Error unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.error.Error() # noqa: E501 + # model = zarban.service.openapi_client.models.error.Error() # noqa: E501 if include_optional : return Error( msg = 'Bad request', @@ -44,6 +45,9 @@ def make_instance(self, include_optional): else : return Error( msg = 'Bad request', + reasons = [ + 'Invalid address' + ], ) def testError(self): diff --git a/src/zarban/service/test/test_better_error_messages.py b/src/zarban/service/test/test_error_message.py similarity index 62% rename from src/zarban/service/test/test_better_error_messages.py rename to src/zarban/service/test/test_error_message.py index 63420fb..1cb1f0c 100644 --- a/src/zarban/service/test/test_better_error_messages.py +++ b/src/zarban/service/test/test_error_message.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.better_error_messages import BetterErrorMessages # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.error_message import ErrorMessage # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestBetterErrorMessages(unittest.TestCase): - """BetterErrorMessages unit test stubs""" +class TestErrorMessage(unittest.TestCase): + """ErrorMessage unit test stubs""" def setUp(self): pass @@ -29,25 +30,28 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test BetterErrorMessages + """Test ErrorMessage include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.better_error_messages.BetterErrorMessages() # noqa: E501 + # model = zarban.service.openapi_client.models.error_message.ErrorMessage() # noqa: E501 if include_optional : - return BetterErrorMessages( + return ErrorMessage( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' ] ) else : - return BetterErrorMessages( + return ErrorMessage( user_message = 'Invalid request. Please check the provided address.', + solutions = [ + 'Ensure the address follows the correct format.' + ], ) - def testBetterErrorMessages(self): - """Test BetterErrorMessages""" + def testErrorMessage(self): + """Test ErrorMessage""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_event_details_response.py b/src/zarban/service/test/test_event_details_response.py new file mode 100644 index 0000000..710f05e --- /dev/null +++ b/src/zarban/service/test/test_event_details_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.event_details_response import EventDetailsResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestEventDetailsResponse(unittest.TestCase): + """EventDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EventDetailsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.event_details_response.EventDetailsResponse() # noqa: E501 + if include_optional : + return EventDetailsResponse( + data = [ + zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ) + ] + ) + else : + return EventDetailsResponse( + data = [ + zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ) + ], + ) + + def testEventDetailsResponse(self): + """Test EventDetailsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_event_domain.py b/src/zarban/service/test/test_event_domain.py index 0a04edf..83b6408 100644 --- a/src/zarban/service/test/test_event_domain.py +++ b/src/zarban/service/test/test_event_domain.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.event_domain import EventDomain # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.event_domain import EventDomain # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestEventDomain(unittest.TestCase): """EventDomain unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.event_domain.EventDomain() # noqa: E501 + # model = zarban.service.openapi_client.models.event_domain.EventDomain() # noqa: E501 if include_optional : return EventDomain( ) diff --git a/src/zarban/service/test/test_event_name.py b/src/zarban/service/test/test_event_name.py index c432144..9de7b58 100644 --- a/src/zarban/service/test/test_event_name.py +++ b/src/zarban/service/test/test_event_name.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.event_name import EventName # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.event_name import EventName # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestEventName(unittest.TestCase): """EventName unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.event_name.EventName() # noqa: E501 + # model = zarban.service.openapi_client.models.event_name.EventName() # noqa: E501 if include_optional : return EventName( ) diff --git a/src/zarban/service/test/test_event_type.py b/src/zarban/service/test/test_event_type.py index 53e2a8c..987ddb7 100644 --- a/src/zarban/service/test/test_event_type.py +++ b/src/zarban/service/test/test_event_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.event_type import EventType # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.event_type import EventType # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestEventType(unittest.TestCase): """EventType unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.event_type.EventType() # noqa: E501 + # model = zarban.service.openapi_client.models.event_type.EventType() # noqa: E501 if include_optional : return EventType( ) diff --git a/src/zarban/service/test/test_events_api.py b/src/zarban/service/test/test_events_api.py deleted file mode 100644 index a4381ce..0000000 --- a/src/zarban/service/test/test_events_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import openapi_client -from openapi_client.api.events_api import EventsApi # noqa: E501 -from openapi_client.rest import ApiException - - -class TestEventsApi(unittest.TestCase): - """EventsApi unit test stubs""" - - def setUp(self): - self.api = openapi_client.api.events_api.EventsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_events_get(self): - """Test case for events_get - - Ordered list events based on query parameters # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_extended_event.py b/src/zarban/service/test/test_extended_event.py index f382047..a0ab5d4 100644 --- a/src/zarban/service/test/test_extended_event.py +++ b/src/zarban/service/test/test_extended_event.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.extended_event import ExtendedEvent # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.extended_event import ExtendedEvent # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestExtendedEvent(unittest.TestCase): """ExtendedEvent unit test stubs""" @@ -33,50 +34,58 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.extended_event.ExtendedEvent() # noqa: E501 + # model = zarban.service.openapi_client.models.extended_event.ExtendedEvent() # noqa: E501 if include_optional : return ExtendedEvent( - id = 1, - name = 'VaultRepay', - type = 'executive', domain = 'stableCoinSystem', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + id = 56, + name = 'VaultRepay', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, topics = [ '0x1234567890abcdef1234567abcdef' ], - data = '0x1234567890abcdef1234567abcdef', ), - payload = None + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + type = 'executive', + payload = { } ) else : return ExtendedEvent( - id = 1, - name = 'VaultRepay', - type = 'executive', domain = 'stableCoinSystem', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + id = 56, + name = 'VaultRepay', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, topics = [ '0x1234567890abcdef1234567abcdef' ], - data = '0x1234567890abcdef1234567abcdef', ), - payload = None, + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + type = 'executive', + payload = { }, ) def testExtendedEvent(self): diff --git a/src/zarban/service/test/test_file.py b/src/zarban/service/test/test_file.py deleted file mode 100644 index 685e709..0000000 --- a/src/zarban/service/test/test_file.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.file import File # noqa: E501 -from openapi_client.rest import ApiException - -class TestFile(unittest.TestCase): - """File unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test File - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.file.File() # noqa: E501 - if include_optional : - return File( - id = 1, - time = '2020-01-01T00:00:00Z', - where = 'vat', - ilk = 'ETH-A', - what = '0', - data = '0x1234567890abcdef1234567abcdef', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return File( - id = 1, - time = '2020-01-01T00:00:00Z', - where = 'vat', - what = '0', - data = '0x1234567890abcdef1234567abcdef', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testFile(self): - """Test File""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_formatted_reserve_data.py b/src/zarban/service/test/test_formatted_reserve_data.py index 15a6734..36117be 100644 --- a/src/zarban/service/test/test_formatted_reserve_data.py +++ b/src/zarban/service/test/test_formatted_reserve_data.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.formatted_reserve_data import FormattedReserveData # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.formatted_reserve_data import FormattedReserveData # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestFormattedReserveData(unittest.TestCase): """FormattedReserveData unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.formatted_reserve_data.FormattedReserveData() # noqa: E501 + # model = zarban.service.openapi_client.models.formatted_reserve_data.FormattedReserveData() # noqa: E501 if include_optional : return FormattedReserveData( id = '0x1234567890123456789012345678901234567890:0x1234567890123456789012345678901234567890', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -68,7 +69,7 @@ def make_instance(self, include_optional): else : return FormattedReserveData( id = '0x1234567890123456789012345678901234567890:0x1234567890123456789012345678901234567890', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_ilk.py b/src/zarban/service/test/test_ilk.py index c5cca6d..7ac075c 100644 --- a/src/zarban/service/test/test_ilk.py +++ b/src/zarban/service/test/test_ilk.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.ilk import Ilk # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.ilk import Ilk # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestIlk(unittest.TestCase): """Ilk unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.ilk.Ilk() # noqa: E501 + # model = zarban.service.openapi_client.models.ilk.Ilk() # noqa: E501 if include_optional : return Ilk( name = '0', diff --git a/src/zarban/service/test/test_ilks_api.py b/src/zarban/service/test/test_ilks_api.py index b7f6eca..f0254fc 100644 --- a/src/zarban/service/test/test_ilks_api.py +++ b/src/zarban/service/test/test_ilks_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,29 +15,29 @@ import unittest -import openapi_client -from openapi_client.api.ilks_api import IlksApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.ilks_api import IlksApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestIlksApi(unittest.TestCase): """IlksApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.ilks_api.IlksApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.ilks_api.IlksApi() # noqa: E501 def tearDown(self): pass - def test_ilks_get(self): - """Test case for ilks_get + def test_get_all_ilks(self): + """Test case for get_all_ilks Get all Ilks # noqa: E501 """ pass - def test_ilks_name_get(self): - """Test case for ilks_name_get + def test_get_ilk_by_name(self): + """Test case for get_ilk_by_name Get Ilk by name # noqa: E501 """ diff --git a/src/zarban/service/test/test_ilks_response.py b/src/zarban/service/test/test_ilks_response.py new file mode 100644 index 0000000..f4200e4 --- /dev/null +++ b/src/zarban/service/test/test_ilks_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.ilks_response import IlksResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestIlksResponse(unittest.TestCase): + """IlksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test IlksResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.ilks_response.IlksResponse() # noqa: E501 + if include_optional : + return IlksResponse( + data = [ + zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + ] + ) + else : + return IlksResponse( + data = [ + zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + ], + ) + + def testIlksResponse(self): + """Test IlksResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_lending_pool_api.py b/src/zarban/service/test/test_lending_pool_api.py index b449b4d..e07aeff 100644 --- a/src/zarban/service/test/test_lending_pool_api.py +++ b/src/zarban/service/test/test_lending_pool_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,83 +15,76 @@ import unittest -import openapi_client -from openapi_client.api.lending_pool_api import LendingPoolApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.lending_pool_api import LendingPoolApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingPoolApi(unittest.TestCase): """LendingPoolApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.lending_pool_api.LendingPoolApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.lending_pool_api.LendingPoolApi() # noqa: E501 def tearDown(self): pass - def test_lendingpool_borrows_get(self): - """Test case for lendingpool_borrows_get + def test_create_lending_pool_borrow(self): + """Test case for create_lending_pool_borrow - Get user borrows of lendingpool # noqa: E501 + Borrow from lending pool # noqa: E501 """ pass - def test_lendingpool_deposits_get(self): - """Test case for lendingpool_deposits_get + def test_create_lending_pool_deposit(self): + """Test case for create_lending_pool_deposit - Get user deposits of Lendingpool # noqa: E501 + Deposit to lending pool # noqa: E501 """ pass - def test_lendingpool_overview_get(self): - """Test case for lendingpool_overview_get + def test_create_lending_pool_repay(self): + """Test case for create_lending_pool_repay - Get lending pool overview # noqa: E501 + Repay to lending pool # noqa: E501 """ pass - def test_lendingpool_reserves_get(self): - """Test case for lendingpool_reserves_get + def test_create_lending_pool_withdraw(self): + """Test case for create_lending_pool_withdraw - Fetch Reserve Data By Asset # noqa: E501 + Withdraw from lending pool # noqa: E501 """ pass - def test_lendingpool_tx_borrow_post(self): - """Test case for lendingpool_tx_borrow_post + def test_fetch_reserve_data_by_asset(self): + """Test case for fetch_reserve_data_by_asset - Borrow from lending pool # noqa: E501 + Fetch Reserve Data By Asset # noqa: E501 """ pass - def test_lendingpool_tx_deposit_post(self): - """Test case for lendingpool_tx_deposit_post + def test_get_user_borrows(self): + """Test case for get_user_borrows - Deposit to lending pool # noqa: E501 + Get user borrows of lendingpool # noqa: E501 """ pass - def test_lendingpool_tx_repay_post(self): - """Test case for lendingpool_tx_repay_post + def test_get_user_deposits(self): + """Test case for get_user_deposits - Repay to lending pool # noqa: E501 + Get user deposits of Lendingpool # noqa: E501 """ pass - def test_lendingpool_tx_useassetascollateral_post(self): - """Test case for lendingpool_tx_useassetascollateral_post + def test_set_lending_pool_asset_collateral(self): + """Test case for set_lending_pool_asset_collateral Enable/Disable asset as collateral # noqa: E501 """ pass - def test_lendingpool_tx_withdraw_post(self): - """Test case for lendingpool_tx_withdraw_post - - Withdraw from lending pool # noqa: E501 - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_borrow.py b/src/zarban/service/test/test_lendingpool_borrow.py index df347bf..bc368ad 100644 --- a/src/zarban/service/test/test_lendingpool_borrow.py +++ b/src/zarban/service/test/test_lendingpool_borrow.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_borrow import LendingpoolBorrow # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_borrow import LendingpoolBorrow # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolBorrow(unittest.TestCase): """LendingpoolBorrow unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_borrow.LendingpoolBorrow() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_borrow.LendingpoolBorrow() # noqa: E501 if include_optional : return LendingpoolBorrow( user = '0', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -52,7 +53,7 @@ def make_instance(self, include_optional): else : return LendingpoolBorrow( user = '0', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_lendingpool_borrow_event.py b/src/zarban/service/test/test_lendingpool_borrow_event.py deleted file mode 100644 index a899599..0000000 --- a/src/zarban/service/test/test_lendingpool_borrow_event.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_borrow_event import LendingpoolBorrowEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolBorrowEvent(unittest.TestCase): - """LendingpoolBorrowEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolBorrowEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_borrow_event.LendingpoolBorrowEvent() # noqa: E501 - if include_optional : - return LendingpoolBorrowEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - on_behalf_of = '0x1234567890123456789012345678901234567890', - amount = '100', - borrow_rate_mode = 'variable', - borrow_rate = '0.1', - referral = 123, - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolBorrowEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - amount = '100', - borrow_rate_mode = 'variable', - borrow_rate = '0.1', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolBorrowEvent(self): - """Test LendingpoolBorrowEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_borrow_tx_request.py b/src/zarban/service/test/test_lendingpool_borrow_tx_request.py index 97f6c1e..e1860ec 100644 --- a/src/zarban/service/test/test_lendingpool_borrow_tx_request.py +++ b/src/zarban/service/test/test_lendingpool_borrow_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_borrow_tx_request import LendingpoolBorrowTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_borrow_tx_request import LendingpoolBorrowTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolBorrowTxRequest(unittest.TestCase): """LendingpoolBorrowTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_borrow_tx_request.LendingpoolBorrowTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_borrow_tx_request.LendingpoolBorrowTxRequest() # noqa: E501 if include_optional : return LendingpoolBorrowTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_lendingpool_borrow_tx_response.py b/src/zarban/service/test/test_lendingpool_borrow_tx_response.py new file mode 100644 index 0000000..55dc69f --- /dev/null +++ b/src/zarban/service/test/test_lendingpool_borrow_tx_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_borrow_tx_response import LendingpoolBorrowTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestLendingpoolBorrowTxResponse(unittest.TestCase): + """LendingpoolBorrowTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LendingpoolBorrowTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.lendingpool_borrow_tx_response.LendingpoolBorrowTxResponse() # noqa: E501 + if include_optional : + return LendingpoolBorrowTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ), + response = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( + next_health_factor = '1.2', ) + ) + else : + return LendingpoolBorrowTxResponse( + ) + + def testLendingpoolBorrowTxResponse(self): + """Test LendingpoolBorrowTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_deposit.py b/src/zarban/service/test/test_lendingpool_deposit.py index 1c60fa8..f112253 100644 --- a/src/zarban/service/test/test_lendingpool_deposit.py +++ b/src/zarban/service/test/test_lendingpool_deposit.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_deposit import LendingpoolDeposit # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_deposit import LendingpoolDeposit # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolDeposit(unittest.TestCase): """LendingpoolDeposit unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_deposit.LendingpoolDeposit() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_deposit.LendingpoolDeposit() # noqa: E501 if include_optional : return LendingpoolDeposit( user = '0', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -52,7 +53,7 @@ def make_instance(self, include_optional): else : return LendingpoolDeposit( user = '0', - underlying_asset = openapi_client.models.token.Token( + underlying_asset = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_lendingpool_deposit_event.py b/src/zarban/service/test/test_lendingpool_deposit_event.py deleted file mode 100644 index aed3881..0000000 --- a/src/zarban/service/test/test_lendingpool_deposit_event.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_deposit_event import LendingpoolDepositEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolDepositEvent(unittest.TestCase): - """LendingpoolDepositEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolDepositEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_deposit_event.LendingpoolDepositEvent() # noqa: E501 - if include_optional : - return LendingpoolDepositEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - on_behalf_of = '0x1234567890123456789012345678901234567890', - amount = '100', - referral = 123, - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolDepositEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - on_behalf_of = '0x1234567890123456789012345678901234567890', - amount = '100', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolDepositEvent(self): - """Test LendingpoolDepositEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_deposit_tx_request.py b/src/zarban/service/test/test_lendingpool_deposit_tx_request.py index fd576b8..f155bf6 100644 --- a/src/zarban/service/test/test_lendingpool_deposit_tx_request.py +++ b/src/zarban/service/test/test_lendingpool_deposit_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_deposit_tx_request import LendingpoolDepositTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_deposit_tx_request import LendingpoolDepositTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolDepositTxRequest(unittest.TestCase): """LendingpoolDepositTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_deposit_tx_request.LendingpoolDepositTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_deposit_tx_request.LendingpoolDepositTxRequest() # noqa: E501 if include_optional : return LendingpoolDepositTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_lendingpool_deposit_tx_response.py b/src/zarban/service/test/test_lendingpool_deposit_tx_response.py new file mode 100644 index 0000000..29d4f24 --- /dev/null +++ b/src/zarban/service/test/test_lendingpool_deposit_tx_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_deposit_tx_response import LendingpoolDepositTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestLendingpoolDepositTxResponse(unittest.TestCase): + """LendingpoolDepositTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LendingpoolDepositTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.lendingpool_deposit_tx_response.LendingpoolDepositTxResponse() # noqa: E501 + if include_optional : + return LendingpoolDepositTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ), + response = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( + next_health_factor = '1.2', ) + ) + else : + return LendingpoolDepositTxResponse( + ) + + def testLendingpoolDepositTxResponse(self): + """Test LendingpoolDepositTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_flash_loan_event.py b/src/zarban/service/test/test_lendingpool_flash_loan_event.py deleted file mode 100644 index 14604fe..0000000 --- a/src/zarban/service/test/test_lendingpool_flash_loan_event.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_flash_loan_event import LendingpoolFlashLoanEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolFlashLoanEvent(unittest.TestCase): - """LendingpoolFlashLoanEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolFlashLoanEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_flash_loan_event.LendingpoolFlashLoanEvent() # noqa: E501 - if include_optional : - return LendingpoolFlashLoanEvent( - id = 1, - target = '0x1234567890123456789012345678901234567890', - initiator = '0x1234567890123456789012345678901234567890', - asset = '0x1234567890123456789012345678901234567890', - amount = '100', - premium = '0.009', - referral_code = 123, - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolFlashLoanEvent( - id = 1, - target = '0x1234567890123456789012345678901234567890', - initiator = '0x1234567890123456789012345678901234567890', - asset = '0x1234567890123456789012345678901234567890', - amount = '100', - premium = '0.009', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolFlashLoanEvent(self): - """Test LendingpoolFlashLoanEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_liquidation_call_event.py b/src/zarban/service/test/test_lendingpool_liquidation_call_event.py deleted file mode 100644 index 490e101..0000000 --- a/src/zarban/service/test/test_lendingpool_liquidation_call_event.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_liquidation_call_event import LendingpoolLiquidationCallEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolLiquidationCallEvent(unittest.TestCase): - """LendingpoolLiquidationCallEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolLiquidationCallEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_liquidation_call_event.LendingpoolLiquidationCallEvent() # noqa: E501 - if include_optional : - return LendingpoolLiquidationCallEvent( - id = 1, - collateral_asset = '0x1234567890123456789012345678901234567890', - debt_asset = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - debt_to_cover = '100', - liquidated_collateral_amount = '100', - liquidator = '0x1234567890123456789012345678901234567890', - receive_z_token = True, - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolLiquidationCallEvent( - id = 1, - collateral_asset = '0x1234567890123456789012345678901234567890', - debt_asset = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - debt_to_cover = '100', - liquidated_collateral_amount = '100', - liquidator = '0x1234567890123456789012345678901234567890', - receive_z_token = True, - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolLiquidationCallEvent(self): - """Test LendingpoolLiquidationCallEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_repay_event.py b/src/zarban/service/test/test_lendingpool_repay_event.py deleted file mode 100644 index 42f11f3..0000000 --- a/src/zarban/service/test/test_lendingpool_repay_event.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_repay_event import LendingpoolRepayEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolRepayEvent(unittest.TestCase): - """LendingpoolRepayEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolRepayEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_repay_event.LendingpoolRepayEvent() # noqa: E501 - if include_optional : - return LendingpoolRepayEvent( - id = 1, - reserve = '0', - user = '0', - repayer = '0', - amount = '0', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolRepayEvent( - id = 1, - reserve = '0', - user = '0', - repayer = '0', - amount = '0', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolRepayEvent(self): - """Test LendingpoolRepayEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_repay_tx_request.py b/src/zarban/service/test/test_lendingpool_repay_tx_request.py index 1784a69..1eb2eb8 100644 --- a/src/zarban/service/test/test_lendingpool_repay_tx_request.py +++ b/src/zarban/service/test/test_lendingpool_repay_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_repay_tx_request import LendingpoolRepayTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_repay_tx_request import LendingpoolRepayTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolRepayTxRequest(unittest.TestCase): """LendingpoolRepayTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_repay_tx_request.LendingpoolRepayTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_repay_tx_request.LendingpoolRepayTxRequest() # noqa: E501 if include_optional : return LendingpoolRepayTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_lendingpool_repay_tx_response.py b/src/zarban/service/test/test_lendingpool_repay_tx_response.py new file mode 100644 index 0000000..69d8d9f --- /dev/null +++ b/src/zarban/service/test/test_lendingpool_repay_tx_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_repay_tx_response import LendingpoolRepayTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestLendingpoolRepayTxResponse(unittest.TestCase): + """LendingpoolRepayTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LendingpoolRepayTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.lendingpool_repay_tx_response.LendingpoolRepayTxResponse() # noqa: E501 + if include_optional : + return LendingpoolRepayTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ), + response = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( + next_health_factor = '1.2', ) + ) + else : + return LendingpoolRepayTxResponse( + ) + + def testLendingpoolRepayTxResponse(self): + """Test LendingpoolRepayTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_stats.py b/src/zarban/service/test/test_lendingpool_stats.py index d1b10b5..dcbe0a5 100644 --- a/src/zarban/service/test/test_lendingpool_stats.py +++ b/src/zarban/service/test/test_lendingpool_stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_stats import LendingpoolStats # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_stats import LendingpoolStats # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolStats(unittest.TestCase): """LendingpoolStats unit test stubs""" @@ -33,18 +34,18 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_stats.LendingpoolStats() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_stats.LendingpoolStats() # noqa: E501 if include_optional : return LendingpoolStats( - total_available = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_borrows = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_market_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"} + total_available = null, + total_borrows = null, + total_market_size = null ) else : return LendingpoolStats( - total_available = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_borrows = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_market_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + total_available = null, + total_borrows = null, + total_market_size = null, ) def testLendingpoolStats(self): diff --git a/src/zarban/service/test/test_lendingpool_tx_response.py b/src/zarban/service/test/test_lendingpool_tx_response.py index 1be2ce1..a7a4721 100644 --- a/src/zarban/service/test/test_lendingpool_tx_response.py +++ b/src/zarban/service/test/test_lendingpool_tx_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_tx_response import LendingpoolTxResponse # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_tx_response import LendingpoolTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolTxResponse(unittest.TestCase): """LendingpoolTxResponse unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse() # noqa: E501 if include_optional : return LendingpoolTxResponse( next_health_factor = '1.2' diff --git a/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_request.py b/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_request.py index 409796d..36fd75e 100644 --- a/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_request.py +++ b/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_use_asset_as_collateral_tx_request import LendingpoolUseAssetAsCollateralTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_request import LendingpoolUseAssetAsCollateralTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolUseAssetAsCollateralTxRequest(unittest.TestCase): """LendingpoolUseAssetAsCollateralTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_use_asset_as_collateral_tx_request.LendingpoolUseAssetAsCollateralTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_request.LendingpoolUseAssetAsCollateralTxRequest() # noqa: E501 if include_optional : return LendingpoolUseAssetAsCollateralTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_response.py b/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_response.py new file mode 100644 index 0000000..ccf4dc0 --- /dev/null +++ b/src/zarban/service/test/test_lendingpool_use_asset_as_collateral_tx_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_response import LendingpoolUseAssetAsCollateralTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestLendingpoolUseAssetAsCollateralTxResponse(unittest.TestCase): + """LendingpoolUseAssetAsCollateralTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LendingpoolUseAssetAsCollateralTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.lendingpool_use_asset_as_collateral_tx_response.LendingpoolUseAssetAsCollateralTxResponse() # noqa: E501 + if include_optional : + return LendingpoolUseAssetAsCollateralTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ), + response = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( + next_health_factor = '1.2', ) + ) + else : + return LendingpoolUseAssetAsCollateralTxResponse( + ) + + def testLendingpoolUseAssetAsCollateralTxResponse(self): + """Test LendingpoolUseAssetAsCollateralTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_withdraw_event.py b/src/zarban/service/test/test_lendingpool_withdraw_event.py deleted file mode 100644 index 9df3233..0000000 --- a/src/zarban/service/test/test_lendingpool_withdraw_event.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.lendingpool_withdraw_event import LendingpoolWithdrawEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestLendingpoolWithdrawEvent(unittest.TestCase): - """LendingpoolWithdrawEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LendingpoolWithdrawEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.lendingpool_withdraw_event.LendingpoolWithdrawEvent() # noqa: E501 - if include_optional : - return LendingpoolWithdrawEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - to = '0x1234567890123456789012345678901234567890', - amount = '100', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return LendingpoolWithdrawEvent( - id = 1, - reserve = '0x1234567890123456789012345678901234567890', - user = '0x1234567890123456789012345678901234567890', - to = '0x1234567890123456789012345678901234567890', - amount = '100', - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testLendingpoolWithdrawEvent(self): - """Test LendingpoolWithdrawEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_lendingpool_withdraw_tx_request.py b/src/zarban/service/test/test_lendingpool_withdraw_tx_request.py index 8b1ee34..34dd000 100644 --- a/src/zarban/service/test/test_lendingpool_withdraw_tx_request.py +++ b/src/zarban/service/test/test_lendingpool_withdraw_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.lendingpool_withdraw_tx_request import LendingpoolWithdrawTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_withdraw_tx_request import LendingpoolWithdrawTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLendingpoolWithdrawTxRequest(unittest.TestCase): """LendingpoolWithdrawTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.lendingpool_withdraw_tx_request.LendingpoolWithdrawTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.lendingpool_withdraw_tx_request.LendingpoolWithdrawTxRequest() # noqa: E501 if include_optional : return LendingpoolWithdrawTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_lendingpool_withdraw_tx_response.py b/src/zarban/service/test/test_lendingpool_withdraw_tx_response.py new file mode 100644 index 0000000..5315de0 --- /dev/null +++ b/src/zarban/service/test/test_lendingpool_withdraw_tx_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.lendingpool_withdraw_tx_response import LendingpoolWithdrawTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestLendingpoolWithdrawTxResponse(unittest.TestCase): + """LendingpoolWithdrawTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LendingpoolWithdrawTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.lendingpool_withdraw_tx_response.LendingpoolWithdrawTxResponse() # noqa: E501 + if include_optional : + return LendingpoolWithdrawTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ), + response = zarban.service.openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( + next_health_factor = '1.2', ) + ) + else : + return LendingpoolWithdrawTxResponse( + ) + + def testLendingpoolWithdrawTxResponse(self): + """Test LendingpoolWithdrawTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_log.py b/src/zarban/service/test/test_log.py index 35ff66d..d9fd9b3 100644 --- a/src/zarban/service/test/test_log.py +++ b/src/zarban/service/test/test_log.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.log import Log # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.log import Log # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestLog(unittest.TestCase): """Log unit test stubs""" @@ -33,31 +34,36 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.log.Log() # noqa: E501 + # model = zarban.service.openapi_client.models.log.Log() # noqa: E501 if include_optional : return Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, topics = [ '0x1234567890abcdef1234567abcdef' ], - data = '0x1234567890abcdef1234567abcdef' + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + } ) else : return Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), address = '0', - block_number = '0', + block_number = 56, tx_hash = '0', block_hash = '0', index = 56, diff --git a/src/zarban/service/test/test_logs_api.py b/src/zarban/service/test/test_logs_api.py new file mode 100644 index 0000000..6ef200f --- /dev/null +++ b/src/zarban/service/test/test_logs_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.service.openapi_client +from zarban.service.openapi_client.api.logs_api import LogsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + + +class TestLogsApi(unittest.TestCase): + """LogsApi unit test stubs""" + + def setUp(self): + self.api = zarban.service.openapi_client.api.logs_api.LogsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_logs_by_transaction_hash(self): + """Test case for get_logs_by_transaction_hash + + Get raw and decoded logs by transaction hash # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_median_event.py b/src/zarban/service/test/test_median_event.py deleted file mode 100644 index 1b78099..0000000 --- a/src/zarban/service/test/test_median_event.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.median_event import MedianEvent # noqa: E501 -from openapi_client.rest import ApiException - -class TestMedianEvent(unittest.TestCase): - """MedianEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test MedianEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.median_event.MedianEvent() # noqa: E501 - if include_optional : - return MedianEvent( - id = 1, - symbol = 'USD', - value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ) - ) - else : - return MedianEvent( - id = 1, - value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - raw = openapi_client.models.log.Log( - id = 1, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - address = '0', - block_number = '0', - tx_hash = '0', - block_hash = '0', - index = 56, - topics = [ - '0x1234567890abcdef1234567abcdef' - ], - data = '0x1234567890abcdef1234567abcdef', ), - ) - - def testMedianEvent(self): - """Test MedianEvent""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_method_parameters.py b/src/zarban/service/test/test_method_parameters.py index 965a199..5ba5c87 100644 --- a/src/zarban/service/test/test_method_parameters.py +++ b/src/zarban/service/test/test_method_parameters.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.method_parameters import MethodParameters # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.method_parameters import MethodParameters # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestMethodParameters(unittest.TestCase): """MethodParameters unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.method_parameters.MethodParameters() # noqa: E501 + # model = zarban.service.openapi_client.models.method_parameters.MethodParameters() # noqa: E501 if include_optional : return MethodParameters( to = 'a', diff --git a/src/zarban/service/test/test_order.py b/src/zarban/service/test/test_order.py index be4a1e0..9b3b179 100644 --- a/src/zarban/service/test/test_order.py +++ b/src/zarban/service/test/test_order.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.order import Order # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.order import Order # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestOrder(unittest.TestCase): """Order unit test stubs""" @@ -33,12 +34,12 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.order.Order() # noqa: E501 + # model = zarban.service.openapi_client.models.order.Order() # noqa: E501 if include_optional : return Order( quote_id = 'a', outputs = [ - openapi_client.models.raw_dutch_amount.RawDutchAmount( + zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( token = 'a', start_amount = '0', end_amount = '0', @@ -46,7 +47,7 @@ def make_instance(self, include_optional): ], encoded_order = 'a', signature = 'a', - input = openapi_client.models.raw_dutch_amount.RawDutchAmount( + input = zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( token = 'a', start_amount = '0', end_amount = '0', @@ -59,7 +60,7 @@ def make_instance(self, include_optional): else : return Order( outputs = [ - openapi_client.models.raw_dutch_amount.RawDutchAmount( + zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( token = 'a', start_amount = '0', end_amount = '0', @@ -67,7 +68,7 @@ def make_instance(self, include_optional): ], encoded_order = 'a', signature = 'a', - input = openapi_client.models.raw_dutch_amount.RawDutchAmount( + input = zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( token = 'a', start_amount = '0', end_amount = '0', @@ -75,6 +76,7 @@ def make_instance(self, include_optional): order_status = 'open', chain_id = 56, order_hash = 'a', + order_type = 'dutch', ) def testOrder(self): diff --git a/src/zarban/service/test/test_order_info.py b/src/zarban/service/test/test_order_info.py index ad7d08a..430b783 100644 --- a/src/zarban/service/test/test_order_info.py +++ b/src/zarban/service/test/test_order_info.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.order_info import OrderInfo # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.order_info import OrderInfo # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestOrderInfo(unittest.TestCase): """OrderInfo unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.order_info.OrderInfo() # noqa: E501 + # model = zarban.service.openapi_client.models.order_info.OrderInfo() # noqa: E501 if include_optional : return OrderInfo( chain_id = 56, @@ -41,21 +42,21 @@ def make_instance(self, include_optional): reactor = 'a', swapper = 'a', nonce = '0', - deadline = openapi_client.models.timestamp.Timestamp( + deadline = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), additional_validation_contract = 'a', additional_validation_data = 'a', - decay_start_time = openapi_client.models.timestamp.Timestamp( + decay_start_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - decay_end_time = openapi_client.models.timestamp.Timestamp( + decay_end_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), exclusive_filler = 'a', exclusivity_override_bps = 56, - input = openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + input = zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -67,8 +68,8 @@ def make_instance(self, include_optional): end_amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, recipient = 'a', ), outputs = [ - openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -88,21 +89,21 @@ def make_instance(self, include_optional): reactor = 'a', swapper = 'a', nonce = '0', - deadline = openapi_client.models.timestamp.Timestamp( + deadline = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), additional_validation_contract = 'a', additional_validation_data = 'a', - decay_start_time = openapi_client.models.timestamp.Timestamp( + decay_start_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - decay_end_time = openapi_client.models.timestamp.Timestamp( + decay_end_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), exclusive_filler = 'a', exclusivity_override_bps = 56, - input = openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + input = zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -114,8 +115,8 @@ def make_instance(self, include_optional): end_amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, recipient = 'a', ), outputs = [ - openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_order_response.py b/src/zarban/service/test/test_order_response.py new file mode 100644 index 0000000..aab783e --- /dev/null +++ b/src/zarban/service/test/test_order_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.order_response import OrderResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestOrderResponse(unittest.TestCase): + """OrderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test OrderResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.order_response.OrderResponse() # noqa: E501 + if include_optional : + return OrderResponse( + data = [ + zarban.service.openapi_client.models.order.Order( + quote_id = 'a', + outputs = [ + zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( + token = 'a', + start_amount = '0', + end_amount = '0', + recipient = 'a', ) + ], + encoded_order = 'a', + signature = 'a', + input = zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( + token = 'a', + start_amount = '0', + end_amount = '0', + recipient = 'a', ), + order_status = 'open', + chain_id = 56, + order_hash = 'a', + order_type = 'dutch', ) + ] + ) + else : + return OrderResponse( + data = [ + zarban.service.openapi_client.models.order.Order( + quote_id = 'a', + outputs = [ + zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( + token = 'a', + start_amount = '0', + end_amount = '0', + recipient = 'a', ) + ], + encoded_order = 'a', + signature = 'a', + input = zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount( + token = 'a', + start_amount = '0', + end_amount = '0', + recipient = 'a', ), + order_status = 'open', + chain_id = 56, + order_hash = 'a', + order_type = 'dutch', ) + ], + ) + + def testOrderResponse(self): + """Test OrderResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_order_type.py b/src/zarban/service/test/test_order_type.py index 178428d..62ca919 100644 --- a/src/zarban/service/test/test_order_type.py +++ b/src/zarban/service/test/test_order_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.order_type import OrderType # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.order_type import OrderType # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestOrderType(unittest.TestCase): """OrderType unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.order_type.OrderType() # noqa: E501 + # model = zarban.service.openapi_client.models.order_type.OrderType() # noqa: E501 if include_optional : return OrderType( ) diff --git a/src/zarban/service/test/test_orders_api.py b/src/zarban/service/test/test_orders_api.py index af30409..6abe7cf 100644 --- a/src/zarban/service/test/test_orders_api.py +++ b/src/zarban/service/test/test_orders_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,29 +15,29 @@ import unittest -import openapi_client -from openapi_client.api.orders_api import OrdersApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.orders_api import OrdersApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestOrdersApi(unittest.TestCase): """OrdersApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.orders_api.OrdersApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.orders_api.OrdersApi() # noqa: E501 def tearDown(self): pass - def test_orders_get(self): - """Test case for orders_get + def test_get_unfilled_orders(self): + """Test case for get_unfilled_orders Fetch Unfilled Orders # noqa: E501 """ pass - def test_orders_sync_post(self): - """Test case for orders_sync_post + def test_sync_order(self): + """Test case for sync_order Updates Order Entity # noqa: E501 """ diff --git a/src/zarban/service/test/test_permission.py b/src/zarban/service/test/test_permission.py deleted file mode 100644 index b9f5df5..0000000 --- a/src/zarban/service/test/test_permission.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.permission import Permission # noqa: E501 -from openapi_client.rest import ApiException - -class TestPermission(unittest.TestCase): - """Permission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Permission - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.permission.Permission() # noqa: E501 - if include_optional : - return Permission( - id = 56, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - where = openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ), - who = openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ), - action = 'rely' - ) - else : - return Permission( - id = 56, - timestamp = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - where = openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ), - who = openapi_client.models.address.Address( - label = 'vat', - address = '0x1234567890123456789012345678901234567890', ), - action = 'rely', - ) - - def testPermission(self): - """Test Permission""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_permissions_api.py b/src/zarban/service/test/test_permissions_api.py deleted file mode 100644 index 08046f7..0000000 --- a/src/zarban/service/test/test_permissions_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import openapi_client -from openapi_client.api.permissions_api import PermissionsApi # noqa: E501 -from openapi_client.rest import ApiException - - -class TestPermissionsApi(unittest.TestCase): - """PermissionsApi unit test stubs""" - - def setUp(self): - self.api = openapi_client.api.permissions_api.PermissionsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_permissions_matrix_get(self): - """Test case for permissions_matrix_get - - Get authorization matrix # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_permit_api.py b/src/zarban/service/test/test_permit_api.py index e86c6d4..9788f5d 100644 --- a/src/zarban/service/test/test_permit_api.py +++ b/src/zarban/service/test/test_permit_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.permit_api import PermitApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.permit_api import PermitApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPermitApi(unittest.TestCase): """PermitApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.permit_api.PermitApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.permit_api.PermitApi() # noqa: E501 def tearDown(self): pass - def test_permit_single_get(self): - """Test case for permit_single_get + def test_get_single_token_permit(self): + """Test case for get_single_token_permit Get permit for single token # noqa: E501 """ diff --git a/src/zarban/service/test/test_permit_single.py b/src/zarban/service/test/test_permit_single.py index 7ec1c85..676e714 100644 --- a/src/zarban/service/test/test_permit_single.py +++ b/src/zarban/service/test/test_permit_single.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.permit_single import PermitSingle # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.permit_single import PermitSingle # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPermitSingle(unittest.TestCase): """PermitSingle unit test stubs""" @@ -33,19 +34,19 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.permit_single.PermitSingle() # noqa: E501 + # model = zarban.service.openapi_client.models.permit_single.PermitSingle() # noqa: E501 if include_optional : return PermitSingle( - typed_data = openapi_client.models.typed_data.TypedData( + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', @@ -56,16 +57,16 @@ def make_instance(self, include_optional): ) else : return PermitSingle( - typed_data = openapi_client.models.typed_data.TypedData( + typed_data = zarban.service.openapi_client.models.typed_data.TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', diff --git a/src/zarban/service/test/test_personal_sign_request.py b/src/zarban/service/test/test_personal_sign_request.py index 0e25d0e..7dd088b 100644 --- a/src/zarban/service/test/test_personal_sign_request.py +++ b/src/zarban/service/test/test_personal_sign_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.personal_sign_request import PersonalSignRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.personal_sign_request import PersonalSignRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPersonalSignRequest(unittest.TestCase): """PersonalSignRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.personal_sign_request.PersonalSignRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.personal_sign_request.PersonalSignRequest() # noqa: E501 if include_optional : return PersonalSignRequest( message = 'Hello, World!' diff --git a/src/zarban/service/test/test_points_api.py b/src/zarban/service/test/test_points_api.py new file mode 100644 index 0000000..0ec1db5 --- /dev/null +++ b/src/zarban/service/test/test_points_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.service.openapi_client +from zarban.service.openapi_client.api.points_api import PointsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + + +class TestPointsApi(unittest.TestCase): + """PointsApi unit test stubs""" + + def setUp(self): + self.api = zarban.service.openapi_client.api.points_api.PointsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_scoreboard(self): + """Test case for get_scoreboard + + Get scoreboard # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_prepared_tx.py b/src/zarban/service/test/test_prepared_tx.py index 74ca3d8..a47d36d 100644 --- a/src/zarban/service/test/test_prepared_tx.py +++ b/src/zarban/service/test/test_prepared_tx.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.prepared_tx import PreparedTx # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.prepared_tx import PreparedTx # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPreparedTx(unittest.TestCase): """PreparedTx unit test stubs""" @@ -33,13 +34,16 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.prepared_tx.PreparedTx() # noqa: E501 + # model = zarban.service.openapi_client.models.prepared_tx.PreparedTx() # noqa: E501 if include_optional : return PreparedTx( type = '0', + label = { + 'key' : '0' + }, gas_use_estimate = 56, gas_fee_estimate = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - method_parameters = openapi_client.models.method_parameters.MethodParameters( + method_parameters = zarban.service.openapi_client.models.method_parameters.MethodParameters( to = 'a', calldata = '0', value = '0', ) @@ -47,9 +51,12 @@ def make_instance(self, include_optional): else : return PreparedTx( type = '0', + label = { + 'key' : '0' + }, gas_use_estimate = 56, gas_fee_estimate = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - method_parameters = openapi_client.models.method_parameters.MethodParameters( + method_parameters = zarban.service.openapi_client.models.method_parameters.MethodParameters( to = 'a', calldata = '0', value = '0', ), diff --git a/src/zarban/service/test/test_price.py b/src/zarban/service/test/test_price.py index 2897ef3..0a64913 100644 --- a/src/zarban/service/test/test_price.py +++ b/src/zarban/service/test/test_price.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.price import Price # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.price import Price # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPrice(unittest.TestCase): """Price unit test stubs""" @@ -33,12 +34,12 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.price.Price() # noqa: E501 + # model = zarban.service.openapi_client.models.price.Price() # noqa: E501 if include_optional : return Price( symbol = 'USD', value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - timestamp = openapi_client.models.timestamp.Timestamp( + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ) ) @@ -46,7 +47,7 @@ def make_instance(self, include_optional): return Price( symbol = 'USD', value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - timestamp = openapi_client.models.timestamp.Timestamp( + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), ) diff --git a/src/zarban/service/test/test_price_list_response.py b/src/zarban/service/test/test_price_list_response.py new file mode 100644 index 0000000..c73adfe --- /dev/null +++ b/src/zarban/service/test/test_price_list_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.price_list_response import PriceListResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestPriceListResponse(unittest.TestCase): + """PriceListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PriceListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.price_list_response.PriceListResponse() # noqa: E501 + if include_optional : + return PriceListResponse( + data = [ + zarban.service.openapi_client.models.price.Price( + symbol = 'USD', + value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ] + ) + else : + return PriceListResponse( + data = [ + zarban.service.openapi_client.models.price.Price( + symbol = 'USD', + value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ], + ) + + def testPriceListResponse(self): + """Test PriceListResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_prices_api.py b/src/zarban/service/test/test_prices_api.py index 2bfc4ad..916b9ca 100644 --- a/src/zarban/service/test/test_prices_api.py +++ b/src/zarban/service/test/test_prices_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,34 +15,27 @@ import unittest -import openapi_client -from openapi_client.api.prices_api import PricesApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.prices_api import PricesApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestPricesApi(unittest.TestCase): """PricesApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.prices_api.PricesApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.prices_api.PricesApi() # noqa: E501 def tearDown(self): pass - def test_prices_get(self): - """Test case for prices_get + def test_list_prices(self): + """Test case for list_prices List prices based on query parameters # noqa: E501 """ pass - def test_prices_symbol_history_get(self): - """Test case for prices_symbol_history_get - - Get price history for a symbol # noqa: E501 - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/src/zarban/service/test/test_proxies_api.py b/src/zarban/service/test/test_proxies_api.py deleted file mode 100644 index 263cc75..0000000 --- a/src/zarban/service/test/test_proxies_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Zarban API - - API for Zarban services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import openapi_client -from openapi_client.api.proxies_api import ProxiesApi # noqa: E501 -from openapi_client.rest import ApiException - - -class TestProxiesApi(unittest.TestCase): - """ProxiesApi unit test stubs""" - - def setUp(self): - self.api = openapi_client.api.proxies_api.ProxiesApi() # noqa: E501 - - def tearDown(self): - pass - - def test_proxies_get(self): - """Test case for proxies_get - - Retrieves proxies owned by a specific owner # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/service/test/test_quote_request.py b/src/zarban/service/test/test_quote_request.py index 612fb44..d0a3903 100644 --- a/src/zarban/service/test/test_quote_request.py +++ b/src/zarban/service/test/test_quote_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.quote_request import QuoteRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.quote_request import QuoteRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestQuoteRequest(unittest.TestCase): """QuoteRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.quote_request.QuoteRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.quote_request.QuoteRequest() # noqa: E501 if include_optional : return QuoteRequest( request_id = 'a', @@ -43,7 +44,7 @@ def make_instance(self, include_optional): output_token = '0x1234567890123456789012345678901234567890', amount = '123.456789', recipient = 'a', - options = openapi_client.models.quote_request_options.QuoteRequestOptions( + options = zarban.service.openapi_client.models.quote_request_options.QuoteRequestOptions( dry_run = True, slippage_tolerance = '0.005', use_synthetic_quotes = True, diff --git a/src/zarban/service/test/test_quote_request_options.py b/src/zarban/service/test/test_quote_request_options.py index 67807a7..445f2dc 100644 --- a/src/zarban/service/test/test_quote_request_options.py +++ b/src/zarban/service/test/test_quote_request_options.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.quote_request_options import QuoteRequestOptions # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.quote_request_options import QuoteRequestOptions # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestQuoteRequestOptions(unittest.TestCase): """QuoteRequestOptions unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.quote_request_options.QuoteRequestOptions() # noqa: E501 + # model = zarban.service.openapi_client.models.quote_request_options.QuoteRequestOptions() # noqa: E501 if include_optional : return QuoteRequestOptions( dry_run = True, diff --git a/src/zarban/service/test/test_quote_response.py b/src/zarban/service/test/test_quote_response.py index 7e87a3d..bd5219a 100644 --- a/src/zarban/service/test/test_quote_response.py +++ b/src/zarban/service/test/test_quote_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.quote_response import QuoteResponse # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.quote_response import QuoteResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestQuoteResponse(unittest.TestCase): """QuoteResponse unit test stubs""" @@ -33,12 +34,12 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.quote_response.QuoteResponse() # noqa: E501 + # model = zarban.service.openapi_client.models.quote_response.QuoteResponse() # noqa: E501 if include_optional : return QuoteResponse( type = 'Classic', trade_type = 'ExactInput', - time = openapi_client.models.timestamp.Timestamp( + time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, @@ -48,34 +49,34 @@ def make_instance(self, include_optional): gas_use_estimate = 56, gas_fee_estimate = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, route_string = 'A -- [0x0000000000000000000000000000000000000012] --> B -- [0x0000000000000000000000000000000000000023] --> C', - method_parameters = openapi_client.models.method_parameters.MethodParameters( + method_parameters = zarban.service.openapi_client.models.method_parameters.MethodParameters( to = 'a', calldata = '0', value = '0', ), route = [ null ], - order_info = openapi_client.models.order_info.OrderInfo( + order_info = zarban.service.openapi_client.models.order_info.OrderInfo( chain_id = 56, permit2_address = 'a', reactor = 'a', swapper = 'a', nonce = '0', - deadline = openapi_client.models.timestamp.Timestamp( + deadline = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), additional_validation_contract = 'a', additional_validation_data = 'a', - decay_start_time = openapi_client.models.timestamp.Timestamp( + decay_start_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - decay_end_time = openapi_client.models.timestamp.Timestamp( + decay_end_time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), exclusive_filler = 'a', exclusivity_override_bps = 56, - input = openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + input = zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -87,8 +88,8 @@ def make_instance(self, include_optional): end_amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, recipient = 'a', ), outputs = [ - openapi_client.models.dutch_amount.DutchAmount( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.dutch_amount.DutchAmount( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -102,16 +103,16 @@ def make_instance(self, include_optional): ], ), encoded_order = 'a', order_hash = 'a', - permit_data = openapi_client.models.typed_data.TypedData( + permit_data = zarban.service.openapi_client.models.typed_data.TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', @@ -123,7 +124,7 @@ def make_instance(self, include_optional): return QuoteResponse( type = 'Classic', trade_type = 'ExactInput', - time = openapi_client.models.timestamp.Timestamp( + time = zarban.service.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, diff --git a/src/zarban/service/test/test_raw_dutch_amount.py b/src/zarban/service/test/test_raw_dutch_amount.py index 5f62b2f..f182b08 100644 --- a/src/zarban/service/test/test_raw_dutch_amount.py +++ b/src/zarban/service/test/test_raw_dutch_amount.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.raw_dutch_amount import RawDutchAmount # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.raw_dutch_amount import RawDutchAmount # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestRawDutchAmount(unittest.TestCase): """RawDutchAmount unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.raw_dutch_amount.RawDutchAmount() # noqa: E501 + # model = zarban.service.openapi_client.models.raw_dutch_amount.RawDutchAmount() # noqa: E501 if include_optional : return RawDutchAmount( token = 'a', diff --git a/src/zarban/service/test/test_chain_id.py b/src/zarban/service/test/test_route_item.py similarity index 60% rename from src/zarban/service/test/test_chain_id.py rename to src/zarban/service/test/test_route_item.py index 6c8dc3b..e0c6d49 100644 --- a/src/zarban/service/test/test_chain_id.py +++ b/src/zarban/service/test/test_route_item.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.chain_id import ChainId # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.route_item import RouteItem # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestChainId(unittest.TestCase): - """ChainId unit test stubs""" +class TestRouteItem(unittest.TestCase): + """RouteItem unit test stubs""" def setUp(self): pass @@ -29,20 +30,20 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test ChainId + """Test RouteItem include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.chain_id.ChainId() # noqa: E501 + # model = zarban.service.openapi_client.models.route_item.RouteItem() # noqa: E501 if include_optional : - return ChainId( + return RouteItem( ) else : - return ChainId( + return RouteItem( ) - def testChainId(self): - """Test ChainId""" + def testRouteItem(self): + """Test RouteItem""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_scoreboard.py b/src/zarban/service/test/test_scoreboard.py new file mode 100644 index 0000000..3fe6ffa --- /dev/null +++ b/src/zarban/service/test/test_scoreboard.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.scoreboard import Scoreboard # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestScoreboard(unittest.TestCase): + """Scoreboard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Scoreboard + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.scoreboard.Scoreboard() # noqa: E501 + if include_optional : + return Scoreboard( + items = [ + zarban.service.openapi_client.models.scoreboard_item.ScoreboardItem( + address = '0x1234567890123456789012345678901234567890', + points = 100, ) + ] + ) + else : + return Scoreboard( + items = [ + zarban.service.openapi_client.models.scoreboard_item.ScoreboardItem( + address = '0x1234567890123456789012345678901234567890', + points = 100, ) + ], + ) + + def testScoreboard(self): + """Test Scoreboard""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_scoreboard_item.py b/src/zarban/service/test/test_scoreboard_item.py new file mode 100644 index 0000000..3dd14f4 --- /dev/null +++ b/src/zarban/service/test/test_scoreboard_item.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.scoreboard_item import ScoreboardItem # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestScoreboardItem(unittest.TestCase): + """ScoreboardItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ScoreboardItem + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.scoreboard_item.ScoreboardItem() # noqa: E501 + if include_optional : + return ScoreboardItem( + address = '0x1234567890123456789012345678901234567890', + points = 100 + ) + else : + return ScoreboardItem( + address = '0x1234567890123456789012345678901234567890', + points = 100, + ) + + def testScoreboardItem(self): + """Test ScoreboardItem""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stable_coin_system_api.py b/src/zarban/service/test/test_stable_coin_system_api.py index dcbd1fb..0de7878 100644 --- a/src/zarban/service/test/test_stable_coin_system_api.py +++ b/src/zarban/service/test/test_stable_coin_system_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,108 +15,136 @@ import unittest -import openapi_client -from openapi_client.api.stable_coin_system_api import StableCoinSystemApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.stable_coin_system_api import StableCoinSystemApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStableCoinSystemApi(unittest.TestCase): """StableCoinSystemApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.stable_coin_system_api.StableCoinSystemApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.stable_coin_system_api.StableCoinSystemApi() # noqa: E501 def tearDown(self): pass - def test_ilks_get(self): - """Test case for ilks_get + def test_approve_and_join_zar_transaction(self): + """Test case for approve_and_join_zar_transaction - Get all Ilks # noqa: E501 + approve and join ZAR token into Vat contract # noqa: E501 """ pass - def test_ilks_name_get(self): - """Test case for ilks_name_get + def test_create_stable_coin_vault(self): + """Test case for create_stable_coin_vault - Get Ilk by name # noqa: E501 + Create vault # noqa: E501 """ pass - def test_permissions_matrix_get(self): - """Test case for permissions_matrix_get + def test_deposit_stable_coin_collateral(self): + """Test case for deposit_stable_coin_collateral - Get authorization matrix # noqa: E501 + Deposit collateral # noqa: E501 """ pass - def test_proxies_get(self): - """Test case for proxies_get + def test_exit_gem_transaction(self): + """Test case for exit_gem_transaction - Retrieves proxies owned by a specific owner # noqa: E501 + exit Gem token (which can be used as collateral) from Vat contract # noqa: E501 """ pass - def test_stablecoinsystem_tx_createvault_post(self): - """Test case for stablecoinsystem_tx_createvault_post + def test_exit_zar_transaction(self): + """Test case for exit_zar_transaction - Create vault # noqa: E501 + exit ZAR token from Vat contract # noqa: E501 """ pass - def test_stablecoinsystem_tx_depositcollateral_post(self): - """Test case for stablecoinsystem_tx_depositcollateral_post + def test_get_all_ilks(self): + """Test case for get_all_ilks - Deposit collateral # noqa: E501 + Get all Ilks # noqa: E501 """ pass - def test_stablecoinsystem_tx_mintzar_post(self): - """Test case for stablecoinsystem_tx_mintzar_post + def test_get_collector_data(self): + """Test case for get_collector_data - Mint ZAR # noqa: E501 + Get collector data # noqa: E501 """ pass - def test_stablecoinsystem_tx_repayzar_post(self): - """Test case for stablecoinsystem_tx_repayzar_post + def test_get_ilk_by_name(self): + """Test case for get_ilk_by_name - Repay ZAR # noqa: E501 + Get Ilk by name # noqa: E501 """ pass - def test_stablecoinsystem_tx_withdrawcollateral_post(self): - """Test case for stablecoinsystem_tx_withdrawcollateral_post + def test_get_vault_by_id(self): + """Test case for get_vault_by_id - Withdraw collateral # noqa: E501 + Get a vault by ID # noqa: E501 """ pass - def test_stats_get(self): - """Test case for stats_get + def test_get_vault_events_by_id(self): + """Test case for get_vault_events_by_id - Get collector data # noqa: E501 + Get vault events by ID # noqa: E501 """ pass - def test_vaults_get(self): - """Test case for vaults_get + def test_get_vaults_by_owner(self): + """Test case for get_vaults_by_owner Get vaults by owner query # noqa: E501 """ pass - def test_vaults_id_events_get(self): - """Test case for vaults_id_events_get + def test_liquidate_vault_transaction(self): + """Test case for liquidate_vault_transaction - Get vault events by ID # noqa: E501 + liquidate a vault # noqa: E501 """ pass - def test_vaults_id_get(self): - """Test case for vaults_id_get + def test_mint_zar_transaction(self): + """Test case for mint_zar_transaction - Get a vault by ID # noqa: E501 + Mint ZAR # noqa: E501 + """ + pass + + def test_repay_zar_transaction(self): + """Test case for repay_zar_transaction + + Repay ZAR # noqa: E501 + """ + pass + + def test_reset_auction_transaction(self): + """Test case for reset_auction_transaction + + reset a auction # noqa: E501 + """ + pass + + def test_take_auction_transaction(self): + """Test case for take_auction_transaction + + take a auction # noqa: E501 + """ + pass + + def test_withdraw_collateral_transaction(self): + """Test case for withdraw_collateral_transaction + + Withdraw collateral # noqa: E501 """ pass diff --git a/src/zarban/service/test/test_stablecoin_system_bark_tx_request.py b/src/zarban/service/test/test_stablecoin_system_bark_tx_request.py new file mode 100644 index 0000000..fb6f3c0 --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_bark_tx_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_bark_tx_request import StablecoinSystemBarkTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemBarkTxRequest(unittest.TestCase): + """StablecoinSystemBarkTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemBarkTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_bark_tx_request.StablecoinSystemBarkTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemBarkTxRequest( + user = '0x1234567890123456789012345678901234567890', + vault_id = 1 + ) + else : + return StablecoinSystemBarkTxRequest( + user = '0x1234567890123456789012345678901234567890', + vault_id = 1, + ) + + def testStablecoinSystemBarkTxRequest(self): + """Test StablecoinSystemBarkTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stablecoin_system_create_vault_tx_request.py b/src/zarban/service/test/test_stablecoin_system_create_vault_tx_request.py index 2b39bc7..525df24 100644 --- a/src/zarban/service/test/test_stablecoin_system_create_vault_tx_request.py +++ b/src/zarban/service/test/test_stablecoin_system_create_vault_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_create_vault_tx_request import StablecoinSystemCreateVaultTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_create_vault_tx_request import StablecoinSystemCreateVaultTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemCreateVaultTxRequest(unittest.TestCase): """StablecoinSystemCreateVaultTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_create_vault_tx_request.StablecoinSystemCreateVaultTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_create_vault_tx_request.StablecoinSystemCreateVaultTxRequest() # noqa: E501 if include_optional : return StablecoinSystemCreateVaultTxRequest( ilk_name = 'ETH-A', diff --git a/src/zarban/service/test/test_stablecoin_system_deposit_collateral_tx_request.py b/src/zarban/service/test/test_stablecoin_system_deposit_collateral_tx_request.py index 953c556..1d372ab 100644 --- a/src/zarban/service/test/test_stablecoin_system_deposit_collateral_tx_request.py +++ b/src/zarban/service/test/test_stablecoin_system_deposit_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_deposit_collateral_tx_request import StablecoinSystemDepositCollateralTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_deposit_collateral_tx_request import StablecoinSystemDepositCollateralTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemDepositCollateralTxRequest(unittest.TestCase): """StablecoinSystemDepositCollateralTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_deposit_collateral_tx_request.StablecoinSystemDepositCollateralTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_deposit_collateral_tx_request.StablecoinSystemDepositCollateralTxRequest() # noqa: E501 if include_optional : return StablecoinSystemDepositCollateralTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_stablecoin_system_gemexit_tx_request.py b/src/zarban/service/test/test_stablecoin_system_gemexit_tx_request.py new file mode 100644 index 0000000..4475c9d --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_gemexit_tx_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_gemexit_tx_request import StablecoinSystemGemexitTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemGemexitTxRequest(unittest.TestCase): + """StablecoinSystemGemexitTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemGemexitTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_gemexit_tx_request.StablecoinSystemGemexitTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemGemexitTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000', + ilk = 'ETHA' + ) + else : + return StablecoinSystemGemexitTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000', + ilk = 'ETHA', + ) + + def testStablecoinSystemGemexitTxRequest(self): + """Test StablecoinSystemGemexitTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stablecoin_system_mint_zar_tx_request.py b/src/zarban/service/test/test_stablecoin_system_mint_zar_tx_request.py index 26a9de0..ab4ccf1 100644 --- a/src/zarban/service/test/test_stablecoin_system_mint_zar_tx_request.py +++ b/src/zarban/service/test/test_stablecoin_system_mint_zar_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_mint_zar_tx_request import StablecoinSystemMintZarTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_mint_zar_tx_request import StablecoinSystemMintZarTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemMintZarTxRequest(unittest.TestCase): """StablecoinSystemMintZarTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_mint_zar_tx_request.StablecoinSystemMintZarTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_mint_zar_tx_request.StablecoinSystemMintZarTxRequest() # noqa: E501 if include_optional : return StablecoinSystemMintZarTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_stablecoin_system_redo_tx_request.py b/src/zarban/service/test/test_stablecoin_system_redo_tx_request.py new file mode 100644 index 0000000..adacbda --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_redo_tx_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_redo_tx_request import StablecoinSystemRedoTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemRedoTxRequest(unittest.TestCase): + """StablecoinSystemRedoTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemRedoTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_redo_tx_request.StablecoinSystemRedoTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemRedoTxRequest( + user = '0x1234567890123456789012345678901234567890', + auction_id = 1, + ilk = 'ETHA' + ) + else : + return StablecoinSystemRedoTxRequest( + user = '0x1234567890123456789012345678901234567890', + auction_id = 1, + ilk = 'ETHA', + ) + + def testStablecoinSystemRedoTxRequest(self): + """Test StablecoinSystemRedoTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stablecoin_system_repay_zar_tx_request.py b/src/zarban/service/test/test_stablecoin_system_repay_zar_tx_request.py index 5d19a22..3d97661 100644 --- a/src/zarban/service/test/test_stablecoin_system_repay_zar_tx_request.py +++ b/src/zarban/service/test/test_stablecoin_system_repay_zar_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_repay_zar_tx_request import StablecoinSystemRepayZarTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_repay_zar_tx_request import StablecoinSystemRepayZarTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemRepayZarTxRequest(unittest.TestCase): """StablecoinSystemRepayZarTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_repay_zar_tx_request.StablecoinSystemRepayZarTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_repay_zar_tx_request.StablecoinSystemRepayZarTxRequest() # noqa: E501 if include_optional : return StablecoinSystemRepayZarTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_stablecoin_system_stats.py b/src/zarban/service/test/test_stablecoin_system_stats.py index 9748910..85ebea7 100644 --- a/src/zarban/service/test/test_stablecoin_system_stats.py +++ b/src/zarban/service/test/test_stablecoin_system_stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_stats import StablecoinSystemStats # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_stats import StablecoinSystemStats # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemStats(unittest.TestCase): """StablecoinSystemStats unit test stubs""" @@ -33,24 +34,24 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_stats.StablecoinSystemStats() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_stats.StablecoinSystemStats() # noqa: E501 if include_optional : return StablecoinSystemStats( - system_surplus = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_buffer = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_bad_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_lot_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"} + system_surplus = null, + system_debt = null, + system_debt_ceiling = null, + system_surplus_buffer = null, + system_bad_debt = null, + system_surplus_lot_size = null ) else : return StablecoinSystemStats( - system_surplus = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_buffer = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_bad_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_lot_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + system_surplus = null, + system_debt = null, + system_debt_ceiling = null, + system_surplus_buffer = null, + system_bad_debt = null, + system_surplus_lot_size = null, ) def testStablecoinSystemStats(self): diff --git a/src/zarban/service/test/test_stablecoin_system_take_tx_request.py b/src/zarban/service/test/test_stablecoin_system_take_tx_request.py new file mode 100644 index 0000000..6274379 --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_take_tx_request.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_take_tx_request import StablecoinSystemTakeTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemTakeTxRequest(unittest.TestCase): + """StablecoinSystemTakeTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemTakeTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_take_tx_request.StablecoinSystemTakeTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemTakeTxRequest( + user = '0x1234567890123456789012345678901234567890', + auction_id = 1, + ilk = 'ETHA', + collateral_amount_upper_limit = '10000000000000000000', + max_acceptable_price = '10000000000000000000' + ) + else : + return StablecoinSystemTakeTxRequest( + user = '0x1234567890123456789012345678901234567890', + auction_id = 1, + ilk = 'ETHA', + collateral_amount_upper_limit = '10000000000000000000', + max_acceptable_price = '10000000000000000000', + ) + + def testStablecoinSystemTakeTxRequest(self): + """Test StablecoinSystemTakeTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stablecoin_system_withdraw_collateral_tx_request.py b/src/zarban/service/test/test_stablecoin_system_withdraw_collateral_tx_request.py index df1f2e0..5c2b493 100644 --- a/src/zarban/service/test/test_stablecoin_system_withdraw_collateral_tx_request.py +++ b/src/zarban/service/test/test_stablecoin_system_withdraw_collateral_tx_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stablecoin_system_withdraw_collateral_tx_request import StablecoinSystemWithdrawCollateralTxRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_withdraw_collateral_tx_request import StablecoinSystemWithdrawCollateralTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStablecoinSystemWithdrawCollateralTxRequest(unittest.TestCase): """StablecoinSystemWithdrawCollateralTxRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stablecoin_system_withdraw_collateral_tx_request.StablecoinSystemWithdrawCollateralTxRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.stablecoin_system_withdraw_collateral_tx_request.StablecoinSystemWithdrawCollateralTxRequest() # noqa: E501 if include_optional : return StablecoinSystemWithdrawCollateralTxRequest( user = '0x1234567890123456789012345678901234567890', diff --git a/src/zarban/service/test/test_stablecoin_system_zarexit_tx_request.py b/src/zarban/service/test/test_stablecoin_system_zarexit_tx_request.py new file mode 100644 index 0000000..e1f97d9 --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_zarexit_tx_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_zarexit_tx_request import StablecoinSystemZarexitTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemZarexitTxRequest(unittest.TestCase): + """StablecoinSystemZarexitTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemZarexitTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_zarexit_tx_request.StablecoinSystemZarexitTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemZarexitTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000' + ) + else : + return StablecoinSystemZarexitTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000', + ) + + def testStablecoinSystemZarexitTxRequest(self): + """Test StablecoinSystemZarexitTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stablecoin_system_zarjoin_tx_request.py b/src/zarban/service/test/test_stablecoin_system_zarjoin_tx_request.py new file mode 100644 index 0000000..c7c67a3 --- /dev/null +++ b/src/zarban/service/test/test_stablecoin_system_zarjoin_tx_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stablecoin_system_zarjoin_tx_request import StablecoinSystemZarjoinTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStablecoinSystemZarjoinTxRequest(unittest.TestCase): + """StablecoinSystemZarjoinTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StablecoinSystemZarjoinTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stablecoin_system_zarjoin_tx_request.StablecoinSystemZarjoinTxRequest() # noqa: E501 + if include_optional : + return StablecoinSystemZarjoinTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000' + ) + else : + return StablecoinSystemZarjoinTxRequest( + user = '0x1234567890123456789012345678901234567890', + amount = '10000000000000000000', + ) + + def testStablecoinSystemZarjoinTxRequest(self): + """Test StablecoinSystemZarjoinTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_proxy.py b/src/zarban/service/test/test_stake_balance.py similarity index 58% rename from src/zarban/service/test/test_proxy.py rename to src/zarban/service/test/test_stake_balance.py index b8e405e..da0b258 100644 --- a/src/zarban/service/test/test_proxy.py +++ b/src/zarban/service/test/test_stake_balance.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.proxy import Proxy # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stake_balance import StakeBalance # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestProxy(unittest.TestCase): - """Proxy unit test stubs""" +class TestStakeBalance(unittest.TestCase): + """StakeBalance unit test stubs""" def setUp(self): pass @@ -29,26 +30,20 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test Proxy + """Test StakeBalance include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.proxy.Proxy() # noqa: E501 + # model = zarban.service.openapi_client.models.stake_balance.StakeBalance() # noqa: E501 if include_optional : - return Proxy( - address = 'YQ==', - owner = '0', - authority = '0' + return StakeBalance( ) else : - return Proxy( - address = 'YQ==', - owner = '0', - authority = '0', + return StakeBalance( ) - def testProxy(self): - """Test Proxy""" + def testStakeBalance(self): + """Test StakeBalance""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_stake_plan.py b/src/zarban/service/test/test_stake_plan.py new file mode 100644 index 0000000..45d8df5 --- /dev/null +++ b/src/zarban/service/test/test_stake_plan.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stake_plan import StakePlan # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakePlan(unittest.TestCase): + """StakePlan unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakePlan + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stake_plan.StakePlan() # noqa: E501 + if include_optional : + return StakePlan( + plan_name = 'Zar Staking', + contract_address = '0x1234567890123456789012345678901234567890', + apy = '0.12', + stake_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + reward_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + finish_at = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ) + ) + else : + return StakePlan( + plan_name = 'Zar Staking', + contract_address = '0x1234567890123456789012345678901234567890', + apy = '0.12', + stake_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + reward_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + finish_at = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + ) + + def testStakePlan(self): + """Test StakePlan""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stake_plans_response.py b/src/zarban/service/test/test_stake_plans_response.py new file mode 100644 index 0000000..b21e7f7 --- /dev/null +++ b/src/zarban/service/test/test_stake_plans_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stake_plans_response import StakePlansResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakePlansResponse(unittest.TestCase): + """StakePlansResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakePlansResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.stake_plans_response.StakePlansResponse() # noqa: E501 + if include_optional : + return StakePlansResponse( + data = [ + zarban.service.openapi_client.models.stake_plan.StakePlan( + plan_name = 'Zar Staking', + contract_address = '0x1234567890123456789012345678901234567890', + apy = '0.12', + stake_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + reward_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + finish_at = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ] + ) + else : + return StakePlansResponse( + data = [ + zarban.service.openapi_client.models.stake_plan.StakePlan( + plan_name = 'Zar Staking', + contract_address = '0x1234567890123456789012345678901234567890', + apy = '0.12', + stake_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + reward_token = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + finish_at = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ], + ) + + def testStakePlansResponse(self): + """Test StakePlansResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_staking_api.py b/src/zarban/service/test/test_staking_api.py new file mode 100644 index 0000000..ef7e0d5 --- /dev/null +++ b/src/zarban/service/test/test_staking_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.service.openapi_client +from zarban.service.openapi_client.api.staking_api import StakingApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + + +class TestStakingApi(unittest.TestCase): + """StakingApi unit test stubs""" + + def setUp(self): + self.api = zarban.service.openapi_client.api.staking_api.StakingApi() # noqa: E501 + + def tearDown(self): + pass + + def test_collect_staking_reward(self): + """Test case for collect_staking_reward + + Collect staking reward # noqa: E501 + """ + pass + + def test_get_staking_plans(self): + """Test case for get_staking_plans + + Get staking plans # noqa: E501 + """ + pass + + def test_get_user_staking_stats(self): + """Test case for get_user_staking_stats + + Get user staking stats # noqa: E501 + """ + pass + + def test_stake_to_staking_contract(self): + """Test case for stake_to_staking_contract + + Stake to staking contract # noqa: E501 + """ + pass + + def test_withdraw_staked_asset(self): + """Test case for withdraw_staked_asset + + Withdraw staked asset # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_staking_collect_reward_tx_request.py b/src/zarban/service/test/test_staking_collect_reward_tx_request.py new file mode 100644 index 0000000..8be499c --- /dev/null +++ b/src/zarban/service/test/test_staking_collect_reward_tx_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_collect_reward_tx_request import StakingCollectRewardTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakingCollectRewardTxRequest(unittest.TestCase): + """StakingCollectRewardTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakingCollectRewardTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.staking_collect_reward_tx_request.StakingCollectRewardTxRequest() # noqa: E501 + if include_optional : + return StakingCollectRewardTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890' + ) + else : + return StakingCollectRewardTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890', + ) + + def testStakingCollectRewardTxRequest(self): + """Test StakingCollectRewardTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_staking_collect_reward_tx_response.py b/src/zarban/service/test/test_staking_collect_reward_tx_response.py new file mode 100644 index 0000000..57c4496 --- /dev/null +++ b/src/zarban/service/test/test_staking_collect_reward_tx_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_collect_reward_tx_response import StakingCollectRewardTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakingCollectRewardTxResponse(unittest.TestCase): + """StakingCollectRewardTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakingCollectRewardTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.staking_collect_reward_tx_response.StakingCollectRewardTxResponse() # noqa: E501 + if include_optional : + return StakingCollectRewardTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ) + ) + else : + return StakingCollectRewardTxResponse( + ) + + def testStakingCollectRewardTxResponse(self): + """Test StakingCollectRewardTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_staking_stake_tx_request.py b/src/zarban/service/test/test_staking_stake_tx_request.py new file mode 100644 index 0000000..5e164dc --- /dev/null +++ b/src/zarban/service/test/test_staking_stake_tx_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_stake_tx_request import StakingStakeTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakingStakeTxRequest(unittest.TestCase): + """StakingStakeTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakingStakeTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.staking_stake_tx_request.StakingStakeTxRequest() # noqa: E501 + if include_optional : + return StakingStakeTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890', + amount = '1000000000000000000' + ) + else : + return StakingStakeTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890', + ) + + def testStakingStakeTxRequest(self): + """Test StakingStakeTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_inline_response200.py b/src/zarban/service/test/test_staking_stake_tx_response.py similarity index 53% rename from src/zarban/service/test/test_inline_response200.py rename to src/zarban/service/test/test_staking_stake_tx_response.py index 332b6d9..c661329 100644 --- a/src/zarban/service/test/test_inline_response200.py +++ b/src/zarban/service/test/test_staking_stake_tx_response.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_response200 import InlineResponse200 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_stake_tx_response import StakingStakeTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" +class TestStakingStakeTxResponse(unittest.TestCase): + """StakingStakeTxResponse unit test stubs""" def setUp(self): pass @@ -29,30 +30,28 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineResponse200 + """Test StakingStakeTxResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_response200.InlineResponse200() # noqa: E501 + # model = zarban.service.openapi_client.models.staking_stake_tx_response.StakingStakeTxResponse() # noqa: E501 if include_optional : - return InlineResponse200( - chain_activity = openapi_client.models.chain_activity.ChainActivity( + return StakingStakeTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( step_number = 56, number_of_steps = 56, steps = [ - openapi_client.models.chain_activity_step.ChainActivityStep( + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( type = 'PreparedTx', data = null, ) - ], ), - response = openapi_client.models.lendingpool_tx_response.LendingpoolTxResponse( - next_health_factor = '1.2', ) + ], ) ) else : - return InlineResponse200( + return StakingStakeTxResponse( ) - def testInlineResponse200(self): - """Test InlineResponse200""" + def testStakingStakeTxResponse(self): + """Test StakingStakeTxResponse""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_staking_withdraw_tx_request.py b/src/zarban/service/test/test_staking_withdraw_tx_request.py new file mode 100644 index 0000000..a670cb3 --- /dev/null +++ b/src/zarban/service/test/test_staking_withdraw_tx_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_withdraw_tx_request import StakingWithdrawTxRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakingWithdrawTxRequest(unittest.TestCase): + """StakingWithdrawTxRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakingWithdrawTxRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.staking_withdraw_tx_request.StakingWithdrawTxRequest() # noqa: E501 + if include_optional : + return StakingWithdrawTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890', + amount = '1000000000000000000' + ) + else : + return StakingWithdrawTxRequest( + user = '0x1234567890123456789012345678901234567890', + contract_address = '0x1234567890123456789012345678901234567890', + ) + + def testStakingWithdrawTxRequest(self): + """Test StakingWithdrawTxRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_staking_withdraw_tx_response.py b/src/zarban/service/test/test_staking_withdraw_tx_response.py new file mode 100644 index 0000000..8c060db --- /dev/null +++ b/src/zarban/service/test/test_staking_withdraw_tx_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.staking_withdraw_tx_response import StakingWithdrawTxResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestStakingWithdrawTxResponse(unittest.TestCase): + """StakingWithdrawTxResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StakingWithdrawTxResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.staking_withdraw_tx_response.StakingWithdrawTxResponse() # noqa: E501 + if include_optional : + return StakingWithdrawTxResponse( + chain_activity = zarban.service.openapi_client.models.chain_activity.ChainActivity( + step_number = 56, + number_of_steps = 56, + steps = [ + zarban.service.openapi_client.models.chain_activity_step.ChainActivityStep( + type = 'PreparedTx', + data = null, ) + ], ) + ) + else : + return StakingWithdrawTxResponse( + ) + + def testStakingWithdrawTxResponse(self): + """Test StakingWithdrawTxResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_stats.py b/src/zarban/service/test/test_stats.py index e83710c..53c0519 100644 --- a/src/zarban/service/test/test_stats.py +++ b/src/zarban/service/test/test_stats.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.stats import Stats # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.stats import Stats # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestStats(unittest.TestCase): """Stats unit test stubs""" @@ -33,34 +34,34 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.stats.Stats() # noqa: E501 + # model = zarban.service.openapi_client.models.stats.Stats() # noqa: E501 if include_optional : return Stats( - stablecoin_system = openapi_client.models.stablecoin_system_stats.StablecoinSystemStats( - system_surplus = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_buffer = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_bad_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_lot_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), - lendingpool = openapi_client.models.lendingpool_stats.LendingpoolStats( - total_available = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_borrows = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_market_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + stablecoin_system = zarban.service.openapi_client.models.stablecoin_system_stats.StablecoinSystemStats( + system_surplus = null, + system_debt = null, + system_debt_ceiling = null, + system_surplus_buffer = null, + system_bad_debt = null, + system_surplus_lot_size = null, ), + lendingpool = zarban.service.openapi_client.models.lendingpool_stats.LendingpoolStats( + total_available = null, + total_borrows = null, + total_market_size = null, ) ) else : return Stats( - stablecoin_system = openapi_client.models.stablecoin_system_stats.StablecoinSystemStats( - system_surplus = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_buffer = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_bad_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - system_surplus_lot_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), - lendingpool = openapi_client.models.lendingpool_stats.LendingpoolStats( - total_available = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_borrows = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - total_market_size = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), + stablecoin_system = zarban.service.openapi_client.models.stablecoin_system_stats.StablecoinSystemStats( + system_surplus = null, + system_debt = null, + system_debt_ceiling = null, + system_surplus_buffer = null, + system_bad_debt = null, + system_surplus_lot_size = null, ), + lendingpool = zarban.service.openapi_client.models.lendingpool_stats.LendingpoolStats( + total_available = null, + total_borrows = null, + total_market_size = null, ), ) def testStats(self): diff --git a/src/zarban/service/test/test_swap_api.py b/src/zarban/service/test/test_swap_api.py index 0f3d7c7..8406cdd 100644 --- a/src/zarban/service/test/test_swap_api.py +++ b/src/zarban/service/test/test_swap_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.swap_api import SwapApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.swap_api import SwapApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestSwapApi(unittest.TestCase): """SwapApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.swap_api.SwapApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.swap_api.SwapApi() # noqa: E501 def tearDown(self): pass - def test_swap_quote_post(self): - """Test case for swap_quote_post + def test_get_swap_quote(self): + """Test case for get_swap_quote Get a quote for a swap # noqa: E501 """ diff --git a/src/zarban/service/test/test_symbol.py b/src/zarban/service/test/test_symbol.py index 3acff08..f31a328 100644 --- a/src/zarban/service/test/test_symbol.py +++ b/src/zarban/service/test/test_symbol.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.symbol import Symbol # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.symbol import Symbol # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestSymbol(unittest.TestCase): """Symbol unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.symbol.Symbol() # noqa: E501 + # model = zarban.service.openapi_client.models.symbol.Symbol() # noqa: E501 if include_optional : return Symbol( ) diff --git a/src/zarban/service/test/test_extended_event_all_of.py b/src/zarban/service/test/test_system_bad_debt.py similarity index 57% rename from src/zarban/service/test/test_extended_event_all_of.py rename to src/zarban/service/test/test_system_bad_debt.py index 6127027..20fb6f1 100644 --- a/src/zarban/service/test/test_extended_event_all_of.py +++ b/src/zarban/service/test/test_system_bad_debt.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.extended_event_all_of import ExtendedEventAllOf # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_bad_debt import SystemBadDebt # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestExtendedEventAllOf(unittest.TestCase): - """ExtendedEventAllOf unit test stubs""" +class TestSystemBadDebt(unittest.TestCase): + """SystemBadDebt unit test stubs""" def setUp(self): pass @@ -29,22 +30,20 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test ExtendedEventAllOf + """Test SystemBadDebt include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.extended_event_all_of.ExtendedEventAllOf() # noqa: E501 + # model = zarban.service.openapi_client.models.system_bad_debt.SystemBadDebt() # noqa: E501 if include_optional : - return ExtendedEventAllOf( - payload = None + return SystemBadDebt( ) else : - return ExtendedEventAllOf( - payload = None, + return SystemBadDebt( ) - def testExtendedEventAllOf(self): - """Test ExtendedEventAllOf""" + def testSystemBadDebt(self): + """Test SystemBadDebt""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_system_debt.py b/src/zarban/service/test/test_system_debt.py new file mode 100644 index 0000000..46e16f6 --- /dev/null +++ b/src/zarban/service/test/test_system_debt.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_debt import SystemDebt # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestSystemDebt(unittest.TestCase): + """SystemDebt unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SystemDebt + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.system_debt.SystemDebt() # noqa: E501 + if include_optional : + return SystemDebt( + ) + else : + return SystemDebt( + ) + + def testSystemDebt(self): + """Test SystemDebt""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_system_debt_ceiling.py b/src/zarban/service/test/test_system_debt_ceiling.py new file mode 100644 index 0000000..3e04123 --- /dev/null +++ b/src/zarban/service/test/test_system_debt_ceiling.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_debt_ceiling import SystemDebtCeiling # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestSystemDebtCeiling(unittest.TestCase): + """SystemDebtCeiling unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SystemDebtCeiling + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.system_debt_ceiling.SystemDebtCeiling() # noqa: E501 + if include_optional : + return SystemDebtCeiling( + ) + else : + return SystemDebtCeiling( + ) + + def testSystemDebtCeiling(self): + """Test SystemDebtCeiling""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_system_surplus.py b/src/zarban/service/test/test_system_surplus.py new file mode 100644 index 0000000..f6f2ff1 --- /dev/null +++ b/src/zarban/service/test/test_system_surplus.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_surplus import SystemSurplus # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestSystemSurplus(unittest.TestCase): + """SystemSurplus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SystemSurplus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.system_surplus.SystemSurplus() # noqa: E501 + if include_optional : + return SystemSurplus( + ) + else : + return SystemSurplus( + ) + + def testSystemSurplus(self): + """Test SystemSurplus""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_permit_details.py b/src/zarban/service/test/test_system_surplus_buffer.py similarity index 52% rename from src/zarban/service/test/test_permit_details.py rename to src/zarban/service/test/test_system_surplus_buffer.py index 6dc5e3e..c8193aa 100644 --- a/src/zarban/service/test/test_permit_details.py +++ b/src/zarban/service/test/test_system_surplus_buffer.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.permit_details import PermitDetails # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_surplus_buffer import SystemSurplusBuffer # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestPermitDetails(unittest.TestCase): - """PermitDetails unit test stubs""" +class TestSystemSurplusBuffer(unittest.TestCase): + """SystemSurplusBuffer unit test stubs""" def setUp(self): pass @@ -29,28 +30,20 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test PermitDetails + """Test SystemSurplusBuffer include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.permit_details.PermitDetails() # noqa: E501 + # model = zarban.service.openapi_client.models.system_surplus_buffer.SystemSurplusBuffer() # noqa: E501 if include_optional : - return PermitDetails( - token = 'a', - amount = '0', - expiration = 56, - nonce = '0' + return SystemSurplusBuffer( ) else : - return PermitDetails( - token = 'a', - amount = '0', - expiration = 56, - nonce = '0', + return SystemSurplusBuffer( ) - def testPermitDetails(self): - """Test PermitDetails""" + def testSystemSurplusBuffer(self): + """Test SystemSurplusBuffer""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_system_surplus_lot_size.py b/src/zarban/service/test/test_system_surplus_lot_size.py new file mode 100644 index 0000000..692221c --- /dev/null +++ b/src/zarban/service/test/test_system_surplus_lot_size.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.system_surplus_lot_size import SystemSurplusLotSize # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestSystemSurplusLotSize(unittest.TestCase): + """SystemSurplusLotSize unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SystemSurplusLotSize + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.system_surplus_lot_size.SystemSurplusLotSize() # noqa: E501 + if include_optional : + return SystemSurplusLotSize( + ) + else : + return SystemSurplusLotSize( + ) + + def testSystemSurplusLotSize(self): + """Test SystemSurplusLotSize""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_time_range.py b/src/zarban/service/test/test_time_range.py index 8dd20a1..6ab2ce3 100644 --- a/src/zarban/service/test/test_time_range.py +++ b/src/zarban/service/test/test_time_range.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.time_range import TimeRange # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.time_range import TimeRange # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestTimeRange(unittest.TestCase): """TimeRange unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.time_range.TimeRange() # noqa: E501 + # model = zarban.service.openapi_client.models.time_range.TimeRange() # noqa: E501 if include_optional : return TimeRange( _from = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/src/zarban/service/test/test_timestamp.py b/src/zarban/service/test/test_timestamp.py index eb78f4c..5d3c230 100644 --- a/src/zarban/service/test/test_timestamp.py +++ b/src/zarban/service/test/test_timestamp.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.timestamp import Timestamp # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.timestamp import Timestamp # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestTimestamp(unittest.TestCase): """Timestamp unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.timestamp.Timestamp() # noqa: E501 + # model = zarban.service.openapi_client.models.timestamp.Timestamp() # noqa: E501 if include_optional : return Timestamp( jalaali = '1399-01-01T00:00:00Z', diff --git a/src/zarban/service/test/test_token.py b/src/zarban/service/test/test_token.py index 58c1a72..1b9f715 100644 --- a/src/zarban/service/test/test_token.py +++ b/src/zarban/service/test/test_token.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.token import Token # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.token import Token # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestToken(unittest.TestCase): """Token unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.token.Token() # noqa: E501 + # model = zarban.service.openapi_client.models.token.Token() # noqa: E501 if include_optional : return Token( name = 'Zar Stablecoin', diff --git a/src/zarban/service/test/test_trade_type.py b/src/zarban/service/test/test_trade_type.py index 92ed972..03f69db 100644 --- a/src/zarban/service/test/test_trade_type.py +++ b/src/zarban/service/test/test_trade_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.trade_type import TradeType # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.trade_type import TradeType # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestTradeType(unittest.TestCase): """TradeType unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.trade_type.TradeType() # noqa: E501 + # model = zarban.service.openapi_client.models.trade_type.TradeType() # noqa: E501 if include_optional : return TradeType( ) diff --git a/src/zarban/service/test/test_type.py b/src/zarban/service/test/test_type.py index 172eaaf..b580559 100644 --- a/src/zarban/service/test/test_type.py +++ b/src/zarban/service/test/test_type.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.type import Type # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.type import Type # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestType(unittest.TestCase): """Type unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.type.Type() # noqa: E501 + # model = zarban.service.openapi_client.models.type.Type() # noqa: E501 if include_optional : return Type( name = '0', diff --git a/src/zarban/service/test/test_typed_data.py b/src/zarban/service/test/test_typed_data.py index 9f2e8fe..712b251 100644 --- a/src/zarban/service/test/test_typed_data.py +++ b/src/zarban/service/test/test_typed_data.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.typed_data import TypedData # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.typed_data import TypedData # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestTypedData(unittest.TestCase): """TypedData unit test stubs""" @@ -33,18 +34,18 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.typed_data.TypedData() # noqa: E501 + # model = zarban.service.openapi_client.models.typed_data.TypedData() # noqa: E501 if include_optional : return TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', @@ -56,13 +57,13 @@ def make_instance(self, include_optional): return TypedData( types = { 'key' : [ - openapi_client.models.type.Type( + zarban.service.openapi_client.models.type.Type( name = '0', type = '0', ) ] }, primary_type = '0', - domain = openapi_client.models.typed_data_domain.TypedDataDomain( + domain = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain( name = '0', version = '0', chain_id = '0', diff --git a/src/zarban/service/test/test_typed_data_domain.py b/src/zarban/service/test/test_typed_data_domain.py index c6f62fc..dcadbee 100644 --- a/src/zarban/service/test/test_typed_data_domain.py +++ b/src/zarban/service/test/test_typed_data_domain.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.typed_data_domain import TypedDataDomain # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.typed_data_domain import TypedDataDomain # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestTypedDataDomain(unittest.TestCase): """TypedDataDomain unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.typed_data_domain.TypedDataDomain() # noqa: E501 + # model = zarban.service.openapi_client.models.typed_data_domain.TypedDataDomain() # noqa: E501 if include_optional : return TypedDataDomain( name = '0', diff --git a/src/zarban/service/test/test_unclaimed_reward.py b/src/zarban/service/test/test_unclaimed_reward.py new file mode 100644 index 0000000..9ef50e4 --- /dev/null +++ b/src/zarban/service/test/test_unclaimed_reward.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.unclaimed_reward import UnclaimedReward # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestUnclaimedReward(unittest.TestCase): + """UnclaimedReward unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UnclaimedReward + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.unclaimed_reward.UnclaimedReward() # noqa: E501 + if include_optional : + return UnclaimedReward( + ) + else : + return UnclaimedReward( + ) + + def testUnclaimedReward(self): + """Test UnclaimedReward""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_update_order_request.py b/src/zarban/service/test/test_update_order_request.py index 3c89ba5..19c13a8 100644 --- a/src/zarban/service/test/test_update_order_request.py +++ b/src/zarban/service/test/test_update_order_request.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.update_order_request import UpdateOrderRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.update_order_request import UpdateOrderRequest # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestUpdateOrderRequest(unittest.TestCase): """UpdateOrderRequest unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.update_order_request.UpdateOrderRequest() # noqa: E501 + # model = zarban.service.openapi_client.models.update_order_request.UpdateOrderRequest() # noqa: E501 if include_optional : return UpdateOrderRequest( order_hash = 'a' diff --git a/src/zarban/service/test/test_user_borrows_response.py b/src/zarban/service/test/test_user_borrows_response.py new file mode 100644 index 0000000..941f7da --- /dev/null +++ b/src/zarban/service/test/test_user_borrows_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.user_borrows_response import UserBorrowsResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestUserBorrowsResponse(unittest.TestCase): + """UserBorrowsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserBorrowsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.user_borrows_response.UserBorrowsResponse() # noqa: E501 + if include_optional : + return UserBorrowsResponse( + data = [ + zarban.service.openapi_client.models.lendingpool_borrow.LendingpoolBorrow( + user = '0', + underlying_asset = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + borrow_rate = '0', + max_borrow_amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + ] + ) + else : + return UserBorrowsResponse( + data = [ + zarban.service.openapi_client.models.lendingpool_borrow.LendingpoolBorrow( + user = '0', + underlying_asset = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + borrow_rate = '0', + max_borrow_amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + ], + ) + + def testUserBorrowsResponse(self): + """Test UserBorrowsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_user_deposits_response.py b/src/zarban/service/test/test_user_deposits_response.py new file mode 100644 index 0000000..444e960 --- /dev/null +++ b/src/zarban/service/test/test_user_deposits_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.user_deposits_response import UserDepositsResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestUserDepositsResponse(unittest.TestCase): + """UserDepositsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserDepositsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.user_deposits_response.UserDepositsResponse() # noqa: E501 + if include_optional : + return UserDepositsResponse( + data = [ + zarban.service.openapi_client.models.lendingpool_deposit.LendingpoolDeposit( + user = '0', + underlying_asset = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + usage_as_collateral_enabled_on_user = True, + supply_apy = '0', ) + ] + ) + else : + return UserDepositsResponse( + data = [ + zarban.service.openapi_client.models.lendingpool_deposit.LendingpoolDeposit( + user = '0', + underlying_asset = zarban.service.openapi_client.models.token.Token( + name = 'Zar Stablecoin', + symbol = 'USD', + decimals = 18, + address = '0x1234567890123456789012345678901234567890', + logo_uri = '/assets/logos/dai.svg', + chain_id = 1, + persian_name = 'زر', ), + amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + usage_as_collateral_enabled_on_user = True, + supply_apy = '0', ) + ], + ) + + def testUserDepositsResponse(self): + """Test UserDepositsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_better_error.py b/src/zarban/service/test/test_user_error.py similarity index 65% rename from src/zarban/service/test/test_better_error.py rename to src/zarban/service/test/test_user_error.py index d8354cb..c5eced6 100644 --- a/src/zarban/service/test/test_better_error.py +++ b/src/zarban/service/test/test_user_error.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.better_error import BetterError # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.user_error import UserError # noqa: E501 +from zarban.service.openapi_client.rest import ApiException -class TestBetterError(unittest.TestCase): - """BetterError unit test stubs""" +class TestUserError(unittest.TestCase): + """UserError unit test stubs""" def setUp(self): pass @@ -29,15 +30,15 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test BetterError + """Test UserError include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.better_error.BetterError() # noqa: E501 + # model = zarban.service.openapi_client.models.user_error.UserError() # noqa: E501 if include_optional : - return BetterError( + return UserError( messages = { - 'key' : openapi_client.models.better_error_messages.BetterError_messages( + 'key' : zarban.service.openapi_client.models.error_message.ErrorMessage( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' @@ -48,18 +49,21 @@ def make_instance(self, include_optional): ] ) else : - return BetterError( + return UserError( messages = { - 'key' : openapi_client.models.better_error_messages.BetterError_messages( + 'key' : zarban.service.openapi_client.models.error_message.ErrorMessage( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' ], ) }, + reasons = [ + 'Invalid address' + ], ) - def testBetterError(self): - """Test BetterError""" + def testUserError(self): + """Test UserError""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/service/test/test_user_stake.py b/src/zarban/service/test/test_user_stake.py new file mode 100644 index 0000000..9e9f337 --- /dev/null +++ b/src/zarban/service/test/test_user_stake.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.user_stake import UserStake # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestUserStake(unittest.TestCase): + """UserStake unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserStake + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.user_stake.UserStake() # noqa: E501 + if include_optional : + return UserStake( + user = '0x1234567890123456789012345678901234567890', + balance = null, + unclaimed_reward = null, + contract_address = '0x1234567890123456789012345678901234567890', + plan_name = 'Zar Staking' + ) + else : + return UserStake( + user = '0x1234567890123456789012345678901234567890', + balance = null, + unclaimed_reward = null, + contract_address = '0x1234567890123456789012345678901234567890', + plan_name = 'Zar Staking', + ) + + def testUserStake(self): + """Test UserStake""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_user_stakes_response.py b/src/zarban/service/test/test_user_stakes_response.py new file mode 100644 index 0000000..6c1ea1c --- /dev/null +++ b/src/zarban/service/test/test_user_stakes_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.user_stakes_response import UserStakesResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestUserStakesResponse(unittest.TestCase): + """UserStakesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserStakesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.user_stakes_response.UserStakesResponse() # noqa: E501 + if include_optional : + return UserStakesResponse( + data = [ + zarban.service.openapi_client.models.user_stake.UserStake( + user = '0x1234567890123456789012345678901234567890', + balance = null, + unclaimed_reward = null, + contract_address = '0x1234567890123456789012345678901234567890', + plan_name = 'Zar Staking', ) + ] + ) + else : + return UserStakesResponse( + data = [ + zarban.service.openapi_client.models.user_stake.UserStake( + user = '0x1234567890123456789012345678901234567890', + balance = null, + unclaimed_reward = null, + contract_address = '0x1234567890123456789012345678901234567890', + plan_name = 'Zar Staking', ) + ], + ) + + def testUserStakesResponse(self): + """Test UserStakesResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_v3_pool_in_route.py b/src/zarban/service/test/test_v3_pool_in_route.py index ebebd38..85af387 100644 --- a/src/zarban/service/test/test_v3_pool_in_route.py +++ b/src/zarban/service/test/test_v3_pool_in_route.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.v3_pool_in_route import V3PoolInRoute # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.v3_pool_in_route import V3PoolInRoute # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestV3PoolInRoute(unittest.TestCase): """V3PoolInRoute unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.v3_pool_in_route.V3PoolInRoute() # noqa: E501 + # model = zarban.service.openapi_client.models.v3_pool_in_route.V3PoolInRoute() # noqa: E501 if include_optional : return V3PoolInRoute( address = 'a', - token_in = openapi_client.models.token.Token( + token_in = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -45,7 +46,7 @@ def make_instance(self, include_optional): logo_uri = '/assets/logos/dai.svg', chain_id = 1, persian_name = 'زر', ), - token_out = openapi_client.models.token.Token( + token_out = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -58,7 +59,7 @@ def make_instance(self, include_optional): else : return V3PoolInRoute( address = 'a', - token_in = openapi_client.models.token.Token( + token_in = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -66,7 +67,7 @@ def make_instance(self, include_optional): logo_uri = '/assets/logos/dai.svg', chain_id = 1, persian_name = 'زر', ), - token_out = openapi_client.models.token.Token( + token_out = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_vault.py b/src/zarban/service/test/test_vault.py index e2acebf..3808756 100644 --- a/src/zarban/service/test/test_vault.py +++ b/src/zarban/service/test/test_vault.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.vault import Vault # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vault import Vault # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestVault(unittest.TestCase): """Vault unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.vault.Vault() # noqa: E501 + # model = zarban.service.openapi_client.models.vault.Vault() # noqa: E501 if include_optional : return Vault( id = 1, @@ -46,7 +47,7 @@ def make_instance(self, include_optional): debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, available_to_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, available_to_mint = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - ilk = openapi_client.models.ilk.Ilk( + ilk = zarban.service.openapi_client.models.ilk.Ilk( name = '0', symbol = 'USD', minimum_collateralization_ratio = '0', @@ -79,7 +80,7 @@ def make_instance(self, include_optional): debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, available_to_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, available_to_mint = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - ilk = openapi_client.models.ilk.Ilk( + ilk = zarban.service.openapi_client.models.ilk.Ilk( name = '0', symbol = 'USD', minimum_collateralization_ratio = '0', diff --git a/src/zarban/service/test/test_vault_event.py b/src/zarban/service/test/test_vault_event.py index d326616..e000a6a 100644 --- a/src/zarban/service/test/test_vault_event.py +++ b/src/zarban/service/test/test_vault_event.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.vault_event import VaultEvent # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vault_event import VaultEvent # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestVaultEvent(unittest.TestCase): """VaultEvent unit test stubs""" @@ -33,12 +34,12 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.vault_event.VaultEvent() # noqa: E501 + # model = zarban.service.openapi_client.models.vault_event.VaultEvent() # noqa: E501 if include_optional : return VaultEvent( delta_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, delta_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - ilk = openapi_client.models.ilk.Ilk( + ilk = zarban.service.openapi_client.models.ilk.Ilk( name = '0', symbol = 'USD', minimum_collateralization_ratio = '0', @@ -63,7 +64,7 @@ def make_instance(self, include_optional): return VaultEvent( delta_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, delta_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - ilk = openapi_client.models.ilk.Ilk( + ilk = zarban.service.openapi_client.models.ilk.Ilk( name = '0', symbol = 'USD', minimum_collateralization_ratio = '0', diff --git a/src/zarban/service/test/test_vault_event_extension.py b/src/zarban/service/test/test_vault_event_extension.py new file mode 100644 index 0000000..f419890 --- /dev/null +++ b/src/zarban/service/test/test_vault_event_extension.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vault_event_extension import VaultEventExtension # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestVaultEventExtension(unittest.TestCase): + """VaultEventExtension unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VaultEventExtension + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.vault_event_extension.VaultEventExtension() # noqa: E501 + if include_optional : + return VaultEventExtension( + payload = zarban.service.openapi_client.models.vault_event.VaultEvent( + delta_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + delta_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + ilk = zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), ) + ) + else : + return VaultEventExtension( + ) + + def testVaultEventExtension(self): + """Test VaultEventExtension""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_vault_event_item.py b/src/zarban/service/test/test_vault_event_item.py new file mode 100644 index 0000000..34735cd --- /dev/null +++ b/src/zarban/service/test/test_vault_event_item.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vault_event_item import VaultEventItem # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestVaultEventItem(unittest.TestCase): + """VaultEventItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VaultEventItem + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.vault_event_item.VaultEventItem() # noqa: E501 + if include_optional : + return VaultEventItem( + id = 1, + name = 'VaultRepay', + type = 'executive', + domain = 'stableCoinSystem', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + payload = zarban.service.openapi_client.models.vault_event.VaultEvent( + delta_collateral = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + delta_debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + ilk = zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), ) + ) + else : + return VaultEventItem( + id = 1, + name = 'VaultRepay', + type = 'executive', + domain = 'stableCoinSystem', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + ) + + def testVaultEventItem(self): + """Test VaultEventItem""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_vault_events_response.py b/src/zarban/service/test/test_vault_events_response.py new file mode 100644 index 0000000..29c6aa6 --- /dev/null +++ b/src/zarban/service/test/test_vault_events_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vault_events_response import VaultEventsResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestVaultEventsResponse(unittest.TestCase): + """VaultEventsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VaultEventsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.vault_events_response.VaultEventsResponse() # noqa: E501 + if include_optional : + return VaultEventsResponse( + data = [ + zarban.service.openapi_client.models.extended_event.ExtendedEvent( + domain = 'stableCoinSystem', + id = 56, + name = 'VaultRepay', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + type = 'executive', + payload = { }, ) + ] + ) + else : + return VaultEventsResponse( + data = [ + zarban.service.openapi_client.models.extended_event.ExtendedEvent( + domain = 'stableCoinSystem', + id = 56, + name = 'VaultRepay', + raw = zarban.service.openapi_client.models.log.Log( + name = '0', + contract = '0', + timestamp = zarban.service.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + address = '0', + block_number = 56, + tx_hash = '0', + block_hash = '0', + index = 56, + topics = [ + '0x1234567890abcdef1234567abcdef' + ], + data = '0x1234567890abcdef1234567abcdef', + decoded = { + 'key' : '0x1234567890abcdef1234567abcdef' + }, ), + type = 'executive', + payload = { }, ) + ], + ) + + def testVaultEventsResponse(self): + """Test VaultEventsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_vaults_api.py b/src/zarban/service/test/test_vaults_api.py index 8bd3a8a..26d379d 100644 --- a/src/zarban/service/test/test_vaults_api.py +++ b/src/zarban/service/test/test_vaults_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,38 +15,38 @@ import unittest -import openapi_client -from openapi_client.api.vaults_api import VaultsApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.vaults_api import VaultsApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestVaultsApi(unittest.TestCase): """VaultsApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.vaults_api.VaultsApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.vaults_api.VaultsApi() # noqa: E501 def tearDown(self): pass - def test_vaults_get(self): - """Test case for vaults_get + def test_get_vault_by_id(self): + """Test case for get_vault_by_id - Get vaults by owner query # noqa: E501 + Get a vault by ID # noqa: E501 """ pass - def test_vaults_id_events_get(self): - """Test case for vaults_id_events_get + def test_get_vault_events_by_id(self): + """Test case for get_vault_events_by_id Get vault events by ID # noqa: E501 """ pass - def test_vaults_id_get(self): - """Test case for vaults_id_get + def test_get_vaults_by_owner(self): + """Test case for get_vaults_by_owner - Get a vault by ID # noqa: E501 + Get vaults by owner query # noqa: E501 """ pass diff --git a/src/zarban/service/test/test_vaults_response.py b/src/zarban/service/test/test_vaults_response.py new file mode 100644 index 0000000..f3b1a9b --- /dev/null +++ b/src/zarban/service/test/test_vaults_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zarban API + + API for Zarban services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.service.openapi_client +from zarban.service.openapi_client.models.vaults_response import VaultsResponse # noqa: E501 +from zarban.service.openapi_client.rest import ApiException + +class TestVaultsResponse(unittest.TestCase): + """VaultsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VaultsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.service.openapi_client.models.vaults_response.VaultsResponse() # noqa: E501 + if include_optional : + return VaultsResponse( + data = [ + zarban.service.openapi_client.models.vault.Vault( + id = 1, + owner = '0x1234567890123456789012345678901234567890', + urn = '0x1234567890123456789012345678901234567890', + liquidation_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + collateral_locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_mint = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + ilk = zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), ) + ] + ) + else : + return VaultsResponse( + data = [ + zarban.service.openapi_client.models.vault.Vault( + id = 1, + owner = '0x1234567890123456789012345678901234567890', + urn = '0x1234567890123456789012345678901234567890', + liquidation_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + collateral_locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_mint = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + ilk = zarban.service.openapi_client.models.ilk.Ilk( + name = '0', + symbol = 'USD', + minimum_collateralization_ratio = '0', + maximum_loan_to_value = '0', + liquidation_penalty = '0', + debt_ceiling = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + debt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + annual_stability_fee = '0', + dust_limit = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + next_price = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + join = '0', + median = '0', + gem = '0', + clipper = '0', + pip = '0', + hole = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + dirt = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + available_to_borrow = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ), ) + ], + ) + + def testVaultsResponse(self): + """Test VaultsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/service/test/test_wallet_balance.py b/src/zarban/service/test/test_wallet_balance.py index 2938eb4..79a4fba 100644 --- a/src/zarban/service/test/test_wallet_balance.py +++ b/src/zarban/service/test/test_wallet_balance.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.wallet_balance import WalletBalance # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.models.wallet_balance import WalletBalance # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestWalletBalance(unittest.TestCase): """WalletBalance unit test stubs""" @@ -33,12 +34,12 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.wallet_balance.WalletBalance() # noqa: E501 + # model = zarban.service.openapi_client.models.wallet_balance.WalletBalance() # noqa: E501 if include_optional : return WalletBalance( balances = [ - openapi_client.models.balance.Balance( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.balance.Balance( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, @@ -52,8 +53,8 @@ def make_instance(self, include_optional): else : return WalletBalance( balances = [ - openapi_client.models.balance.Balance( - token = openapi_client.models.token.Token( + zarban.service.openapi_client.models.balance.Balance( + token = zarban.service.openapi_client.models.token.Token( name = 'Zar Stablecoin', symbol = 'USD', decimals = 18, diff --git a/src/zarban/service/test/test_websocket_api.py b/src/zarban/service/test/test_websocket_api.py index badfa25..8f6748c 100644 --- a/src/zarban/service/test/test_websocket_api.py +++ b/src/zarban/service/test/test_websocket_api.py @@ -6,6 +6,7 @@ API for Zarban services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -14,22 +15,22 @@ import unittest -import openapi_client -from openapi_client.api.websocket_api import WebsocketApi # noqa: E501 -from openapi_client.rest import ApiException +import zarban.service.openapi_client +from zarban.service.openapi_client.api.websocket_api import WebsocketApi # noqa: E501 +from zarban.service.openapi_client.rest import ApiException class TestWebsocketApi(unittest.TestCase): """WebsocketApi unit test stubs""" def setUp(self): - self.api = openapi_client.api.websocket_api.WebsocketApi() # noqa: E501 + self.api = zarban.service.openapi_client.api.websocket_api.WebsocketApi() # noqa: E501 def tearDown(self): pass - def test_ws_get(self): - """Test case for ws_get + def test_get_unfilled_orders_websocket(self): + """Test case for get_unfilled_orders_websocket Websocket Upgrade # noqa: E501 """ diff --git a/src/zarban/service/docs/BetterError.md b/src/zarban/wallet/docs/AdminRedemptionUpdateRequest.md similarity index 62% rename from src/zarban/service/docs/BetterError.md rename to src/zarban/wallet/docs/AdminRedemptionUpdateRequest.md index 0204b0c..96b16ab 100644 --- a/src/zarban/service/docs/BetterError.md +++ b/src/zarban/wallet/docs/AdminRedemptionUpdateRequest.md @@ -1,10 +1,10 @@ -# BetterError +# AdminRedemptionUpdateRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**messages** | [**dict(str, BetterErrorMessages)**](BetterErrorMessages.md) | Localized error messages | -**reasons** | **list[str]** | | [optional] +**status** | **str** | The status of the redemption request | +**paya_tracking_code** | **str** | The Paya tracking code | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/AuthApi.md b/src/zarban/wallet/docs/AuthApi.md new file mode 100644 index 0000000..ad3271d --- /dev/null +++ b/src/zarban/wallet/docs/AuthApi.md @@ -0,0 +1,424 @@ +# zarban.wallet.openapi_client.AuthApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**authenticate_with_telegram**](AuthApi.md#authenticate_with_telegram) | **POST** /auth/telegram | Authenticate with Telegram +[**generate_jwt_token**](AuthApi.md#generate_jwt_token) | **GET** /auth/token | Generate a JWT token +[**get_otp**](AuthApi.md#get_otp) | **GET** /auth/otp | Get OTP +[**login_with_email_and_password**](AuthApi.md#login_with_email_and_password) | **POST** /auth/login | Login with email and password +[**signup_with_email_and_password**](AuthApi.md#signup_with_email_and_password) | **POST** /auth/signup | signup with email and password +[**verify_user_email**](AuthApi.md#verify_user_email) | **GET** /verify-email | Verify email + + +# **authenticate_with_telegram** +> JwtResponse authenticate_with_telegram(auth_telegram_request) + +Authenticate with Telegram + +Authenticate with Telegram and get a JWT token. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + auth_telegram_request = zarban.wallet.openapi_client.AuthTelegramRequest() # AuthTelegramRequest | + + try: + # Authenticate with Telegram + api_response = api_instance.authenticate_with_telegram(auth_telegram_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->authenticate_with_telegram: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auth_telegram_request** | [**AuthTelegramRequest**](AuthTelegramRequest.md)| | + +### Return type + +[**JwtResponse**](JwtResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **generate_jwt_token** +> JwtResponse generate_jwt_token(duration) + +Generate a JWT token + +Generate a JWT token. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + duration = 56 # int | Token duration in days + + try: + # Generate a JWT token + api_response = api_instance.generate_jwt_token(duration) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->generate_jwt_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **duration** | **int**| Token duration in days | + +### Return type + +[**JwtResponse**](JwtResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_otp** +> SimpleResponse get_otp(channel) + +Get OTP + +Get OTP for the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + channel = 'phone' # str | Channel to send OTP + + try: + # Get OTP + api_response = api_instance.get_otp(channel) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->get_otp: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel** | **str**| Channel to send OTP | + +### Return type + +[**SimpleResponse**](SimpleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **login_with_email_and_password** +> JwtResponse login_with_email_and_password(login_request) + +Login with email and password + +Login with email and password and get a JWT token. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + login_request = zarban.wallet.openapi_client.LoginRequest() # LoginRequest | + + try: + # Login with email and password + api_response = api_instance.login_with_email_and_password(login_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->login_with_email_and_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **login_request** | [**LoginRequest**](LoginRequest.md)| | + +### Return type + +[**JwtResponse**](JwtResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**500** | Internal Server 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) + +# **signup_with_email_and_password** +> SimpleResponse signup_with_email_and_password(sign_up_request) + +signup with email and password + +signup with email and password and get a JWT token. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + sign_up_request = zarban.wallet.openapi_client.SignUpRequest() # SignUpRequest | + + try: + # signup with email and password + api_response = api_instance.signup_with_email_and_password(sign_up_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->signup_with_email_and_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_request** | [**SignUpRequest**](SignUpRequest.md)| | + +### Return type + +[**SimpleResponse**](SimpleResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **verify_user_email** +> JwtResponse verify_user_email(token) + +Verify email + +Verify the email of the user. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.AuthApi(api_client) + token = 'token_example' # str | Verification token + + try: + # Verify email + api_response = api_instance.verify_user_email(token) + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthApi->verify_user_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| Verification token | + +### Return type + +[**JwtResponse**](JwtResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/InlineObject9.md b/src/zarban/wallet/docs/AuthTelegramRequest.md similarity index 93% rename from src/zarban/wallet/docs/InlineObject9.md rename to src/zarban/wallet/docs/AuthTelegramRequest.md index c84b28a..701bc8c 100644 --- a/src/zarban/wallet/docs/InlineObject9.md +++ b/src/zarban/wallet/docs/AuthTelegramRequest.md @@ -1,4 +1,4 @@ -# InlineObject9 +# AuthTelegramRequest ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/Balance.md b/src/zarban/wallet/docs/Balance.md index f222e62..727bbab 100644 --- a/src/zarban/wallet/docs/Balance.md +++ b/src/zarban/wallet/docs/Balance.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**locked** | **dict(str, str)** | | +**locked** | [**Currency**](Currency.md) | | **coin** | [**Coin**](Coin.md) | | -**balance** | **dict(str, str)** | | +**balance** | [**Currency**](Currency.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/BalanceApi.md b/src/zarban/wallet/docs/BalanceApi.md new file mode 100644 index 0000000..3529f2e --- /dev/null +++ b/src/zarban/wallet/docs/BalanceApi.md @@ -0,0 +1,156 @@ +# zarban.wallet.openapi_client.BalanceApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_balance_by_symbol**](BalanceApi.md#get_balance_by_symbol) | **GET** /balance/{symbol} | Get balance +[**get_wallet_balance**](BalanceApi.md#get_wallet_balance) | **GET** /balance | Get wallet balance + + +# **get_balance_by_symbol** +> Balance get_balance_by_symbol(symbol) + +Get balance + +Get the balance by a symbol. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.BalanceApi(api_client) + symbol = zarban.wallet.openapi_client.Symbol() # Symbol | Coin symbol + + try: + # Get balance + api_response = api_instance.get_balance_by_symbol(symbol) + pprint(api_response) + except ApiException as e: + print("Exception when calling BalanceApi->get_balance_by_symbol: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | [**Symbol**](.md)| Coin symbol | + +### Return type + +[**Balance**](Balance.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_wallet_balance** +> WalletBalance get_wallet_balance() + +Get wallet balance + +Get the balance of the wallet. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.BalanceApi(api_client) + + try: + # Get wallet balance + api_response = api_instance.get_wallet_balance() + pprint(api_response) + except ApiException as e: + print("Exception when calling BalanceApi->get_wallet_balance: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WalletBalance**](WalletBalance.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/BankInfo.md b/src/zarban/wallet/docs/BankInfo.md new file mode 100644 index 0000000..9038872 --- /dev/null +++ b/src/zarban/wallet/docs/BankInfo.md @@ -0,0 +1,12 @@ +# BankInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bank_name** | **str** | Bank name | +**card_number** | **str** | Card number | +**iban** | **str** | IBAN | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/CoinContent.md b/src/zarban/wallet/docs/BulletContent.md similarity index 86% rename from src/zarban/wallet/docs/CoinContent.md rename to src/zarban/wallet/docs/BulletContent.md index f748d4a..badb093 100644 --- a/src/zarban/wallet/docs/CoinContent.md +++ b/src/zarban/wallet/docs/BulletContent.md @@ -1,11 +1,11 @@ -# CoinContent +# BulletContent ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | | **text** | **str** | | -**bollets** | **list[str]** | | +**bullets** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/Coin.md b/src/zarban/wallet/docs/Coin.md index 86f4727..2e824d0 100644 --- a/src/zarban/wallet/docs/Coin.md +++ b/src/zarban/wallet/docs/Coin.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **logo_uri** | **str** | | **depositable_networks** | [**list[Network]**](Network.md) | | **withdrawable_networks** | [**list[Network]**](Network.md) | | -**content** | [**CoinContent**](CoinContent.md) | | +**content** | [**BulletContent**](BulletContent.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/CoinConfig.md b/src/zarban/wallet/docs/CoinConfig.md index 3ace59c..e19a90f 100644 --- a/src/zarban/wallet/docs/CoinConfig.md +++ b/src/zarban/wallet/docs/CoinConfig.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **is_tradeable** | **bool** | | -**withdraw_fees** | **dict(str, str)** | | -**min_withdrawal** | **dict(str, str)** | | +**withdraw_fees** | **dict(str, str)** | Map of network to amount | +**min_withdrawal** | **dict(str, str)** | Map of network to amount | **needs_memo** | **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/CoinResponse.md b/src/zarban/wallet/docs/CoinResponse.md new file mode 100644 index 0000000..de2084e --- /dev/null +++ b/src/zarban/wallet/docs/CoinResponse.md @@ -0,0 +1,10 @@ +# CoinResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Coin]**](Coin.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/CoinsApi.md b/src/zarban/wallet/docs/CoinsApi.md new file mode 100644 index 0000000..59bc0ee --- /dev/null +++ b/src/zarban/wallet/docs/CoinsApi.md @@ -0,0 +1,133 @@ +# zarban.wallet.openapi_client.CoinsApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_coin_details**](CoinsApi.md#get_coin_details) | **GET** /coins/{symbol} | Get coin +[**get_supported_coins**](CoinsApi.md#get_supported_coins) | **GET** /coins | Get coins + + +# **get_coin_details** +> Coin get_coin_details(symbol) + +Get coin + +Get the details of a coin. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.CoinsApi(api_client) + symbol = zarban.wallet.openapi_client.Symbol() # Symbol | Coin symbol + + try: + # Get coin + api_response = api_instance.get_coin_details(symbol) + pprint(api_response) + except ApiException as e: + print("Exception when calling CoinsApi->get_coin_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | [**Symbol**](.md)| Coin symbol | + +### Return type + +[**Coin**](Coin.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + +# **get_supported_coins** +> CoinResponse get_supported_coins() + +Get coins + +Get the list of supported coins. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.CoinsApi(api_client) + + try: + # Get coins + api_response = api_instance.get_supported_coins() + pprint(api_response) + except ApiException as e: + print("Exception when calling CoinsApi->get_supported_coins: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CoinResponse**](CoinResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/CreateChildUserRequest.md b/src/zarban/wallet/docs/CreateChildUserRequest.md new file mode 100644 index 0000000..9cde87c --- /dev/null +++ b/src/zarban/wallet/docs/CreateChildUserRequest.md @@ -0,0 +1,10 @@ +# CreateChildUserRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | the username of the child user | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/Currency.md b/src/zarban/wallet/docs/Currency.md new file mode 100644 index 0000000..2fc3454 --- /dev/null +++ b/src/zarban/wallet/docs/Currency.md @@ -0,0 +1,10 @@ +# Currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | **dict(str, str)** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/DefaultApi.md b/src/zarban/wallet/docs/DefaultApi.md deleted file mode 100644 index 14a5709..0000000 --- a/src/zarban/wallet/docs/DefaultApi.md +++ /dev/null @@ -1,2169 +0,0 @@ -# openapi_client.DefaultApi - -All URIs are relative to *https://walletapi.zarban.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**auth_login_post**](DefaultApi.md#auth_login_post) | **POST** /auth/login | Login with email and password -[**auth_signup_post**](DefaultApi.md#auth_signup_post) | **POST** /auth/signup | signup with email and password -[**auth_telegram_post**](DefaultApi.md#auth_telegram_post) | **POST** /auth/telegram | Authenticate with Telegram -[**balance_get**](DefaultApi.md#balance_get) | **GET** /balance | Get wallet balance -[**balance_symbol_get**](DefaultApi.md#balance_symbol_get) | **GET** /balance/{symbol} | Get balance -[**coins_get**](DefaultApi.md#coins_get) | **GET** /coins | Get coins -[**coins_symbol_get**](DefaultApi.md#coins_symbol_get) | **GET** /coins/{symbol} | Get coin -[**deposit_get**](DefaultApi.md#deposit_get) | **GET** /deposit | Deposit money -[**payments_post**](DefaultApi.md#payments_post) | **POST** /payments | Create a payment -[**points_frineds_get**](DefaultApi.md#points_frineds_get) | **GET** /points/frineds | Get friends points. -[**profile_get**](DefaultApi.md#profile_get) | **GET** /profile | Get profile -[**referrals_get**](DefaultApi.md#referrals_get) | **GET** /referrals | Get referrals -[**referrals_post**](DefaultApi.md#referrals_post) | **POST** /referrals | Create a referral -[**referrals_referral_id_get**](DefaultApi.md#referrals_referral_id_get) | **GET** /referrals/{referralId} | Get referral by ID -[**referrals_referral_id_redeem_post**](DefaultApi.md#referrals_referral_id_redeem_post) | **POST** /referrals/{referralId}/redeem | Redeem a referral -[**referrals_referral_id_validate_post**](DefaultApi.md#referrals_referral_id_validate_post) | **POST** /referrals/{referralId}/validate | Validate a referral -[**saving_deposit_post**](DefaultApi.md#saving_deposit_post) | **POST** /saving/deposit | Create a saving -[**saving_offers_get**](DefaultApi.md#saving_offers_get) | **GET** /saving/offers | Get saving offers -[**saving_positions_get**](DefaultApi.md#saving_positions_get) | **GET** /saving/positions | Get saving positions -[**saving_withdraw_post**](DefaultApi.md#saving_withdraw_post) | **POST** /saving/withdraw | Withdraw saving -[**swap_post**](DefaultApi.md#swap_post) | **POST** /swap | Swap coins -[**swap_quote_post**](DefaultApi.md#swap_quote_post) | **POST** /swap/quote | post a swap quote -[**tasks_get**](DefaultApi.md#tasks_get) | **GET** /tasks | Get tasks -[**tasks_post**](DefaultApi.md#tasks_post) | **POST** /tasks | check task completion -[**users_nickname_get**](DefaultApi.md#users_nickname_get) | **GET** /users/nickname | Get nickname -[**users_nickname_post**](DefaultApi.md#users_nickname_post) | **POST** /users/nickname | Add a nickname -[**withdraws_get**](DefaultApi.md#withdraws_get) | **GET** /withdraws | Get user withdraw requests -[**withdraws_id_get**](DefaultApi.md#withdraws_id_get) | **GET** /withdraws/{id} | Get withdrawal status -[**withdraws_preview_post**](DefaultApi.md#withdraws_preview_post) | **POST** /withdraws/preview | Withdraw request -[**withdraws_request_post**](DefaultApi.md#withdraws_request_post) | **POST** /withdraws/request | Withdraw request - - -# **auth_login_post** -> InlineResponse2007 auth_login_post(inline_object11) - -Login with email and password - -Login with email and password and get a JWT token. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object11 = openapi_client.InlineObject11() # InlineObject11 | - - try: - # Login with email and password - api_response = api_instance.auth_login_post(inline_object11) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->auth_login_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object11** | [**InlineObject11**](InlineObject11.md)| | - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**404** | Not Found | - | -**500** | Internal Server 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) - -# **auth_signup_post** -> InlineResponse2007 auth_signup_post(inline_object10) - -signup with email and password - -signup with email and password and get a JWT token. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object10 = openapi_client.InlineObject10() # InlineObject10 | - - try: - # signup with email and password - api_response = api_instance.auth_signup_post(inline_object10) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->auth_signup_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object10** | [**InlineObject10**](InlineObject10.md)| | - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **auth_telegram_post** -> InlineResponse2007 auth_telegram_post(inline_object9) - -Authenticate with Telegram - -Authenticate with Telegram and get a JWT token. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object9 = openapi_client.InlineObject9() # InlineObject9 | - - try: - # Authenticate with Telegram - api_response = api_instance.auth_telegram_post(inline_object9) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->auth_telegram_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object9** | [**InlineObject9**](InlineObject9.md)| | - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **balance_get** -> WalletBalance balance_get() - -Get wallet balance - -Get the balance of the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get wallet balance - api_response = api_instance.balance_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->balance_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**WalletBalance**](WalletBalance.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **balance_symbol_get** -> Balance balance_symbol_get(symbol) - -Get balance - -Get the balance by a symbol. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - symbol = openapi_client.Symbol() # Symbol | Coin symbol - - try: - # Get balance - api_response = api_instance.balance_symbol_get(symbol) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->balance_symbol_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **symbol** | [**Symbol**](.md)| Coin symbol | - -### Return type - -[**Balance**](Balance.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **coins_get** -> list[Coin] coins_get() - -Get coins - -Get the list of supported coins. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get coins - api_response = api_instance.coins_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->coins_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Coin]**](Coin.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server 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) - -# **coins_symbol_get** -> Coin coins_symbol_get(symbol) - -Get coin - -Get the details of a coin. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - symbol = openapi_client.Symbol() # Symbol | Coin symbol - - try: - # Get coin - api_response = api_instance.coins_symbol_get(symbol) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->coins_symbol_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **symbol** | [**Symbol**](.md)| Coin symbol | - -### Return type - -[**Coin**](Coin.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **deposit_get** -> InlineResponse2006 deposit_get(network, symbol) - -Deposit money - -Deposit money to the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - network = 'arbitrum' # str | Network to deposit -symbol = 'ZAR' # str | Coin symbol - - try: - # Deposit money - api_response = api_instance.deposit_get(network, symbol) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->deposit_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **network** | **str**| Network to deposit | - **symbol** | **str**| Coin symbol | - -### Return type - -[**InlineResponse2006**](InlineResponse2006.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **payments_post** -> Payment payments_post(inline_object2) - -Create a payment - -Create a new payment. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object2 = openapi_client.InlineObject2() # InlineObject2 | - - try: - # Create a payment - api_response = api_instance.payments_post(inline_object2) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->payments_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object2** | [**InlineObject2**](InlineObject2.md)| | - -### Return type - -[**Payment**](Payment.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **points_frineds_get** -> list[InlineResponse2009] points_frineds_get() - -Get friends points. - -Get friends points. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get friends points. - api_response = api_instance.points_frineds_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->points_frineds_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[InlineResponse2009]**](InlineResponse2009.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server 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) - -# **profile_get** -> InlineResponse200 profile_get() - -Get profile - -Get the profile of the user. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get profile - api_response = api_instance.profile_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->profile_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **referrals_get** -> list[Referral] referrals_get(name=name) - -Get referrals - -Get referrals by user ID or name. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - name = 'name_example' # str | Referral name (optional) - - try: - # Get referrals - api_response = api_instance.referrals_get(name=name) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->referrals_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Referral name | [optional] - -### Return type - -[**list[Referral]**](Referral.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **referrals_post** -> InlineResponse2002 referrals_post(inline_object4) - -Create a referral - -Create a new referral. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object4 = openapi_client.InlineObject4() # InlineObject4 | - - try: - # Create a referral - api_response = api_instance.referrals_post(inline_object4) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->referrals_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object4** | [**InlineObject4**](InlineObject4.md)| | - -### Return type - -[**InlineResponse2002**](InlineResponse2002.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **referrals_referral_id_get** -> Referral referrals_referral_id_get(referral_id) - -Get referral by ID - -Get a referral by its ID. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - referral_id = 56 # int | Referral ID - - try: - # Get referral by ID - api_response = api_instance.referrals_referral_id_get(referral_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->referrals_referral_id_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **referral_id** | **int**| Referral ID | - -### Return type - -[**Referral**](Referral.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **referrals_referral_id_redeem_post** -> referrals_referral_id_redeem_post(referral_id) - -Redeem a referral - -Redeem a referral for a user. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - referral_id = 56 # int | Referral ID - - try: - # Redeem a referral - api_instance.referrals_referral_id_redeem_post(referral_id) - except ApiException as e: - print("Exception when calling DefaultApi->referrals_referral_id_redeem_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **referral_id** | **int**| Referral ID | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **referrals_referral_id_validate_post** -> referrals_referral_id_validate_post(referral_id) - -Validate a referral - -Validate a referral to check if it can be redeemed. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - referral_id = 56 # int | Referral ID - - try: - # Validate a referral - api_instance.referrals_referral_id_validate_post(referral_id) - except ApiException as e: - print("Exception when calling DefaultApi->referrals_referral_id_validate_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **referral_id** | **int**| Referral ID | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **saving_deposit_post** -> SavingDepositResponse saving_deposit_post(inline_object1) - -Create a saving - -Create a new saving. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object1 = openapi_client.InlineObject1() # InlineObject1 | - - try: - # Create a saving - api_response = api_instance.saving_deposit_post(inline_object1) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->saving_deposit_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object1** | [**InlineObject1**](InlineObject1.md)| | - -### Return type - -[**SavingDepositResponse**](SavingDepositResponse.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **saving_offers_get** -> list[SavingOffer] saving_offers_get() - -Get saving offers - -Get the list of saving offers. - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get saving offers - api_response = api_instance.saving_offers_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->saving_offers_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[SavingOffer]**](SavingOffer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server 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) - -# **saving_positions_get** -> list[SavingDepositResponse] saving_positions_get() - -Get saving positions - -Get the list of saving positions. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get saving positions - api_response = api_instance.saving_positions_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->saving_positions_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[SavingDepositResponse]**](SavingDepositResponse.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server 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) - -# **saving_withdraw_post** -> SavingWithdrawResponse saving_withdraw_post(inline_object) - -Withdraw saving - -Withdraw a saving from the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object = openapi_client.InlineObject() # InlineObject | - - try: - # Withdraw saving - api_response = api_instance.saving_withdraw_post(inline_object) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->saving_withdraw_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object** | [**InlineObject**](InlineObject.md)| | - -### Return type - -[**SavingWithdrawResponse**](SavingWithdrawResponse.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **swap_post** -> InlineResponse2003 swap_post(inline_object6) - -Swap coins - -Swap coins in the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object6 = openapi_client.InlineObject6() # InlineObject6 | - - try: - # Swap coins - api_response = api_instance.swap_post(inline_object6) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->swap_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object6** | [**InlineObject6**](InlineObject6.md)| | - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **swap_quote_post** -> swap_quote_post(inline_object5) - -post a swap quote - -post a swap quote - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object5 = openapi_client.InlineObject5() # InlineObject5 | - - try: - # post a swap quote - api_instance.swap_quote_post(inline_object5) - except ApiException as e: - print("Exception when calling DefaultApi->swap_quote_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object5** | [**InlineObject5**](InlineObject5.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **tasks_get** -> list[Task] tasks_get() - -Get tasks - -Get the list of tasks. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get tasks - api_response = api_instance.tasks_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->tasks_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Task]**](Task.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server 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) - -# **tasks_post** -> InlineResponse2008 tasks_post(inline_object12) - -check task completion - -check if the user has completed a task - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object12 = openapi_client.InlineObject12() # InlineObject12 | - - try: - # check task completion - api_response = api_instance.tasks_post(inline_object12) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->tasks_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object12** | [**InlineObject12**](InlineObject12.md)| | - -### Return type - -[**InlineResponse2008**](InlineResponse2008.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **users_nickname_get** -> InlineResponse2001 users_nickname_get() - -Get nickname - -Get the nickname of a user. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get nickname - api_response = api_instance.users_nickname_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->users_nickname_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2001**](InlineResponse2001.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **users_nickname_post** -> users_nickname_post(inline_object3) - -Add a nickname - -Add a nickname to a user. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object3 = openapi_client.InlineObject3() # InlineObject3 | - - try: - # Add a nickname - api_instance.users_nickname_post(inline_object3) - except ApiException as e: - print("Exception when calling DefaultApi->users_nickname_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object3** | [**InlineObject3**](InlineObject3.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server 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) - -# **withdraws_get** -> list[WithdrawRequest] withdraws_get() - -Get user withdraw requests - -Get user withdraw requests - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - - try: - # Get user withdraw requests - api_response = api_instance.withdraws_get() - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->withdraws_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[WithdrawRequest]**](WithdrawRequest.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **withdraws_id_get** -> WithdrawRequest withdraws_id_get(id) - -Get withdrawal status - -Get the status of a withdrawal request. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - id = 1234567890 # int | Withdrawal request ID - - try: - # Get withdrawal status - api_response = api_instance.withdraws_id_get(id) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->withdraws_id_get: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| Withdrawal request ID | - -### Return type - -[**WithdrawRequest**](WithdrawRequest.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **withdraws_preview_post** -> InlineResponse2005 withdraws_preview_post(inline_object8) - -Withdraw request - -Request a withdrawal from the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object8 = openapi_client.InlineObject8() # InlineObject8 | - - try: - # Withdraw request - api_response = api_instance.withdraws_preview_post(inline_object8) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->withdraws_preview_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object8** | [**InlineObject8**](InlineObject8.md)| | - -### Return type - -[**InlineResponse2005**](InlineResponse2005.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - -# **withdraws_request_post** -> InlineResponse2004 withdraws_request_post(inline_object7) - -Withdraw request - -Request a withdrawal from the wallet. - -### Example - -* Bearer (JWT) Authentication (bearerAuth): -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - -# 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 (JWT): bearerAuth -configuration = openapi_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openapi_client.DefaultApi(api_client) - inline_object7 = openapi_client.InlineObject7() # InlineObject7 | - - try: - # Withdraw request - api_response = api_instance.withdraws_request_post(inline_object7) - pprint(api_response) - except ApiException as e: - print("Exception when calling DefaultApi->withdraws_request_post: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **inline_object7** | [**InlineObject7**](InlineObject7.md)| | - -### Return type - -[**InlineResponse2004**](InlineResponse2004.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server 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) - diff --git a/src/zarban/wallet/docs/DepositApi.md b/src/zarban/wallet/docs/DepositApi.md new file mode 100644 index 0000000..dbe8418 --- /dev/null +++ b/src/zarban/wallet/docs/DepositApi.md @@ -0,0 +1,86 @@ +# zarban.wallet.openapi_client.DepositApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deposit_money**](DepositApi.md#deposit_money) | **GET** /deposit | Deposit money + + +# **deposit_money** +> DepositResponse deposit_money(network, symbol) + +Deposit money + +Deposit money to the wallet. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.DepositApi(api_client) + network = 'arbitrum' # str | Network to deposit +symbol = 'ZAR' # str | Coin symbol + + try: + # Deposit money + api_response = api_instance.deposit_money(network, symbol) + pprint(api_response) + except ApiException as e: + print("Exception when calling DepositApi->deposit_money: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **network** | **str**| Network to deposit | + **symbol** | **str**| Coin symbol | + +### Return type + +[**DepositResponse**](DepositResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/InlineResponse2006.md b/src/zarban/wallet/docs/DepositResponse.md similarity index 95% rename from src/zarban/wallet/docs/InlineResponse2006.md rename to src/zarban/wallet/docs/DepositResponse.md index 3cf3709..125ea45 100644 --- a/src/zarban/wallet/docs/InlineResponse2006.md +++ b/src/zarban/wallet/docs/DepositResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2006 +# DepositResponse ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/DetailedLoanToValueOptions.md b/src/zarban/wallet/docs/DetailedLoanToValueOptions.md new file mode 100644 index 0000000..d142eb3 --- /dev/null +++ b/src/zarban/wallet/docs/DetailedLoanToValueOptions.md @@ -0,0 +1,11 @@ +# DetailedLoanToValueOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **dict(str, str)** | | +**value** | **str** | The loan to value of the vault. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/EmailOtpSubmitRequest.md b/src/zarban/wallet/docs/EmailOtpSubmitRequest.md new file mode 100644 index 0000000..0da67b0 --- /dev/null +++ b/src/zarban/wallet/docs/EmailOtpSubmitRequest.md @@ -0,0 +1,10 @@ +# EmailOtpSubmitRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | OTP code | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/Error.md b/src/zarban/wallet/docs/Error.md index 8149b1d..01ae5b6 100644 --- a/src/zarban/wallet/docs/Error.md +++ b/src/zarban/wallet/docs/Error.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **msg** | **str** | Error message | -**reasons** | **list[str]** | | [optional] +**reasons** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/service/docs/BetterErrorMessages.md b/src/zarban/wallet/docs/ErrorDetail.md similarity index 82% rename from src/zarban/service/docs/BetterErrorMessages.md rename to src/zarban/wallet/docs/ErrorDetail.md index e72a3c3..1a212e1 100644 --- a/src/zarban/service/docs/BetterErrorMessages.md +++ b/src/zarban/wallet/docs/ErrorDetail.md @@ -1,10 +1,10 @@ -# BetterErrorMessages +# ErrorDetail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_message** | **str** | User-friendly error message | -**solutions** | **list[str]** | | [optional] +**solutions** | **list[str]** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/ExternalTransaction.md b/src/zarban/wallet/docs/ExternalTransaction.md index 3b6316e..b8d65fa 100644 --- a/src/zarban/wallet/docs/ExternalTransaction.md +++ b/src/zarban/wallet/docs/ExternalTransaction.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **_from** | **str** | The address from which the transaction originated | **to** | **str** | The address to which the transaction is sent | **comment** | **str** | A comment associated with the transaction | -**amount** | **dict(str, str)** | | +**amount** | [**Currency**](Currency.md) | | **symbol** | [**Symbol**](Symbol.md) | | **network** | [**Network**](Network.md) | | **status** | [**TransactionStatus**](TransactionStatus.md) | | diff --git a/src/zarban/wallet/docs/FriendPoints.md b/src/zarban/wallet/docs/FriendPoints.md new file mode 100644 index 0000000..cae77b9 --- /dev/null +++ b/src/zarban/wallet/docs/FriendPoints.md @@ -0,0 +1,11 @@ +# FriendPoints + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **str** | the first name of the friend | +**points** | **int** | the points of the friend | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/FriendPointsResponse.md b/src/zarban/wallet/docs/FriendPointsResponse.md new file mode 100644 index 0000000..23c62c5 --- /dev/null +++ b/src/zarban/wallet/docs/FriendPointsResponse.md @@ -0,0 +1,10 @@ +# FriendPointsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[FriendPoints]**](FriendPoints.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/HealthApi.md b/src/zarban/wallet/docs/HealthApi.md new file mode 100644 index 0000000..2d2791c --- /dev/null +++ b/src/zarban/wallet/docs/HealthApi.md @@ -0,0 +1,67 @@ +# zarban.wallet.openapi_client.HealthApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**check_api_health**](HealthApi.md#check_api_health) | **GET** /healthz | Health check + + +# **check_api_health** +> HealthStatus check_api_health() + +Health check + +Check the health of the API. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.HealthApi(api_client) + + try: + # Health check + api_response = api_instance.check_api_health() + pprint(api_response) + except ApiException as e: + print("Exception when calling HealthApi->check_api_health: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/zarban/wallet/docs/HealthStatus.md b/src/zarban/wallet/docs/HealthStatus.md new file mode 100644 index 0000000..b9045a6 --- /dev/null +++ b/src/zarban/wallet/docs/HealthStatus.md @@ -0,0 +1,10 @@ +# HealthStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/InlineObject.md b/src/zarban/wallet/docs/InlineObject.md deleted file mode 100644 index a219e07..0000000 --- a/src/zarban/wallet/docs/InlineObject.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**intent** | **str** | Intent to withdraw | -**amount** | **str** | Saving amount | -**saving_position_id** | **int** | Saving position Id | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineObject1.md b/src/zarban/wallet/docs/InlineObject1.md deleted file mode 100644 index 032c7ed..0000000 --- a/src/zarban/wallet/docs/InlineObject1.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**intent** | **str** | Intent to save | -**amount** | **str** | Saving amount | -**offer_id** | **str** | Saving offer ID | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineObject4.md b/src/zarban/wallet/docs/InlineObject4.md deleted file mode 100644 index 654e2a3..0000000 --- a/src/zarban/wallet/docs/InlineObject4.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject4 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**usage_limit** | **int** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineObject5.md b/src/zarban/wallet/docs/InlineObject5.md deleted file mode 100644 index 238d49f..0000000 --- a/src/zarban/wallet/docs/InlineObject5.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject5 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quote_id** | **str** | Quote ID, required if intent is Swap | -**quote** | **str** | Quote | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse200.md b/src/zarban/wallet/docs/InlineResponse200.md deleted file mode 100644 index e290dca..0000000 --- a/src/zarban/wallet/docs/InlineResponse200.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nickname** | **str** | | -**transactions** | [**list[Transaction]**](Transaction.md) | | -**referral** | [**Referral**](Referral.md) | | -**points** | **int** | | -**avatar** | **str** | Avatar URL, lottie file URL | [optional] -**telegram** | [**TelegramProfile**](TelegramProfile.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2001.md b/src/zarban/wallet/docs/InlineResponse2001.md deleted file mode 100644 index 391e1b2..0000000 --- a/src/zarban/wallet/docs/InlineResponse2001.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nicknames** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2002.md b/src/zarban/wallet/docs/InlineResponse2002.md deleted file mode 100644 index f15a84e..0000000 --- a/src/zarban/wallet/docs/InlineResponse2002.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**referral_id** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2008.md b/src/zarban/wallet/docs/InlineResponse2008.md deleted file mode 100644 index e3791d6..0000000 --- a/src/zarban/wallet/docs/InlineResponse2008.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2008 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**completed** | **bool** | Task completion status | -**completed_at** | [**Timestamp**](Timestamp.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2009.md b/src/zarban/wallet/docs/InlineResponse2009.md deleted file mode 100644 index 828d78e..0000000 --- a/src/zarban/wallet/docs/InlineResponse2009.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2009 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **str** | the first name of the friend | [optional] -**points** | **int** | the points of the friend | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineResponse2007.md b/src/zarban/wallet/docs/JwtResponse.md similarity index 93% rename from src/zarban/wallet/docs/InlineResponse2007.md rename to src/zarban/wallet/docs/JwtResponse.md index ebde60d..e1a425b 100644 --- a/src/zarban/wallet/docs/InlineResponse2007.md +++ b/src/zarban/wallet/docs/JwtResponse.md @@ -1,4 +1,4 @@ -# InlineResponse2007 +# JwtResponse ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/KycConfirmRequest.md b/src/zarban/wallet/docs/KycConfirmRequest.md new file mode 100644 index 0000000..ef2e582 --- /dev/null +++ b/src/zarban/wallet/docs/KycConfirmRequest.md @@ -0,0 +1,10 @@ +# KycConfirmRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | KYC request ID | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/KycRequest.md b/src/zarban/wallet/docs/KycRequest.md new file mode 100644 index 0000000..0b4a14f --- /dev/null +++ b/src/zarban/wallet/docs/KycRequest.md @@ -0,0 +1,12 @@ +# KycRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**national_id** | **str** | National ID | +**date_of_birth** | **str** | Date of birth | +**card_number** | **str** | Card number | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/KycResponse.md b/src/zarban/wallet/docs/KycResponse.md new file mode 100644 index 0000000..70416ee --- /dev/null +++ b/src/zarban/wallet/docs/KycResponse.md @@ -0,0 +1,15 @@ +# KycResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | KYC request ID | +**first_name** | **str** | First name | +**last_name** | **str** | Last name | +**national_id** | **str** | National code | +**date_of_birth** | **str** | Date of birth | +**bank_info** | [**BankInfo**](BankInfo.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/InlineObject8.md b/src/zarban/wallet/docs/LoanCreateRequest.md similarity index 50% rename from src/zarban/wallet/docs/InlineObject8.md rename to src/zarban/wallet/docs/LoanCreateRequest.md index 622bc32..20a635e 100644 --- a/src/zarban/wallet/docs/InlineObject8.md +++ b/src/zarban/wallet/docs/LoanCreateRequest.md @@ -1,13 +1,14 @@ -# InlineObject8 +# LoanCreateRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**network** | **str** | Network to withdraw | +**intent** | **str** | Intent to create a vault | +**plan_name** | **str** | The name of the loan plan | +**collateral** | **str** | Collateral amount | [optional] +**debt** | **str** | Debt amount | [optional] **symbol** | **str** | Coin symbol | -**amount** | **str** | Amount to withdraw | -**address** | **str** | Withdrawal address | -**comment** | **str** | | [optional] +**loan_to_value_option** | [**LoanToValueOptions**](LoanToValueOptions.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/LoanPlan.md b/src/zarban/wallet/docs/LoanPlan.md new file mode 100644 index 0000000..9835ad2 --- /dev/null +++ b/src/zarban/wallet/docs/LoanPlan.md @@ -0,0 +1,16 @@ +# LoanPlan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the loan plan | +**min_collateralization_ratio** | **str** | The minimum collateralization ratio of the loan plan | +**acceptable_coins** | [**list[Coin]**](Coin.md) | | +**fee** | **str** | The annual fee of the loan plan | +**max_debt** | [**Currency**](Currency.md) | | +**min_debt** | [**Currency**](Currency.md) | | +**loan_to_value_options** | [**list[DetailedLoanToValueOptions]**](DetailedLoanToValueOptions.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/LoanPlanResponse.md b/src/zarban/wallet/docs/LoanPlanResponse.md new file mode 100644 index 0000000..cec2a0d --- /dev/null +++ b/src/zarban/wallet/docs/LoanPlanResponse.md @@ -0,0 +1,10 @@ +# LoanPlanResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[LoanPlan]**](LoanPlan.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/LoanToValueOptions.md b/src/zarban/wallet/docs/LoanToValueOptions.md new file mode 100644 index 0000000..100ec29 --- /dev/null +++ b/src/zarban/wallet/docs/LoanToValueOptions.md @@ -0,0 +1,10 @@ +# LoanToValueOptions + +The loan to value percentage options +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/LoansApi.md b/src/zarban/wallet/docs/LoansApi.md new file mode 100644 index 0000000..580d534 --- /dev/null +++ b/src/zarban/wallet/docs/LoansApi.md @@ -0,0 +1,447 @@ +# zarban.wallet.openapi_client.LoansApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_loan_vault**](LoansApi.md#create_loan_vault) | **POST** /loans/create | Create vault +[**estimate_loan_collateral**](LoansApi.md#estimate_loan_collateral) | **GET** /loans/estimate | Get collateral and loan amount estimation +[**get_all_loan_plans**](LoansApi.md#get_all_loan_plans) | **GET** /loans/plans | Get all plan loans +[**get_loan_details**](LoansApi.md#get_loan_details) | **GET** /loans/{id} | Get loan +[**get_user_loans**](LoansApi.md#get_user_loans) | **GET** /loans | Get user loans +[**repay_loan**](LoansApi.md#repay_loan) | **POST** /loans/repay | Repay Loan + + +# **create_loan_vault** +> LoansResponse create_loan_vault(loan_create_request) + +Create vault + +Create a vault + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + loan_create_request = zarban.wallet.openapi_client.LoanCreateRequest() # LoanCreateRequest | + + try: + # Create vault + api_response = api_instance.create_loan_vault(loan_create_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->create_loan_vault: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_create_request** | [**LoanCreateRequest**](LoanCreateRequest.md)| | + +### Return type + +[**LoansResponse**](LoansResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **estimate_loan_collateral** +> Currency estimate_loan_collateral(plan_name, loan_to_value_option, amount, input_type) + +Get collateral and loan amount estimation + +Get an estimate of required collateral for a specific loan amount, and vice versa. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + plan_name = 'ETH-A' # str | The name of the loan plan +loan_to_value_option = zarban.wallet.openapi_client.LoanToValueOptions() # LoanToValueOptions | The desired loan to value option +amount = '1.234' # str | Loan/Collateral amount +input_type = 'loan' # str | The type of the input amount + + try: + # Get collateral and loan amount estimation + api_response = api_instance.estimate_loan_collateral(plan_name, loan_to_value_option, amount, input_type) + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->estimate_loan_collateral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| The name of the loan plan | + **loan_to_value_option** | [**LoanToValueOptions**](.md)| The desired loan to value option | + **amount** | **str**| Loan/Collateral amount | + **input_type** | **str**| The type of the input amount | + +### Return type + +[**Currency**](Currency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**400** | Bad request (e.g. invalid input parameters). | - | +**500** | Internal Server 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) + +# **get_all_loan_plans** +> LoanPlanResponse get_all_loan_plans() + +Get all plan loans + +Get a list of the available plan loans. + +### Example + +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + + try: + # Get all plan loans + api_response = api_instance.get_all_loan_plans() + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->get_all_loan_plans: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**LoanPlanResponse**](LoanPlanResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_loan_details** +> LoansResponse get_loan_details(id) + +Get loan + +Get the details of a loan. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + id = '1234567890' # str | Loan ID + + try: + # Get loan + api_response = api_instance.get_loan_details(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->get_loan_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Loan ID | + +### Return type + +[**LoansResponse**](LoansResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_user_loans** +> LoansResponseList get_user_loans(state=state, plan_name=plan_name) + +Get user loans + +Get a list of the user's loans. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + state = 'active' # str | loan state (optional) +plan_name = 'DAIB' # str | loan plan name (optional) + + try: + # Get user loans + api_response = api_instance.get_user_loans(state=state, plan_name=plan_name) + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->get_user_loans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **state** | **str**| loan state | [optional] + **plan_name** | **str**| loan plan name | [optional] + +### Return type + +[**LoansResponseList**](LoansResponseList.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **repay_loan** +> LoansResponse repay_loan(repay_loan_request) + +Repay Loan + +Repay a loan totally + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.LoansApi(api_client) + repay_loan_request = zarban.wallet.openapi_client.RepayLoanRequest() # RepayLoanRequest | + + try: + # Repay Loan + api_response = api_instance.repay_loan(repay_loan_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling LoansApi->repay_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repay_loan_request** | [**RepayLoanRequest**](RepayLoanRequest.md)| | + +### Return type + +[**LoansResponse**](LoansResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/LoansResponse.md b/src/zarban/wallet/docs/LoansResponse.md new file mode 100644 index 0000000..2858d5b --- /dev/null +++ b/src/zarban/wallet/docs/LoansResponse.md @@ -0,0 +1,23 @@ +# LoansResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier for the vault. | [optional] +**user_id** | **int** | Identifier for the user. | +**liquidation_price** | [**Currency**](Currency.md) | | +**collateral** | [**Currency**](Currency.md) | | +**collateralization_ratio** | **str** | The collateralization ratio of the vault. | +**loan_to_value** | **str** | The loan to value of the vault. | +**debt** | [**Currency**](Currency.md) | | +**principal** | [**Currency**](Currency.md) | | +**scaled_debt** | [**Currency**](Currency.md) | | +**plan** | [**LoanPlan**](LoanPlan.md) | | +**state** | **dict(str, str)** | | +**updated_collateral_token_balance** | [**Currency**](Currency.md) | | [optional] +**updated_debt_token_balance** | [**Currency**](Currency.md) | | [optional] +**terms_and_conditions** | [**BulletContent**](BulletContent.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/LoansResponseList.md b/src/zarban/wallet/docs/LoansResponseList.md new file mode 100644 index 0000000..5ac290b --- /dev/null +++ b/src/zarban/wallet/docs/LoansResponseList.md @@ -0,0 +1,10 @@ +# LoansResponseList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[LoansResponse]**](LoansResponse.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/InlineObject11.md b/src/zarban/wallet/docs/LoginRequest.md similarity index 95% rename from src/zarban/wallet/docs/InlineObject11.md rename to src/zarban/wallet/docs/LoginRequest.md index 5d4cc82..e38950c 100644 --- a/src/zarban/wallet/docs/InlineObject11.md +++ b/src/zarban/wallet/docs/LoginRequest.md @@ -1,4 +1,4 @@ -# InlineObject11 +# LoginRequest ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/PaymentApi.md b/src/zarban/wallet/docs/PaymentApi.md new file mode 100644 index 0000000..e455069 --- /dev/null +++ b/src/zarban/wallet/docs/PaymentApi.md @@ -0,0 +1,83 @@ +# zarban.wallet.openapi_client.PaymentApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_payment**](PaymentApi.md#create_payment) | **POST** /payments | Create a payment + + +# **create_payment** +> Payment create_payment(payment_request) + +Create a payment + +Create a new payment. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.PaymentApi(api_client) + payment_request = zarban.wallet.openapi_client.PaymentRequest() # PaymentRequest | + + try: + # Create a payment + api_response = api_instance.create_payment(payment_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling PaymentApi->create_payment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payment_request** | [**PaymentRequest**](PaymentRequest.md)| | + +### Return type + +[**Payment**](Payment.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/InlineObject2.md b/src/zarban/wallet/docs/PaymentRequest.md similarity index 94% rename from src/zarban/wallet/docs/InlineObject2.md rename to src/zarban/wallet/docs/PaymentRequest.md index 5216315..0050e0e 100644 --- a/src/zarban/wallet/docs/InlineObject2.md +++ b/src/zarban/wallet/docs/PaymentRequest.md @@ -1,4 +1,4 @@ -# InlineObject2 +# PaymentRequest ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/PhoneOtpSubmitRequest.md b/src/zarban/wallet/docs/PhoneOtpSubmitRequest.md new file mode 100644 index 0000000..be45653 --- /dev/null +++ b/src/zarban/wallet/docs/PhoneOtpSubmitRequest.md @@ -0,0 +1,10 @@ +# PhoneOtpSubmitRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Confirmation code | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/PointsApi.md b/src/zarban/wallet/docs/PointsApi.md new file mode 100644 index 0000000..3705293 --- /dev/null +++ b/src/zarban/wallet/docs/PointsApi.md @@ -0,0 +1,78 @@ +# zarban.wallet.openapi_client.PointsApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_friends_points**](PointsApi.md#get_friends_points) | **GET** /points/frineds | Get friends points. + + +# **get_friends_points** +> FriendPointsResponse get_friends_points() + +Get friends points. + +Get friends points. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.PointsApi(api_client) + + try: + # Get friends points. + api_response = api_instance.get_friends_points() + pprint(api_response) + except ApiException as e: + print("Exception when calling PointsApi->get_friends_points: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FriendPointsResponse**](FriendPointsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/ProfileResponse.md b/src/zarban/wallet/docs/ProfileResponse.md new file mode 100644 index 0000000..d0b2dcb --- /dev/null +++ b/src/zarban/wallet/docs/ProfileResponse.md @@ -0,0 +1,13 @@ +# ProfileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**referral** | [**Referral**](Referral.md) | | +**points** | **int** | | +**user** | [**User**](User.md) | | +**bank_info** | [**list[BankInfo]**](BankInfo.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/Redemption.md b/src/zarban/wallet/docs/Redemption.md new file mode 100644 index 0000000..c6c83ae --- /dev/null +++ b/src/zarban/wallet/docs/Redemption.md @@ -0,0 +1,16 @@ +# Redemption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**Currency**](Currency.md) | | +**destination_bank_info** | [**BankInfo**](BankInfo.md) | | +**status** | **dict(str, str)** | | +**id** | **str** | The ID of the redemption request | +**created_at** | [**Timestamp**](Timestamp.md) | | +**updated_at** | [**Timestamp**](Timestamp.md) | | [optional] +**paya_tracking_code** | **str** | The Paya tracking code | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/RedemptionRequest.md b/src/zarban/wallet/docs/RedemptionRequest.md new file mode 100644 index 0000000..e9ceef0 --- /dev/null +++ b/src/zarban/wallet/docs/RedemptionRequest.md @@ -0,0 +1,12 @@ +# RedemptionRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | The amount to be redeemed in ZAR | +**destination_card_number** | **str** | The card number to which the redemption amount will be transferred | +**sms_otp** | **int** | The SMS OTP code | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/RedemptionResponse.md b/src/zarban/wallet/docs/RedemptionResponse.md new file mode 100644 index 0000000..a2bffb2 --- /dev/null +++ b/src/zarban/wallet/docs/RedemptionResponse.md @@ -0,0 +1,10 @@ +# RedemptionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Redemption]**](Redemption.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/RedemptionsApi.md b/src/zarban/wallet/docs/RedemptionsApi.md new file mode 100644 index 0000000..eeadc19 --- /dev/null +++ b/src/zarban/wallet/docs/RedemptionsApi.md @@ -0,0 +1,314 @@ +# zarban.wallet.openapi_client.RedemptionsApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_redemptions**](RedemptionsApi.md#get_all_redemptions) | **GET** /admin/redemptions | Get all redemptions +[**get_redemption_details**](RedemptionsApi.md#get_redemption_details) | **GET** /admin/redemptions/{id} | Get redemption +[**redeem_zar**](RedemptionsApi.md#redeem_zar) | **POST** /redemptions | Redeem zar +[**update_redemption_status**](RedemptionsApi.md#update_redemption_status) | **POST** /admin/redemptions/{id} | Update redemption + + +# **get_all_redemptions** +> RedemptionResponse get_all_redemptions(state=state) + +Get all redemptions + +Get a list of all redemptions. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.RedemptionsApi(api_client) + state = 'state_example' # str | Cursor for pagination (optional) + + try: + # Get all redemptions + api_response = api_instance.get_all_redemptions(state=state) + pprint(api_response) + except ApiException as e: + print("Exception when calling RedemptionsApi->get_all_redemptions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **state** | **str**| Cursor for pagination | [optional] + +### Return type + +[**RedemptionResponse**](RedemptionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_redemption_details** +> Redemption get_redemption_details(id) + +Get redemption + +Get the details of a redemption. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.RedemptionsApi(api_client) + id = 1234567890 # int | Redemption ID + + try: + # Get redemption + api_response = api_instance.get_redemption_details(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RedemptionsApi->get_redemption_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Redemption ID | + +### Return type + +[**Redemption**](Redemption.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **redeem_zar** +> Redemption redeem_zar(redemption_request) + +Redeem zar + +Redeem zar + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.RedemptionsApi(api_client) + redemption_request = zarban.wallet.openapi_client.RedemptionRequest() # RedemptionRequest | + + try: + # Redeem zar + api_response = api_instance.redeem_zar(redemption_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling RedemptionsApi->redeem_zar: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **redemption_request** | [**RedemptionRequest**](RedemptionRequest.md)| | + +### Return type + +[**Redemption**](Redemption.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **update_redemption_status** +> Redemption update_redemption_status(id, admin_redemption_update_request) + +Update redemption + +Update the status of a redemption. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.RedemptionsApi(api_client) + id = 'RED#000001' # str | Redemption ID +admin_redemption_update_request = zarban.wallet.openapi_client.AdminRedemptionUpdateRequest() # AdminRedemptionUpdateRequest | + + try: + # Update redemption + api_response = api_instance.update_redemption_status(id, admin_redemption_update_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling RedemptionsApi->update_redemption_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Redemption ID | + **admin_redemption_update_request** | [**AdminRedemptionUpdateRequest**](AdminRedemptionUpdateRequest.md)| | + +### Return type + +[**Redemption**](Redemption.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/Referral.md b/src/zarban/wallet/docs/Referral.md index d43b17c..de1a8e5 100644 --- a/src/zarban/wallet/docs/Referral.md +++ b/src/zarban/wallet/docs/Referral.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **usage_count** | **int** | | **created_at** | [**Timestamp**](Timestamp.md) | | **link** | **str** | | [optional] +**share_url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/ReferralResponse.md b/src/zarban/wallet/docs/ReferralResponse.md new file mode 100644 index 0000000..212e6b0 --- /dev/null +++ b/src/zarban/wallet/docs/ReferralResponse.md @@ -0,0 +1,10 @@ +# ReferralResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Referral]**](Referral.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/ReferralsApi.md b/src/zarban/wallet/docs/ReferralsApi.md new file mode 100644 index 0000000..e8c4768 --- /dev/null +++ b/src/zarban/wallet/docs/ReferralsApi.md @@ -0,0 +1,306 @@ +# zarban.wallet.openapi_client.ReferralsApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_referral_by_id**](ReferralsApi.md#get_referral_by_id) | **GET** /referrals/{referralId} | Get referral by ID +[**get_referrals**](ReferralsApi.md#get_referrals) | **GET** /referrals | Get referrals +[**redeem_referral**](ReferralsApi.md#redeem_referral) | **POST** /referrals/{referralId}/redeem | Redeem a referral +[**validate_referral**](ReferralsApi.md#validate_referral) | **POST** /referrals/{referralId}/validate | Validate a referral + + +# **get_referral_by_id** +> Referral get_referral_by_id(referral_id) + +Get referral by ID + +Get a referral by its ID. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.ReferralsApi(api_client) + referral_id = 56 # int | Referral ID + + try: + # Get referral by ID + api_response = api_instance.get_referral_by_id(referral_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ReferralsApi->get_referral_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **referral_id** | **int**| Referral ID | + +### Return type + +[**Referral**](Referral.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + +# **get_referrals** +> ReferralResponse get_referrals(name=name) + +Get referrals + +Get referrals by user ID or name. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.ReferralsApi(api_client) + name = 'name_example' # str | Referral name (optional) + + try: + # Get referrals + api_response = api_instance.get_referrals(name=name) + pprint(api_response) + except ApiException as e: + print("Exception when calling ReferralsApi->get_referrals: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| Referral name | [optional] + +### Return type + +[**ReferralResponse**](ReferralResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + +# **redeem_referral** +> redeem_referral(referral_id) + +Redeem a referral + +Redeem a referral for a user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.ReferralsApi(api_client) + referral_id = 56 # int | Referral ID + + try: + # Redeem a referral + api_instance.redeem_referral(referral_id) + except ApiException as e: + print("Exception when calling ReferralsApi->redeem_referral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **referral_id** | **int**| Referral ID | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + +# **validate_referral** +> validate_referral(referral_id) + +Validate a referral + +Validate a referral to check if it can be redeemed. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.ReferralsApi(api_client) + referral_id = 56 # int | Referral ID + + try: + # Validate a referral + api_instance.validate_referral(referral_id) + except ApiException as e: + print("Exception when calling ReferralsApi->validate_referral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **referral_id** | **int**| Referral ID | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/RepayLoanRequest.md b/src/zarban/wallet/docs/RepayLoanRequest.md new file mode 100644 index 0000000..228f110 --- /dev/null +++ b/src/zarban/wallet/docs/RepayLoanRequest.md @@ -0,0 +1,11 @@ +# RepayLoanRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**intent** | **str** | Intent to repay a loan | +**loan_id** | **str** | The id of a loan | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/SavingDepositResponse.md b/src/zarban/wallet/docs/SavingDepositResponse.md deleted file mode 100644 index 7aa55db..0000000 --- a/src/zarban/wallet/docs/SavingDepositResponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# SavingDepositResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**symbol** | [**Symbol**](Symbol.md) | | -**fee** | **str** | Operation fee | [optional] -**apy** | **str** | APY | -**principal** | **str** | Principal amount | -**interest** | **str** | Interest amount | -**time_created** | [**Timestamp**](Timestamp.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/SavingOffer.md b/src/zarban/wallet/docs/SavingOffer.md deleted file mode 100644 index 3b5e1b8..0000000 --- a/src/zarban/wallet/docs/SavingOffer.md +++ /dev/null @@ -1,15 +0,0 @@ -# SavingOffer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**name** | **str** | | -**description** | **str** | | -**apy** | **str** | | -**min_amount** | **str** | | -**symbol** | [**Symbol**](Symbol.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/SavingWithdrawResponse.md b/src/zarban/wallet/docs/SavingWithdrawResponse.md deleted file mode 100644 index 0f3bb47..0000000 --- a/src/zarban/wallet/docs/SavingWithdrawResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# SavingWithdrawResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**fee** | **str** | Operation fee | -**balance_after_withdraw** | **str** | Balance after withdrawal | -**principal** | **str** | Principal amount | -**interest** | **str** | Interest amount | -**time_created** | [**Timestamp**](Timestamp.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/zarban/wallet/docs/InlineObject10.md b/src/zarban/wallet/docs/SignUpRequest.md similarity index 95% rename from src/zarban/wallet/docs/InlineObject10.md rename to src/zarban/wallet/docs/SignUpRequest.md index 4bd5c0c..dec8c8c 100644 --- a/src/zarban/wallet/docs/InlineObject10.md +++ b/src/zarban/wallet/docs/SignUpRequest.md @@ -1,4 +1,4 @@ -# InlineObject10 +# SignUpRequest ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/SimpleResponse.md b/src/zarban/wallet/docs/SimpleResponse.md new file mode 100644 index 0000000..ee4b21a --- /dev/null +++ b/src/zarban/wallet/docs/SimpleResponse.md @@ -0,0 +1,10 @@ +# SimpleResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messages** | **dict(str, str)** | Localized messages | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/SwapApi.md b/src/zarban/wallet/docs/SwapApi.md new file mode 100644 index 0000000..166476a --- /dev/null +++ b/src/zarban/wallet/docs/SwapApi.md @@ -0,0 +1,84 @@ +# zarban.wallet.openapi_client.SwapApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**swap_coins**](SwapApi.md#swap_coins) | **POST** /swap | Swap coins + + +# **swap_coins** +> SwapResponse swap_coins(swap_request) + +Swap coins + +Swap coins in the wallet. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.SwapApi(api_client) + swap_request = zarban.wallet.openapi_client.SwapRequest() # SwapRequest | + + try: + # Swap coins + api_response = api_instance.swap_coins(swap_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling SwapApi->swap_coins: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **swap_request** | [**SwapRequest**](SwapRequest.md)| | + +### Return type + +[**SwapResponse**](SwapResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/InlineObject6.md b/src/zarban/wallet/docs/SwapRequest.md similarity index 97% rename from src/zarban/wallet/docs/InlineObject6.md rename to src/zarban/wallet/docs/SwapRequest.md index cc722de..bbce84c 100644 --- a/src/zarban/wallet/docs/InlineObject6.md +++ b/src/zarban/wallet/docs/SwapRequest.md @@ -1,4 +1,4 @@ -# InlineObject6 +# SwapRequest ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/SwapResponse.md b/src/zarban/wallet/docs/SwapResponse.md index 3cc0ab0..de57f2b 100644 --- a/src/zarban/wallet/docs/SwapResponse.md +++ b/src/zarban/wallet/docs/SwapResponse.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes **amount** | **str** | | **quote** | **str** | | **rate** | **str** | | -**value** | **dict(str, str)** | | **input_balance_after_swap** | **str** | | [optional] **output_balance_after_swap** | **str** | | [optional] **created_at** | [**Timestamp**](Timestamp.md) | | **expires_at** | [**Timestamp**](Timestamp.md) | | **executed_at** | [**Timestamp**](Timestamp.md) | | [optional] +**value** | [**Currency**](Currency.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/TaskResponse.md b/src/zarban/wallet/docs/TaskResponse.md new file mode 100644 index 0000000..a8dff49 --- /dev/null +++ b/src/zarban/wallet/docs/TaskResponse.md @@ -0,0 +1,10 @@ +# TaskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Task]**](Task.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/TasksApi.md b/src/zarban/wallet/docs/TasksApi.md new file mode 100644 index 0000000..a42c789 --- /dev/null +++ b/src/zarban/wallet/docs/TasksApi.md @@ -0,0 +1,78 @@ +# zarban.wallet.openapi_client.TasksApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_tasks**](TasksApi.md#get_tasks) | **GET** /tasks | Get tasks + + +# **get_tasks** +> TaskResponse get_tasks() + +Get tasks + +Get the list of tasks. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.TasksApi(api_client) + + try: + # Get tasks + api_response = api_instance.get_tasks() + pprint(api_response) + except ApiException as e: + print("Exception when calling TasksApi->get_tasks: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaskResponse**](TaskResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/TelegramProfile.md b/src/zarban/wallet/docs/TelegramProfile.md index f2e6476..de34718 100644 --- a/src/zarban/wallet/docs/TelegramProfile.md +++ b/src/zarban/wallet/docs/TelegramProfile.md @@ -3,7 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] **username** | **str** | | [optional] **first_name** | **str** | | **last_name** | **str** | | [optional] diff --git a/src/zarban/wallet/docs/Transaction.md b/src/zarban/wallet/docs/Transaction.md index 238d87d..28f45cc 100644 --- a/src/zarban/wallet/docs/Transaction.md +++ b/src/zarban/wallet/docs/Transaction.md @@ -9,7 +9,8 @@ Name | Type | Description | Notes **_from** | **str** | The ID of the user from whom the transaction originated | **to** | **str** | The ID of the user to whom the transaction is directed | **symbol** | [**Symbol**](Symbol.md) | | -**amount** | **dict(str, str)** | | +**amount** | [**Currency**](Currency.md) | | +**direction** | **str** | Equal to \"Inbound\" if the transaction is directed to the user, and \"Outbound\" if the transaction is directed from the user. | **external_transaction** | [**ExternalTransaction**](ExternalTransaction.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/TransactionResponse.md b/src/zarban/wallet/docs/TransactionResponse.md new file mode 100644 index 0000000..bd50671 --- /dev/null +++ b/src/zarban/wallet/docs/TransactionResponse.md @@ -0,0 +1,10 @@ +# TransactionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Transaction]**](Transaction.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/TransactionsApi.md b/src/zarban/wallet/docs/TransactionsApi.md new file mode 100644 index 0000000..2b1da68 --- /dev/null +++ b/src/zarban/wallet/docs/TransactionsApi.md @@ -0,0 +1,85 @@ +# zarban.wallet.openapi_client.TransactionsApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_transactions**](TransactionsApi.md#get_user_transactions) | **GET** /transactions | Get user transactions + + +# **get_user_transactions** +> TransactionResponse get_user_transactions(cursor=cursor, limit=limit) + +Get user transactions + +Get a list of the recent transactions of the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.TransactionsApi(api_client) + cursor = 0 # int | Cursor for pagination (optional) (default to 0) +limit = 100 # int | Limit the number of transactions returned (default is 100) (optional) (default to 100) + + try: + # Get user transactions + api_response = api_instance.get_user_transactions(cursor=cursor, limit=limit) + pprint(api_response) + except ApiException as e: + print("Exception when calling TransactionsApi->get_user_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **int**| Cursor for pagination | [optional] [default to 0] + **limit** | **int**| Limit the number of transactions returned (default is 100) | [optional] [default to 100] + +### Return type + +[**TransactionResponse**](TransactionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/UpdateEmailRequest.md b/src/zarban/wallet/docs/UpdateEmailRequest.md new file mode 100644 index 0000000..905d4be --- /dev/null +++ b/src/zarban/wallet/docs/UpdateEmailRequest.md @@ -0,0 +1,10 @@ +# UpdateEmailRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/UpdatePhoneRequest.md b/src/zarban/wallet/docs/UpdatePhoneRequest.md new file mode 100644 index 0000000..a971636 --- /dev/null +++ b/src/zarban/wallet/docs/UpdatePhoneRequest.md @@ -0,0 +1,10 @@ +# UpdatePhoneRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **str** | Phone number | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/User.md b/src/zarban/wallet/docs/User.md new file mode 100644 index 0000000..3d0d849 --- /dev/null +++ b/src/zarban/wallet/docs/User.md @@ -0,0 +1,21 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **str** | User's first name | [optional] +**last_name** | **str** | User's last name | [optional] +**email** | **str** | | [optional] +**username** | **str** | | [optional] +**phone** | **str** | | [optional] +**is_email_verified** | **bool** | | [optional] +**is_phone_verified** | **bool** | | [optional] +**is_kyc_verified** | **bool** | | [optional] +**is_child** | **bool** | | [optional] +**is_super_user** | **bool** | | [optional] +**is_admin** | **bool** | | [optional] +**telegram** | [**TelegramProfile**](TelegramProfile.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/zarban/wallet/docs/UserApi.md b/src/zarban/wallet/docs/UserApi.md new file mode 100644 index 0000000..4a08bd2 --- /dev/null +++ b/src/zarban/wallet/docs/UserApi.md @@ -0,0 +1,608 @@ +# zarban.wallet.openapi_client.UserApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_kyc**](UserApi.md#confirm_kyc) | **POST** /users/kyc/confirm | Confirm KYC +[**confirm_phone_number**](UserApi.md#confirm_phone_number) | **POST** /users/phone/confirm | Confirm phone number +[**create_child_user**](UserApi.md#create_child_user) | **POST** /users/children | create a child user +[**get_user_profile**](UserApi.md#get_user_profile) | **GET** /profile | Get profile +[**submit_email_confirmation_otp**](UserApi.md#submit_email_confirmation_otp) | **POST** /users/email/confirm | Submit email confirmation OTP +[**submit_kyc**](UserApi.md#submit_kyc) | **POST** /users/kyc | Submit KYC +[**verify_phone_number**](UserApi.md#verify_phone_number) | **POST** /users/phone | Verify phone number +[**verify_user_email_address**](UserApi.md#verify_user_email_address) | **POST** /users/email | Verify email + + +# **confirm_kyc** +> SimpleResponse confirm_kyc(kyc_confirm_request) + +Confirm KYC + +Confirm KYC for the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + kyc_confirm_request = zarban.wallet.openapi_client.KycConfirmRequest() # KycConfirmRequest | + + try: + # Confirm KYC + api_response = api_instance.confirm_kyc(kyc_confirm_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->confirm_kyc: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kyc_confirm_request** | [**KycConfirmRequest**](KycConfirmRequest.md)| | + +### Return type + +[**SimpleResponse**](SimpleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **confirm_phone_number** +> confirm_phone_number(phone_otp_submit_request) + +Confirm phone number + +Confirm the phone number of the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + phone_otp_submit_request = zarban.wallet.openapi_client.PhoneOtpSubmitRequest() # PhoneOtpSubmitRequest | + + try: + # Confirm phone number + api_instance.confirm_phone_number(phone_otp_submit_request) + except ApiException as e: + print("Exception when calling UserApi->confirm_phone_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_otp_submit_request** | [**PhoneOtpSubmitRequest**](PhoneOtpSubmitRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **create_child_user** +> User create_child_user(create_child_user_request) + +create a child user + +create a child user + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + create_child_user_request = zarban.wallet.openapi_client.CreateChildUserRequest() # CreateChildUserRequest | + + try: + # create a child user + api_response = api_instance.create_child_user(create_child_user_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->create_child_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_child_user_request** | [**CreateChildUserRequest**](CreateChildUserRequest.md)| | + +### Return type + +[**User**](User.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server 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) + +# **get_user_profile** +> ProfileResponse get_user_profile() + +Get profile + +Get the profile of the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + + try: + # Get profile + api_response = api_instance.get_user_profile() + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_profile: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ProfileResponse**](ProfileResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **submit_email_confirmation_otp** +> SimpleResponse submit_email_confirmation_otp(email_otp_submit_request) + +Submit email confirmation OTP + +Submit email confirmation OTP for the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + email_otp_submit_request = zarban.wallet.openapi_client.EmailOtpSubmitRequest() # EmailOtpSubmitRequest | + + try: + # Submit email confirmation OTP + api_response = api_instance.submit_email_confirmation_otp(email_otp_submit_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->submit_email_confirmation_otp: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_otp_submit_request** | [**EmailOtpSubmitRequest**](EmailOtpSubmitRequest.md)| | + +### Return type + +[**SimpleResponse**](SimpleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **submit_kyc** +> KycResponse submit_kyc(kyc_request) + +Submit KYC + +Submit KYC for the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + kyc_request = zarban.wallet.openapi_client.KycRequest() # KycRequest | + + try: + # Submit KYC + api_response = api_instance.submit_kyc(kyc_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->submit_kyc: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kyc_request** | [**KycRequest**](KycRequest.md)| | + +### Return type + +[**KycResponse**](KycResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **verify_phone_number** +> verify_phone_number(update_phone_request) + +Verify phone number + +Verify the phone number of the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + update_phone_request = zarban.wallet.openapi_client.UpdatePhoneRequest() # UpdatePhoneRequest | + + try: + # Verify phone number + api_instance.verify_phone_number(update_phone_request) + except ApiException as e: + print("Exception when calling UserApi->verify_phone_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_phone_request** | [**UpdatePhoneRequest**](UpdatePhoneRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **verify_user_email_address** +> SimpleResponse verify_user_email_address(update_email_request) + +Verify email + +Verify the email of the user. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.UserApi(api_client) + update_email_request = zarban.wallet.openapi_client.UpdateEmailRequest() # UpdateEmailRequest | + + try: + # Verify email + api_response = api_instance.verify_user_email_address(update_email_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->verify_user_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_email_request** | [**UpdateEmailRequest**](UpdateEmailRequest.md)| | + +### Return type + +[**SimpleResponse**](SimpleResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/UserError.md b/src/zarban/wallet/docs/UserError.md index de6550e..f7d6be3 100644 --- a/src/zarban/wallet/docs/UserError.md +++ b/src/zarban/wallet/docs/UserError.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**messages** | [**dict(str, UserErrorMessages)**](UserErrorMessages.md) | Localized error messages | +**messages** | [**dict(str, ErrorDetail)**](ErrorDetail.md) | Localized error messages | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/WalletBalance.md b/src/zarban/wallet/docs/WalletBalance.md index 29ad12a..5a277a4 100644 --- a/src/zarban/wallet/docs/WalletBalance.md +++ b/src/zarban/wallet/docs/WalletBalance.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **dict(str, str)** | | +**total** | [**Currency**](Currency.md) | | **balances** | [**list[Balance]**](Balance.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/WebsocketApi.md b/src/zarban/wallet/docs/WebsocketApi.md deleted file mode 100644 index 291b239..0000000 --- a/src/zarban/wallet/docs/WebsocketApi.md +++ /dev/null @@ -1,66 +0,0 @@ -# openapi_client.WebsocketApi - -All URIs are relative to *https://walletapi.zarban.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ws_get**](WebsocketApi.md#ws_get) | **GET** /ws | Websocket Upgrade - - -# **ws_get** -> ws_get() - -Websocket Upgrade - -Upgrade to websocket connection - -### Example - -```python -from __future__ import print_function -import time -import openapi_client -from openapi_client.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://walletapi.zarban.io -# See configuration.py for a list of all supported configuration parameters. -configuration = openapi_client.Configuration( - host = "https://walletapi.zarban.io" -) - - -# Enter a context with an instance of the API client -with openapi_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = openapi_client.WebsocketApi(api_client) - - try: - # Websocket Upgrade - api_instance.ws_get() - except ApiException as e: - print("Exception when calling WebsocketApi->ws_get: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**101** | Switching Protocols | - | - -[[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/src/zarban/wallet/docs/WithdrawApi.md b/src/zarban/wallet/docs/WithdrawApi.md new file mode 100644 index 0000000..c15e866 --- /dev/null +++ b/src/zarban/wallet/docs/WithdrawApi.md @@ -0,0 +1,308 @@ +# zarban.wallet.openapi_client.WithdrawApi + +All URIs are relative to *https://wapi.zarban.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_withdraw_requests**](WithdrawApi.md#get_user_withdraw_requests) | **GET** /withdraws | Get user withdraw requests +[**get_withdrawal_status**](WithdrawApi.md#get_withdrawal_status) | **GET** /withdraws/{id} | Get withdrawal status +[**preview_withdrawal**](WithdrawApi.md#preview_withdrawal) | **POST** /withdraws/preview | Withdraw request +[**request_withdrawal**](WithdrawApi.md#request_withdrawal) | **POST** /withdraws/request | Withdraw request + + +# **get_user_withdraw_requests** +> WithdrawRequestResponse get_user_withdraw_requests() + +Get user withdraw requests + +Get user withdraw requests + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.WithdrawApi(api_client) + + try: + # Get user withdraw requests + api_response = api_instance.get_user_withdraw_requests() + pprint(api_response) + except ApiException as e: + print("Exception when calling WithdrawApi->get_user_withdraw_requests: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WithdrawRequestResponse**](WithdrawRequestResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **get_withdrawal_status** +> WithdrawRequest get_withdrawal_status(id) + +Get withdrawal status + +Get the status of a withdrawal request. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.WithdrawApi(api_client) + id = 56 # int | Withdrawal request ID + + try: + # Get withdrawal status + api_response = api_instance.get_withdrawal_status(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WithdrawApi->get_withdrawal_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Withdrawal request ID | + +### Return type + +[**WithdrawRequest**](WithdrawRequest.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + +# **preview_withdrawal** +> WithdrawRequestPreview preview_withdrawal(withdraw_request_body) + +Withdraw request + +Request a withdrawal from the wallet. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.WithdrawApi(api_client) + withdraw_request_body = zarban.wallet.openapi_client.WithdrawRequestBody() # WithdrawRequestBody | + + try: + # Withdraw request + api_response = api_instance.preview_withdrawal(withdraw_request_body) + pprint(api_response) + except ApiException as e: + print("Exception when calling WithdrawApi->preview_withdrawal: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **withdraw_request_body** | [**WithdrawRequestBody**](WithdrawRequestBody.md)| | + +### Return type + +[**WithdrawRequestPreview**](WithdrawRequestPreview.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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_withdrawal** +> WithdrawResponseBody request_withdrawal(withdraw_request_body) + +Withdraw request + +Request a withdrawal from the wallet. + +### Example + +* Bearer (JWT) Authentication (bearerAuth): +```python +from __future__ import print_function +import time +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://wapi.zarban.io +# See configuration.py for a list of all supported configuration parameters. +configuration = zarban.wallet.openapi_client.Configuration( + host = "https://wapi.zarban.io" +) + +# 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 (JWT): bearerAuth +configuration = zarban.wallet.openapi_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with zarban.wallet.openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zarban.wallet.openapi_client.WithdrawApi(api_client) + withdraw_request_body = zarban.wallet.openapi_client.WithdrawRequestBody() # WithdrawRequestBody | + + try: + # Withdraw request + api_response = api_instance.request_withdrawal(withdraw_request_body) + pprint(api_response) + except ApiException as e: + print("Exception when calling WithdrawApi->request_withdrawal: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **withdraw_request_body** | [**WithdrawRequestBody**](WithdrawRequestBody.md)| | + +### Return type + +[**WithdrawResponseBody**](WithdrawResponseBody.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server 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) + diff --git a/src/zarban/wallet/docs/InlineObject7.md b/src/zarban/wallet/docs/WithdrawRequestBody.md similarity index 95% rename from src/zarban/wallet/docs/InlineObject7.md rename to src/zarban/wallet/docs/WithdrawRequestBody.md index 31d8830..0b4e9a3 100644 --- a/src/zarban/wallet/docs/InlineObject7.md +++ b/src/zarban/wallet/docs/WithdrawRequestBody.md @@ -1,4 +1,4 @@ -# InlineObject7 +# WithdrawRequestBody ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/docs/WithdrawRequestPreview.md b/src/zarban/wallet/docs/WithdrawRequestPreview.md index 13d88ae..1b9b400 100644 --- a/src/zarban/wallet/docs/WithdrawRequestPreview.md +++ b/src/zarban/wallet/docs/WithdrawRequestPreview.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes **address** | **str** | Withdrawal address | **network** | [**Network**](Network.md) | | **symbol** | [**Symbol**](Symbol.md) | | -**amount** | **dict(str, str)** | | -**fee** | **dict(str, str)** | | -**balance_after_withdraw** | **dict(str, str)** | | +**amount** | [**Currency**](Currency.md) | | +**fee** | [**Currency**](Currency.md) | | +**balance_after_withdraw** | [**Currency**](Currency.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/InlineResponse2003.md b/src/zarban/wallet/docs/WithdrawRequestResponse.md similarity index 75% rename from src/zarban/wallet/docs/InlineResponse2003.md rename to src/zarban/wallet/docs/WithdrawRequestResponse.md index 9c6b48d..0ffe8b0 100644 --- a/src/zarban/wallet/docs/InlineResponse2003.md +++ b/src/zarban/wallet/docs/WithdrawRequestResponse.md @@ -1,9 +1,9 @@ -# InlineResponse2003 +# WithdrawRequestResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**quote** | [**SwapResponse**](SwapResponse.md) | | [optional] +**data** | [**list[WithdrawRequest]**](WithdrawRequest.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/zarban/wallet/docs/InlineResponse2004.md b/src/zarban/wallet/docs/WithdrawResponseBody.md similarity index 93% rename from src/zarban/wallet/docs/InlineResponse2004.md rename to src/zarban/wallet/docs/WithdrawResponseBody.md index 203d4d2..3433cfb 100644 --- a/src/zarban/wallet/docs/InlineResponse2004.md +++ b/src/zarban/wallet/docs/WithdrawResponseBody.md @@ -1,4 +1,4 @@ -# InlineResponse2004 +# WithdrawResponseBody ## Properties Name | Type | Description | Notes diff --git a/src/zarban/wallet/openapi_client/__init__.py b/src/zarban/wallet/openapi_client/__init__.py index 17da27c..784373c 100644 --- a/src/zarban/wallet/openapi_client/__init__.py +++ b/src/zarban/wallet/openapi_client/__init__.py @@ -8,6 +8,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -17,8 +18,21 @@ __version__ = "1.0.0" # import apis into sdk package +from zarban.wallet.openapi_client.api.auth_api import AuthApi +from zarban.wallet.openapi_client.api.balance_api import BalanceApi +from zarban.wallet.openapi_client.api.coins_api import CoinsApi +from zarban.wallet.openapi_client.api.deposit_api import DepositApi +from zarban.wallet.openapi_client.api.health_api import HealthApi from zarban.wallet.openapi_client.api.loans_api import LoansApi -from zarban.wallet.openapi_client.api.default_api import DefaultApi +from zarban.wallet.openapi_client.api.payment_api import PaymentApi +from zarban.wallet.openapi_client.api.points_api import PointsApi +from zarban.wallet.openapi_client.api.redemptions_api import RedemptionsApi +from zarban.wallet.openapi_client.api.referrals_api import ReferralsApi +from zarban.wallet.openapi_client.api.swap_api import SwapApi +from zarban.wallet.openapi_client.api.tasks_api import TasksApi +from zarban.wallet.openapi_client.api.transactions_api import TransactionsApi +from zarban.wallet.openapi_client.api.user_api import UserApi +from zarban.wallet.openapi_client.api.withdraw_api import WithdrawApi # import ApiClient from zarban.wallet.openapi_client.api_client import ApiClient @@ -33,27 +47,31 @@ from zarban.wallet.openapi_client.models.auth_telegram_request import AuthTelegramRequest from zarban.wallet.openapi_client.models.balance import Balance from zarban.wallet.openapi_client.models.bank_info import BankInfo +from zarban.wallet.openapi_client.models.bullet_content import BulletContent from zarban.wallet.openapi_client.models.coin import Coin from zarban.wallet.openapi_client.models.coin_config import CoinConfig -from zarban.wallet.openapi_client.models.coin_content import CoinContent +from zarban.wallet.openapi_client.models.coin_response import CoinResponse from zarban.wallet.openapi_client.models.create_child_user_request import CreateChildUserRequest +from zarban.wallet.openapi_client.models.currency import Currency from zarban.wallet.openapi_client.models.deposit_response import DepositResponse from zarban.wallet.openapi_client.models.detailed_loan_to_value_options import DetailedLoanToValueOptions from zarban.wallet.openapi_client.models.email_otp_submit_request import EmailOtpSubmitRequest from zarban.wallet.openapi_client.models.error import Error +from zarban.wallet.openapi_client.models.error_detail import ErrorDetail from zarban.wallet.openapi_client.models.external_transaction import ExternalTransaction from zarban.wallet.openapi_client.models.friend_points import FriendPoints +from zarban.wallet.openapi_client.models.friend_points_response import FriendPointsResponse from zarban.wallet.openapi_client.models.health_status import HealthStatus from zarban.wallet.openapi_client.models.jwt_response import JwtResponse from zarban.wallet.openapi_client.models.kyc_confirm_request import KycConfirmRequest from zarban.wallet.openapi_client.models.kyc_request import KycRequest from zarban.wallet.openapi_client.models.kyc_response import KycResponse -from zarban.wallet.openapi_client.models.loan import Loan from zarban.wallet.openapi_client.models.loan_create_request import LoanCreateRequest -from zarban.wallet.openapi_client.models.loan_create_response import LoanCreateResponse from zarban.wallet.openapi_client.models.loan_plan import LoanPlan +from zarban.wallet.openapi_client.models.loan_plan_response import LoanPlanResponse from zarban.wallet.openapi_client.models.loan_to_value_options import LoanToValueOptions from zarban.wallet.openapi_client.models.loans_response import LoansResponse +from zarban.wallet.openapi_client.models.loans_response_list import LoansResponseList from zarban.wallet.openapi_client.models.login_request import LoginRequest from zarban.wallet.openapi_client.models.network import Network from zarban.wallet.openapi_client.models.payment import Payment @@ -62,35 +80,31 @@ from zarban.wallet.openapi_client.models.profile_response import ProfileResponse from zarban.wallet.openapi_client.models.redemption import Redemption from zarban.wallet.openapi_client.models.redemption_request import RedemptionRequest +from zarban.wallet.openapi_client.models.redemption_response import RedemptionResponse from zarban.wallet.openapi_client.models.referral import Referral -from zarban.wallet.openapi_client.models.referral_create_request import ReferralCreateRequest -from zarban.wallet.openapi_client.models.referral_create_response import ReferralCreateResponse +from zarban.wallet.openapi_client.models.referral_response import ReferralResponse from zarban.wallet.openapi_client.models.repay_loan_request import RepayLoanRequest -from zarban.wallet.openapi_client.models.repay_loan_response import RepayLoanResponse from zarban.wallet.openapi_client.models.sign_up_request import SignUpRequest from zarban.wallet.openapi_client.models.simple_response import SimpleResponse -from zarban.wallet.openapi_client.models.swap_quote_request import SwapQuoteRequest from zarban.wallet.openapi_client.models.swap_request import SwapRequest from zarban.wallet.openapi_client.models.swap_response import SwapResponse from zarban.wallet.openapi_client.models.symbol import Symbol from zarban.wallet.openapi_client.models.task import Task -from zarban.wallet.openapi_client.models.task_completion_request import TaskCompletionRequest -from zarban.wallet.openapi_client.models.task_completion_response import TaskCompletionResponse +from zarban.wallet.openapi_client.models.task_response import TaskResponse from zarban.wallet.openapi_client.models.telegram_profile import TelegramProfile from zarban.wallet.openapi_client.models.timestamp import Timestamp from zarban.wallet.openapi_client.models.transaction import Transaction +from zarban.wallet.openapi_client.models.transaction_response import TransactionResponse from zarban.wallet.openapi_client.models.transaction_status import TransactionStatus from zarban.wallet.openapi_client.models.transaction_type import TransactionType from zarban.wallet.openapi_client.models.update_email_request import UpdateEmailRequest from zarban.wallet.openapi_client.models.update_phone_request import UpdatePhoneRequest from zarban.wallet.openapi_client.models.user import User from zarban.wallet.openapi_client.models.user_error import UserError -from zarban.wallet.openapi_client.models.user_error_messages import UserErrorMessages from zarban.wallet.openapi_client.models.wallet_balance import WalletBalance from zarban.wallet.openapi_client.models.withdraw_request import WithdrawRequest from zarban.wallet.openapi_client.models.withdraw_request_body import WithdrawRequestBody from zarban.wallet.openapi_client.models.withdraw_request_preview import WithdrawRequestPreview -from zarban.wallet.openapi_client.models.withdraw_response import WithdrawResponse +from zarban.wallet.openapi_client.models.withdraw_request_response import WithdrawRequestResponse from zarban.wallet.openapi_client.models.withdraw_response_body import WithdrawResponseBody -from zarban.wallet.openapi_client.models.withdraw_response_preview import WithdrawResponsePreview diff --git a/src/zarban/wallet/openapi_client/api/__init__.py b/src/zarban/wallet/openapi_client/api/__init__.py index 897bd8c..fff3a1b 100644 --- a/src/zarban/wallet/openapi_client/api/__init__.py +++ b/src/zarban/wallet/openapi_client/api/__init__.py @@ -3,5 +3,18 @@ # flake8: noqa # import apis into api package +from zarban.wallet.openapi_client.api.auth_api import AuthApi +from zarban.wallet.openapi_client.api.balance_api import BalanceApi +from zarban.wallet.openapi_client.api.coins_api import CoinsApi +from zarban.wallet.openapi_client.api.deposit_api import DepositApi +from zarban.wallet.openapi_client.api.health_api import HealthApi from zarban.wallet.openapi_client.api.loans_api import LoansApi -from zarban.wallet.openapi_client.api.default_api import DefaultApi +from zarban.wallet.openapi_client.api.payment_api import PaymentApi +from zarban.wallet.openapi_client.api.points_api import PointsApi +from zarban.wallet.openapi_client.api.redemptions_api import RedemptionsApi +from zarban.wallet.openapi_client.api.referrals_api import ReferralsApi +from zarban.wallet.openapi_client.api.swap_api import SwapApi +from zarban.wallet.openapi_client.api.tasks_api import TasksApi +from zarban.wallet.openapi_client.api.transactions_api import TransactionsApi +from zarban.wallet.openapi_client.api.user_api import UserApi +from zarban.wallet.openapi_client.api.withdraw_api import WithdrawApi diff --git a/src/zarban/wallet/openapi_client/api/auth_api.py b/src/zarban/wallet/openapi_client/api/auth_api.py new file mode 100644 index 0000000..f854fe6 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/auth_api.py @@ -0,0 +1,734 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AuthApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def authenticate_with_telegram(self, auth_telegram_request, **kwargs): # noqa: E501 + """Authenticate with Telegram # noqa: E501 + + Authenticate with Telegram and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.authenticate_with_telegram(auth_telegram_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param AuthTelegramRequest auth_telegram_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: JwtResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.authenticate_with_telegram_with_http_info(auth_telegram_request, **kwargs) # noqa: E501 + + def authenticate_with_telegram_with_http_info(self, auth_telegram_request, **kwargs): # noqa: E501 + """Authenticate with Telegram # noqa: E501 + + Authenticate with Telegram and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.authenticate_with_telegram_with_http_info(auth_telegram_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param AuthTelegramRequest auth_telegram_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'auth_telegram_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method authenticate_with_telegram" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'auth_telegram_request' is set + if self.api_client.client_side_validation and ('auth_telegram_request' not in local_var_params or # noqa: E501 + local_var_params['auth_telegram_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `auth_telegram_request` when calling `authenticate_with_telegram`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'auth_telegram_request' in local_var_params: + body_params = local_var_params['auth_telegram_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/auth/telegram', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JwtResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_jwt_token(self, duration, **kwargs): # noqa: E501 + """Generate a JWT token # noqa: E501 + + Generate a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_jwt_token(duration, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int duration: Token duration in days (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: JwtResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.generate_jwt_token_with_http_info(duration, **kwargs) # noqa: E501 + + def generate_jwt_token_with_http_info(self, duration, **kwargs): # noqa: E501 + """Generate a JWT token # noqa: E501 + + Generate a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_jwt_token_with_http_info(duration, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int duration: Token duration in days (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'duration' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_jwt_token" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'duration' is set + if self.api_client.client_side_validation and ('duration' not in local_var_params or # noqa: E501 + local_var_params['duration'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `duration` when calling `generate_jwt_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'duration' in local_var_params and local_var_params['duration'] is not None: # noqa: E501 + query_params.append(('duration', local_var_params['duration'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/auth/token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JwtResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_otp(self, channel, **kwargs): # noqa: E501 + """Get OTP # noqa: E501 + + Get OTP for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_otp(channel, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str channel: Channel to send OTP (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SimpleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_otp_with_http_info(channel, **kwargs) # noqa: E501 + + def get_otp_with_http_info(self, channel, **kwargs): # noqa: E501 + """Get OTP # noqa: E501 + + Get OTP for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_otp_with_http_info(channel, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str channel: Channel to send OTP (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'channel' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_otp" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'channel' is set + if self.api_client.client_side_validation and ('channel' not in local_var_params or # noqa: E501 + local_var_params['channel'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `channel` when calling `get_otp`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'channel' in local_var_params and local_var_params['channel'] is not None: # noqa: E501 + query_params.append(('channel', local_var_params['channel'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/auth/otp', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SimpleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def login_with_email_and_password(self, login_request, **kwargs): # noqa: E501 + """Login with email and password # noqa: E501 + + Login with email and password and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_with_email_and_password(login_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param LoginRequest login_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: JwtResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.login_with_email_and_password_with_http_info(login_request, **kwargs) # noqa: E501 + + def login_with_email_and_password_with_http_info(self, login_request, **kwargs): # noqa: E501 + """Login with email and password # noqa: E501 + + Login with email and password and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.login_with_email_and_password_with_http_info(login_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param LoginRequest login_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'login_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method login_with_email_and_password" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'login_request' is set + if self.api_client.client_side_validation and ('login_request' not in local_var_params or # noqa: E501 + local_var_params['login_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `login_request` when calling `login_with_email_and_password`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'login_request' in local_var_params: + body_params = local_var_params['login_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/auth/login', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JwtResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def signup_with_email_and_password(self, sign_up_request, **kwargs): # noqa: E501 + """signup with email and password # noqa: E501 + + signup with email and password and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.signup_with_email_and_password(sign_up_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SignUpRequest sign_up_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SimpleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.signup_with_email_and_password_with_http_info(sign_up_request, **kwargs) # noqa: E501 + + def signup_with_email_and_password_with_http_info(self, sign_up_request, **kwargs): # noqa: E501 + """signup with email and password # noqa: E501 + + signup with email and password and get a JWT token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.signup_with_email_and_password_with_http_info(sign_up_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SignUpRequest sign_up_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sign_up_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method signup_with_email_and_password" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'sign_up_request' is set + if self.api_client.client_side_validation and ('sign_up_request' not in local_var_params or # noqa: E501 + local_var_params['sign_up_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sign_up_request` when calling `signup_with_email_and_password`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sign_up_request' in local_var_params: + body_params = local_var_params['sign_up_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/auth/signup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SimpleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_user_email(self, token, **kwargs): # noqa: E501 + """Verify email # noqa: E501 + + Verify the email of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_user_email(token, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str token: Verification token (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: JwtResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.verify_user_email_with_http_info(token, **kwargs) # noqa: E501 + + def verify_user_email_with_http_info(self, token, **kwargs): # noqa: E501 + """Verify email # noqa: E501 + + Verify the email of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_user_email_with_http_info(token, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str token: Verification token (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'token' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_user_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'token' is set + if self.api_client.client_side_validation and ('token' not in local_var_params or # noqa: E501 + local_var_params['token'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `token` when calling `verify_user_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'token' in local_var_params and local_var_params['token'] is not None: # noqa: E501 + query_params.append(('token', local_var_params['token'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/verify-email', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JwtResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/balance_api.py b/src/zarban/wallet/openapi_client/api/balance_api.py new file mode 100644 index 0000000..8b64769 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/balance_api.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BalanceApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_balance_by_symbol(self, symbol, **kwargs): # noqa: E501 + """Get balance # noqa: E501 + + Get the balance by a symbol. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_balance_by_symbol(symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param Symbol symbol: Coin symbol (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Balance + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_balance_by_symbol_with_http_info(symbol, **kwargs) # noqa: E501 + + def get_balance_by_symbol_with_http_info(self, symbol, **kwargs): # noqa: E501 + """Get balance # noqa: E501 + + Get the balance by a symbol. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_balance_by_symbol_with_http_info(symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param Symbol symbol: Coin symbol (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Balance, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbol' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_balance_by_symbol" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'symbol' is set + if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 + local_var_params['symbol'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `symbol` when calling `get_balance_by_symbol`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'symbol' in local_var_params: + path_params['symbol'] = local_var_params['symbol'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/balance/{symbol}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Balance', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_wallet_balance(self, **kwargs): # noqa: E501 + """Get wallet balance # noqa: E501 + + Get the balance of the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_wallet_balance(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: WalletBalance + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_wallet_balance_with_http_info(**kwargs) # noqa: E501 + + def get_wallet_balance_with_http_info(self, **kwargs): # noqa: E501 + """Get wallet balance # noqa: E501 + + Get the balance of the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_wallet_balance_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(WalletBalance, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_wallet_balance" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/balance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WalletBalance', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/coins_api.py b/src/zarban/wallet/openapi_client/api/coins_api.py new file mode 100644 index 0000000..0c4266e --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/coins_api.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CoinsApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_coin_details(self, symbol, **kwargs): # noqa: E501 + """Get coin # noqa: E501 + + Get the details of a coin. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_coin_details(symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param Symbol symbol: Coin symbol (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Coin + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_coin_details_with_http_info(symbol, **kwargs) # noqa: E501 + + def get_coin_details_with_http_info(self, symbol, **kwargs): # noqa: E501 + """Get coin # noqa: E501 + + Get the details of a coin. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_coin_details_with_http_info(symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param Symbol symbol: Coin symbol (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Coin, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'symbol' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_coin_details" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'symbol' is set + if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 + local_var_params['symbol'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `symbol` when calling `get_coin_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'symbol' in local_var_params: + path_params['symbol'] = local_var_params['symbol'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/coins/{symbol}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Coin', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_supported_coins(self, **kwargs): # noqa: E501 + """Get coins # noqa: E501 + + Get the list of supported coins. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_supported_coins(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: CoinResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_supported_coins_with_http_info(**kwargs) # noqa: E501 + + def get_supported_coins_with_http_info(self, **kwargs): # noqa: E501 + """Get coins # noqa: E501 + + Get the list of supported coins. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_supported_coins_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(CoinResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_supported_coins" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/coins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CoinResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/default_api.py b/src/zarban/wallet/openapi_client/api/default_api.py deleted file mode 100644 index 4e690e3..0000000 --- a/src/zarban/wallet/openapi_client/api/default_api.py +++ /dev/null @@ -1,4723 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zarban.wallet.openapi_client.api_client import ApiClient -from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class DefaultApi(object): - """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): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def admin_redemptions_get(self, **kwargs): # noqa: E501 - """Get all redemptions # noqa: E501 - - Get a list of all redemptions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: Cursor for pagination - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[Redemption] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.admin_redemptions_get_with_http_info(**kwargs) # noqa: E501 - - def admin_redemptions_get_with_http_info(self, **kwargs): # noqa: E501 - """Get all redemptions # noqa: E501 - - Get a list of all redemptions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: Cursor for pagination - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[Redemption], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'state' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method admin_redemptions_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 - query_params.append(('state', local_var_params['state'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/admin/redemptions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Redemption]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def admin_redemptions_id_get(self, id, **kwargs): # noqa: E501 - """Get redemption # noqa: E501 - - Get the details of a redemption. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_id_get(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int id: Redemption ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Redemption - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.admin_redemptions_id_get_with_http_info(id, **kwargs) # noqa: E501 - - def admin_redemptions_id_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get redemption # noqa: E501 - - Get the details of a redemption. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_id_get_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int id: Redemption ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method admin_redemptions_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `admin_redemptions_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/admin/redemptions/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Redemption', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def admin_redemptions_id_post(self, id, admin_redemption_update_request, **kwargs): # noqa: E501 - """Update redemption # noqa: E501 - - Update the status of a redemption. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_id_post(id, admin_redemption_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: Redemption ID (required) - :param AdminRedemptionUpdateRequest admin_redemption_update_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Redemption - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.admin_redemptions_id_post_with_http_info(id, admin_redemption_update_request, **kwargs) # noqa: E501 - - def admin_redemptions_id_post_with_http_info(self, id, admin_redemption_update_request, **kwargs): # noqa: E501 - """Update redemption # noqa: E501 - - Update the status of a redemption. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.admin_redemptions_id_post_with_http_info(id, admin_redemption_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: Redemption ID (required) - :param AdminRedemptionUpdateRequest admin_redemption_update_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'id', - 'admin_redemption_update_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method admin_redemptions_id_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `admin_redemptions_id_post`") # noqa: E501 - # verify the required parameter 'admin_redemption_update_request' is set - if self.api_client.client_side_validation and ('admin_redemption_update_request' not in local_var_params or # noqa: E501 - local_var_params['admin_redemption_update_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `admin_redemption_update_request` when calling `admin_redemptions_id_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'admin_redemption_update_request' in local_var_params: - body_params = local_var_params['admin_redemption_update_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/admin/redemptions/{id}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Redemption', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def auth_login_post(self, login_request, **kwargs): # noqa: E501 - """Login with email and password # noqa: E501 - - Login with email and password and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_login_post(login_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LoginRequest login_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: JwtResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.auth_login_post_with_http_info(login_request, **kwargs) # noqa: E501 - - def auth_login_post_with_http_info(self, login_request, **kwargs): # noqa: E501 - """Login with email and password # noqa: E501 - - Login with email and password and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_login_post_with_http_info(login_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LoginRequest login_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'login_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method auth_login_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'login_request' is set - if self.api_client.client_side_validation and ('login_request' not in local_var_params or # noqa: E501 - local_var_params['login_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `login_request` when calling `auth_login_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'login_request' in local_var_params: - body_params = local_var_params['login_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/auth/login', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def auth_signup_post(self, sign_up_request, **kwargs): # noqa: E501 - """signup with email and password # noqa: E501 - - signup with email and password and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_signup_post(sign_up_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param SignUpRequest sign_up_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: SimpleResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.auth_signup_post_with_http_info(sign_up_request, **kwargs) # noqa: E501 - - def auth_signup_post_with_http_info(self, sign_up_request, **kwargs): # noqa: E501 - """signup with email and password # noqa: E501 - - signup with email and password and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_signup_post_with_http_info(sign_up_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param SignUpRequest sign_up_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sign_up_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method auth_signup_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'sign_up_request' is set - if self.api_client.client_side_validation and ('sign_up_request' not in local_var_params or # noqa: E501 - local_var_params['sign_up_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sign_up_request` when calling `auth_signup_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sign_up_request' in local_var_params: - body_params = local_var_params['sign_up_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/auth/signup', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SimpleResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def auth_telegram_post(self, auth_telegram_request, **kwargs): # noqa: E501 - """Authenticate with Telegram # noqa: E501 - - Authenticate with Telegram and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_telegram_post(auth_telegram_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param AuthTelegramRequest auth_telegram_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: JwtResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.auth_telegram_post_with_http_info(auth_telegram_request, **kwargs) # noqa: E501 - - def auth_telegram_post_with_http_info(self, auth_telegram_request, **kwargs): # noqa: E501 - """Authenticate with Telegram # noqa: E501 - - Authenticate with Telegram and get a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_telegram_post_with_http_info(auth_telegram_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param AuthTelegramRequest auth_telegram_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'auth_telegram_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method auth_telegram_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'auth_telegram_request' is set - if self.api_client.client_side_validation and ('auth_telegram_request' not in local_var_params or # noqa: E501 - local_var_params['auth_telegram_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `auth_telegram_request` when calling `auth_telegram_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'auth_telegram_request' in local_var_params: - body_params = local_var_params['auth_telegram_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/auth/telegram', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def auth_token_get(self, duration, **kwargs): # noqa: E501 - """Generate a JWT token # noqa: E501 - - Generate a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_token_get(duration, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int duration: Token duration in days (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: JwtResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.auth_token_get_with_http_info(duration, **kwargs) # noqa: E501 - - def auth_token_get_with_http_info(self, duration, **kwargs): # noqa: E501 - """Generate a JWT token # noqa: E501 - - Generate a JWT token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_token_get_with_http_info(duration, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int duration: Token duration in days (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'duration' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method auth_token_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'duration' is set - if self.api_client.client_side_validation and ('duration' not in local_var_params or # noqa: E501 - local_var_params['duration'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `duration` when calling `auth_token_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'duration' in local_var_params and local_var_params['duration'] is not None: # noqa: E501 - query_params.append(('duration', local_var_params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/auth/token', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def balance_get(self, **kwargs): # noqa: E501 - """Get wallet balance # noqa: E501 - - Get the balance of the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.balance_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: WalletBalance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.balance_get_with_http_info(**kwargs) # noqa: E501 - - def balance_get_with_http_info(self, **kwargs): # noqa: E501 - """Get wallet balance # noqa: E501 - - Get the balance of the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.balance_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(WalletBalance, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method balance_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/balance', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='WalletBalance', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def balance_symbol_get(self, symbol, **kwargs): # noqa: E501 - """Get balance # noqa: E501 - - Get the balance by a symbol. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.balance_symbol_get(symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param Symbol symbol: Coin symbol (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Balance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.balance_symbol_get_with_http_info(symbol, **kwargs) # noqa: E501 - - def balance_symbol_get_with_http_info(self, symbol, **kwargs): # noqa: E501 - """Get balance # noqa: E501 - - Get the balance by a symbol. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.balance_symbol_get_with_http_info(symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param Symbol symbol: Coin symbol (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Balance, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'symbol' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method balance_symbol_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'symbol' is set - if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 - local_var_params['symbol'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `symbol` when calling `balance_symbol_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'symbol' in local_var_params: - path_params['symbol'] = local_var_params['symbol'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/balance/{symbol}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Balance', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def coins_get(self, **kwargs): # noqa: E501 - """Get coins # noqa: E501 - - Get the list of supported coins. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.coins_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[Coin] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.coins_get_with_http_info(**kwargs) # noqa: E501 - - def coins_get_with_http_info(self, **kwargs): # noqa: E501 - """Get coins # noqa: E501 - - Get the list of supported coins. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.coins_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[Coin], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method coins_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/coins', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Coin]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def coins_symbol_get(self, symbol, **kwargs): # noqa: E501 - """Get coin # noqa: E501 - - Get the details of a coin. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.coins_symbol_get(symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param Symbol symbol: Coin symbol (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Coin - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.coins_symbol_get_with_http_info(symbol, **kwargs) # noqa: E501 - - def coins_symbol_get_with_http_info(self, symbol, **kwargs): # noqa: E501 - """Get coin # noqa: E501 - - Get the details of a coin. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.coins_symbol_get_with_http_info(symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param Symbol symbol: Coin symbol (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Coin, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'symbol' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method coins_symbol_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'symbol' is set - if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 - local_var_params['symbol'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `symbol` when calling `coins_symbol_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'symbol' in local_var_params: - path_params['symbol'] = local_var_params['symbol'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/coins/{symbol}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Coin', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def deposit_get(self, network, symbol, **kwargs): # noqa: E501 - """Deposit money # noqa: E501 - - Deposit money to the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.deposit_get(network, symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str network: Network to deposit (required) - :param str symbol: Coin symbol (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: DepositResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.deposit_get_with_http_info(network, symbol, **kwargs) # noqa: E501 - - def deposit_get_with_http_info(self, network, symbol, **kwargs): # noqa: E501 - """Deposit money # noqa: E501 - - Deposit money to the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.deposit_get_with_http_info(network, symbol, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str network: Network to deposit (required) - :param str symbol: Coin symbol (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(DepositResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'network', - 'symbol' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method deposit_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'network' is set - if self.api_client.client_side_validation and ('network' not in local_var_params or # noqa: E501 - local_var_params['network'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `network` when calling `deposit_get`") # noqa: E501 - # verify the required parameter 'symbol' is set - if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 - local_var_params['symbol'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `symbol` when calling `deposit_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'network' in local_var_params and local_var_params['network'] is not None: # noqa: E501 - query_params.append(('network', local_var_params['network'])) # noqa: E501 - if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 - query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/deposit', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DepositResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def healthz_get(self, **kwargs): # noqa: E501 - """Health check # noqa: E501 - - Check the health of the API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.healthz_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: HealthStatus - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.healthz_get_with_http_info(**kwargs) # noqa: E501 - - def healthz_get_with_http_info(self, **kwargs): # noqa: E501 - """Health check # noqa: E501 - - Check the health of the API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.healthz_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(HealthStatus, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method healthz_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/healthz', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='HealthStatus', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def loans_create_post(self, loan_create_request, **kwargs): # noqa: E501 - """Create vault # noqa: E501 - - Create a vault # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_create_post(loan_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LoanCreateRequest loan_create_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: LoansResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.loans_create_post_with_http_info(loan_create_request, **kwargs) # noqa: E501 - - def loans_create_post_with_http_info(self, loan_create_request, **kwargs): # noqa: E501 - """Create vault # noqa: E501 - - Create a vault # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_create_post_with_http_info(loan_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LoanCreateRequest loan_create_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'loan_create_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method loans_create_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'loan_create_request' is set - if self.api_client.client_side_validation and ('loan_create_request' not in local_var_params or # noqa: E501 - local_var_params['loan_create_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `loan_create_request` when calling `loans_create_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'loan_create_request' in local_var_params: - body_params = local_var_params['loan_create_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/loans/create', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LoansResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def loans_get(self, **kwargs): # noqa: E501 - """Get user loans # noqa: E501 - - Get a list of the user's loans. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: loan state - :param str plan_name: loan plan name - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[LoansResponse] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.loans_get_with_http_info(**kwargs) # noqa: E501 - - def loans_get_with_http_info(self, **kwargs): # noqa: E501 - """Get user loans # noqa: E501 - - Get a list of the user's loans. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: loan state - :param str plan_name: loan plan name - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[LoansResponse], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'state', - 'plan_name' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method loans_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 - query_params.append(('state', local_var_params['state'])) # noqa: E501 - if 'plan_name' in local_var_params and local_var_params['plan_name'] is not None: # noqa: E501 - query_params.append(('planName', local_var_params['plan_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/loans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[LoansResponse]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def loans_id_get(self, id, **kwargs): # noqa: E501 - """Get loan # noqa: E501 - - Get the details of a loan. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_id_get(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: Loan ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: LoansResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.loans_id_get_with_http_info(id, **kwargs) # noqa: E501 - - def loans_id_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get loan # noqa: E501 - - Get the details of a loan. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_id_get_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: Loan ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method loans_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `loans_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/loans/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LoansResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def loans_plans_get(self, **kwargs): # noqa: E501 - """Get all plan loans # noqa: E501 - - Get a list of the available plan loans. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_plans_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[LoanPlan] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.loans_plans_get_with_http_info(**kwargs) # noqa: E501 - - def loans_plans_get_with_http_info(self, **kwargs): # noqa: E501 - """Get all plan loans # noqa: E501 - - Get a list of the available plan loans. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_plans_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[LoanPlan], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method loans_plans_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loans/plans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[LoanPlan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def loans_repay_post(self, repay_loan_request, **kwargs): # noqa: E501 - """Repay Loan # noqa: E501 - - Repay a loan totally # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_repay_post(repay_loan_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param RepayLoanRequest repay_loan_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: LoansResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.loans_repay_post_with_http_info(repay_loan_request, **kwargs) # noqa: E501 - - def loans_repay_post_with_http_info(self, repay_loan_request, **kwargs): # noqa: E501 - """Repay Loan # noqa: E501 - - Repay a loan totally # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_repay_post_with_http_info(repay_loan_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param RepayLoanRequest repay_loan_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'repay_loan_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method loans_repay_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'repay_loan_request' is set - if self.api_client.client_side_validation and ('repay_loan_request' not in local_var_params or # noqa: E501 - local_var_params['repay_loan_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `repay_loan_request` when calling `loans_repay_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'repay_loan_request' in local_var_params: - body_params = local_var_params['repay_loan_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/loans/repay', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LoansResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def payments_post(self, payment_request, **kwargs): # noqa: E501 - """Create a payment # noqa: E501 - - Create a new payment. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.payments_post(payment_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param PaymentRequest payment_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.payments_post_with_http_info(payment_request, **kwargs) # noqa: E501 - - def payments_post_with_http_info(self, payment_request, **kwargs): # noqa: E501 - """Create a payment # noqa: E501 - - Create a new payment. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.payments_post_with_http_info(payment_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param PaymentRequest payment_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method payments_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'payment_request' is set - if self.api_client.client_side_validation and ('payment_request' not in local_var_params or # noqa: E501 - local_var_params['payment_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `payment_request` when calling `payments_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'payment_request' in local_var_params: - body_params = local_var_params['payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/payments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def points_frineds_get(self, **kwargs): # noqa: E501 - """Get friends points. # noqa: E501 - - Get friends points. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.points_frineds_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[FriendPoints] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.points_frineds_get_with_http_info(**kwargs) # noqa: E501 - - def points_frineds_get_with_http_info(self, **kwargs): # noqa: E501 - """Get friends points. # noqa: E501 - - Get friends points. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.points_frineds_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[FriendPoints], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method points_frineds_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/points/frineds', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FriendPoints]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def profile_get(self, **kwargs): # noqa: E501 - """Get profile # noqa: E501 - - Get the profile of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.profile_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: ProfileResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.profile_get_with_http_info(**kwargs) # noqa: E501 - - def profile_get_with_http_info(self, **kwargs): # noqa: E501 - """Get profile # noqa: E501 - - Get the profile of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.profile_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(ProfileResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method profile_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/profile', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ProfileResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def redemptions_post(self, redemption_request, **kwargs): # noqa: E501 - """Redeem zar # noqa: E501 - - Redeem zar # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.redemptions_post(redemption_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param RedemptionRequest redemption_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Redemption - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.redemptions_post_with_http_info(redemption_request, **kwargs) # noqa: E501 - - def redemptions_post_with_http_info(self, redemption_request, **kwargs): # noqa: E501 - """Redeem zar # noqa: E501 - - Redeem zar # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.redemptions_post_with_http_info(redemption_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param RedemptionRequest redemption_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'redemption_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method redemptions_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'redemption_request' is set - if self.api_client.client_side_validation and ('redemption_request' not in local_var_params or # noqa: E501 - local_var_params['redemption_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `redemption_request` when calling `redemptions_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'redemption_request' in local_var_params: - body_params = local_var_params['redemption_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/redemptions', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Redemption', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def referrals_get(self, **kwargs): # noqa: E501 - """Get referrals # noqa: E501 - - Get referrals by user ID or name. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: Referral name - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[Referral] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.referrals_get_with_http_info(**kwargs) # noqa: E501 - - def referrals_get_with_http_info(self, **kwargs): # noqa: E501 - """Get referrals # noqa: E501 - - Get referrals by user ID or name. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: Referral name - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[Referral], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method referrals_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/referrals', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Referral]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def referrals_referral_id_get(self, referral_id, **kwargs): # noqa: E501 - """Get referral by ID # noqa: E501 - - Get a referral by its ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_get(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: Referral - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.referrals_referral_id_get_with_http_info(referral_id, **kwargs) # noqa: E501 - - def referrals_referral_id_get_with_http_info(self, referral_id, **kwargs): # noqa: E501 - """Get referral by ID # noqa: E501 - - Get a referral by its ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_get_with_http_info(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(Referral, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'referral_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method referrals_referral_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'referral_id' is set - if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 - local_var_params['referral_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `referral_id` when calling `referrals_referral_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'referral_id' in local_var_params: - path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/referrals/{referralId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Referral', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def referrals_referral_id_redeem_post(self, referral_id, **kwargs): # noqa: E501 - """Redeem a referral # noqa: E501 - - Redeem a referral for a user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_redeem_post(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.referrals_referral_id_redeem_post_with_http_info(referral_id, **kwargs) # noqa: E501 - - def referrals_referral_id_redeem_post_with_http_info(self, referral_id, **kwargs): # noqa: E501 - """Redeem a referral # noqa: E501 - - Redeem a referral for a user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_redeem_post_with_http_info(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'referral_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method referrals_referral_id_redeem_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'referral_id' is set - if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 - local_var_params['referral_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `referral_id` when calling `referrals_referral_id_redeem_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'referral_id' in local_var_params: - path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/referrals/{referralId}/redeem', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def referrals_referral_id_validate_post(self, referral_id, **kwargs): # noqa: E501 - """Validate a referral # noqa: E501 - - Validate a referral to check if it can be redeemed. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_validate_post(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.referrals_referral_id_validate_post_with_http_info(referral_id, **kwargs) # noqa: E501 - - def referrals_referral_id_validate_post_with_http_info(self, referral_id, **kwargs): # noqa: E501 - """Validate a referral # noqa: E501 - - Validate a referral to check if it can be redeemed. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.referrals_referral_id_validate_post_with_http_info(referral_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int referral_id: Referral ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'referral_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method referrals_referral_id_validate_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'referral_id' is set - if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 - local_var_params['referral_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `referral_id` when calling `referrals_referral_id_validate_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'referral_id' in local_var_params: - path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/referrals/{referralId}/validate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def swap_post(self, swap_request, **kwargs): # noqa: E501 - """Swap coins # noqa: E501 - - Swap coins in the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_post(swap_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param SwapRequest swap_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: SwapResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.swap_post_with_http_info(swap_request, **kwargs) # noqa: E501 - - def swap_post_with_http_info(self, swap_request, **kwargs): # noqa: E501 - """Swap coins # noqa: E501 - - Swap coins in the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_post_with_http_info(swap_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param SwapRequest swap_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(SwapResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'swap_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method swap_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'swap_request' is set - if self.api_client.client_side_validation and ('swap_request' not in local_var_params or # noqa: E501 - local_var_params['swap_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `swap_request` when calling `swap_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'swap_request' in local_var_params: - body_params = local_var_params['swap_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/swap', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SwapResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def tasks_get(self, **kwargs): # noqa: E501 - """Get tasks # noqa: E501 - - Get the list of tasks. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.tasks_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[Task] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.tasks_get_with_http_info(**kwargs) # noqa: E501 - - def tasks_get_with_http_info(self, **kwargs): # noqa: E501 - """Get tasks # noqa: E501 - - Get the list of tasks. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.tasks_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[Task], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method tasks_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/tasks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Task]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def transactions_get(self, **kwargs): # noqa: E501 - """Get user transactions # noqa: E501 - - Get a list of the recent transactions of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transactions_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int cursor: Cursor for pagination - :param int limit: Limit the number of transactions returned (default is 100) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[Transaction] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.transactions_get_with_http_info(**kwargs) # noqa: E501 - - def transactions_get_with_http_info(self, **kwargs): # noqa: E501 - """Get user transactions # noqa: E501 - - Get a list of the recent transactions of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transactions_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int cursor: Cursor for pagination - :param int limit: Limit the number of transactions returned (default is 100) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[Transaction], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'cursor', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method transactions_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 - query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/transactions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Transaction]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_children_post(self, create_child_user_request, **kwargs): # noqa: E501 - """create a child user # noqa: E501 - - create a child user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_children_post(create_child_user_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CreateChildUserRequest create_child_user_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: User - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_children_post_with_http_info(create_child_user_request, **kwargs) # noqa: E501 - - def users_children_post_with_http_info(self, create_child_user_request, **kwargs): # noqa: E501 - """create a child user # noqa: E501 - - create a child user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_children_post_with_http_info(create_child_user_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CreateChildUserRequest create_child_user_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(User, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'create_child_user_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_children_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_child_user_request' is set - if self.api_client.client_side_validation and ('create_child_user_request' not in local_var_params or # noqa: E501 - local_var_params['create_child_user_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_child_user_request` when calling `users_children_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_child_user_request' in local_var_params: - body_params = local_var_params['create_child_user_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/children', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='User', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_email_confirm_post(self, email_otp_submit_request, **kwargs): # noqa: E501 - """Submit email confirmation OTP # noqa: E501 - - Submit email confirmation OTP for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_email_confirm_post(email_otp_submit_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param EmailOtpSubmitRequest email_otp_submit_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: SimpleResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_email_confirm_post_with_http_info(email_otp_submit_request, **kwargs) # noqa: E501 - - def users_email_confirm_post_with_http_info(self, email_otp_submit_request, **kwargs): # noqa: E501 - """Submit email confirmation OTP # noqa: E501 - - Submit email confirmation OTP for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_email_confirm_post_with_http_info(email_otp_submit_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param EmailOtpSubmitRequest email_otp_submit_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'email_otp_submit_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_email_confirm_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'email_otp_submit_request' is set - if self.api_client.client_side_validation and ('email_otp_submit_request' not in local_var_params or # noqa: E501 - local_var_params['email_otp_submit_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `email_otp_submit_request` when calling `users_email_confirm_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'email_otp_submit_request' in local_var_params: - body_params = local_var_params['email_otp_submit_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/email/confirm', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SimpleResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_email_post(self, update_email_request, **kwargs): # noqa: E501 - """Verify email # noqa: E501 - - Verify the email of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_email_post(update_email_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UpdateEmailRequest update_email_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: SimpleResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_email_post_with_http_info(update_email_request, **kwargs) # noqa: E501 - - def users_email_post_with_http_info(self, update_email_request, **kwargs): # noqa: E501 - """Verify email # noqa: E501 - - Verify the email of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_email_post_with_http_info(update_email_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UpdateEmailRequest update_email_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'update_email_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_email_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'update_email_request' is set - if self.api_client.client_side_validation and ('update_email_request' not in local_var_params or # noqa: E501 - local_var_params['update_email_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_email_request` when calling `users_email_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_email_request' in local_var_params: - body_params = local_var_params['update_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/email', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SimpleResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_kyc_confirm_post(self, kyc_confirm_request, **kwargs): # noqa: E501 - """Confirm KYC # noqa: E501 - - Confirm KYC for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_kyc_confirm_post(kyc_confirm_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param KycConfirmRequest kyc_confirm_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: SimpleResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_kyc_confirm_post_with_http_info(kyc_confirm_request, **kwargs) # noqa: E501 - - def users_kyc_confirm_post_with_http_info(self, kyc_confirm_request, **kwargs): # noqa: E501 - """Confirm KYC # noqa: E501 - - Confirm KYC for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_kyc_confirm_post_with_http_info(kyc_confirm_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param KycConfirmRequest kyc_confirm_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'kyc_confirm_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_kyc_confirm_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'kyc_confirm_request' is set - if self.api_client.client_side_validation and ('kyc_confirm_request' not in local_var_params or # noqa: E501 - local_var_params['kyc_confirm_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `kyc_confirm_request` when calling `users_kyc_confirm_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'kyc_confirm_request' in local_var_params: - body_params = local_var_params['kyc_confirm_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/kyc/confirm', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SimpleResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_kyc_post(self, kyc_request, **kwargs): # noqa: E501 - """Submit KYC # noqa: E501 - - Submit KYC for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_kyc_post(kyc_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param KycRequest kyc_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: KycResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_kyc_post_with_http_info(kyc_request, **kwargs) # noqa: E501 - - def users_kyc_post_with_http_info(self, kyc_request, **kwargs): # noqa: E501 - """Submit KYC # noqa: E501 - - Submit KYC for the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_kyc_post_with_http_info(kyc_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param KycRequest kyc_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(KycResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'kyc_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_kyc_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'kyc_request' is set - if self.api_client.client_side_validation and ('kyc_request' not in local_var_params or # noqa: E501 - local_var_params['kyc_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `kyc_request` when calling `users_kyc_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'kyc_request' in local_var_params: - body_params = local_var_params['kyc_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/kyc', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='KycResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_phone_confirm_post(self, phone_otp_submit_request, **kwargs): # noqa: E501 - """Confirm phone number # noqa: E501 - - Confirm the phone number of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_phone_confirm_post(phone_otp_submit_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param PhoneOtpSubmitRequest phone_otp_submit_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_phone_confirm_post_with_http_info(phone_otp_submit_request, **kwargs) # noqa: E501 - - def users_phone_confirm_post_with_http_info(self, phone_otp_submit_request, **kwargs): # noqa: E501 - """Confirm phone number # noqa: E501 - - Confirm the phone number of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_phone_confirm_post_with_http_info(phone_otp_submit_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param PhoneOtpSubmitRequest phone_otp_submit_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'phone_otp_submit_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_phone_confirm_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'phone_otp_submit_request' is set - if self.api_client.client_side_validation and ('phone_otp_submit_request' not in local_var_params or # noqa: E501 - local_var_params['phone_otp_submit_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `phone_otp_submit_request` when calling `users_phone_confirm_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'phone_otp_submit_request' in local_var_params: - body_params = local_var_params['phone_otp_submit_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/phone/confirm', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def users_phone_post(self, update_phone_request, **kwargs): # noqa: E501 - """Verify phone number # noqa: E501 - - Verify the phone number of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_phone_post(update_phone_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UpdatePhoneRequest update_phone_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.users_phone_post_with_http_info(update_phone_request, **kwargs) # noqa: E501 - - def users_phone_post_with_http_info(self, update_phone_request, **kwargs): # noqa: E501 - """Verify phone number # noqa: E501 - - Verify the phone number of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.users_phone_post_with_http_info(update_phone_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UpdatePhoneRequest update_phone_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'update_phone_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method users_phone_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'update_phone_request' is set - if self.api_client.client_side_validation and ('update_phone_request' not in local_var_params or # noqa: E501 - local_var_params['update_phone_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_phone_request` when calling `users_phone_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_phone_request' in local_var_params: - body_params = local_var_params['update_phone_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/phone', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def verify_email_get(self, token, **kwargs): # noqa: E501 - """Verify email # noqa: E501 - - Verify the email of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_email_get(token, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str token: Verification token (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: JwtResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.verify_email_get_with_http_info(token, **kwargs) # noqa: E501 - - def verify_email_get_with_http_info(self, token, **kwargs): # noqa: E501 - """Verify email # noqa: E501 - - Verify the email of the user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_email_get_with_http_info(token, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str token: Verification token (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(JwtResponse, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'token' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method verify_email_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'token' is set - if self.api_client.client_side_validation and ('token' not in local_var_params or # noqa: E501 - local_var_params['token'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `token` when calling `verify_email_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'token' in local_var_params and local_var_params['token'] is not None: # noqa: E501 - query_params.append(('token', local_var_params['token'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/verify-email', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def withdraws_get(self, **kwargs): # noqa: E501 - """Get user withdraw requests # noqa: E501 - - Get user withdraw requests # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_get(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: list[WithdrawRequest] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraws_get_with_http_info(**kwargs) # noqa: E501 - - def withdraws_get_with_http_info(self, **kwargs): # noqa: E501 - """Get user withdraw requests # noqa: E501 - - Get user withdraw requests # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(list[WithdrawRequest], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraws_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/withdraws', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[WithdrawRequest]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def withdraws_id_get(self, id, **kwargs): # noqa: E501 - """Get withdrawal status # noqa: E501 - - Get the status of a withdrawal request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_id_get(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int id: Withdrawal request ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: WithdrawRequest - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraws_id_get_with_http_info(id, **kwargs) # noqa: E501 - - def withdraws_id_get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get withdrawal status # noqa: E501 - - Get the status of a withdrawal request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_id_get_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param int id: Withdrawal request ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(WithdrawRequest, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraws_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `withdraws_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/withdraws/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='WithdrawRequest', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def withdraws_preview_post(self, withdraw_request_body, **kwargs): # noqa: E501 - """Withdraw request # noqa: E501 - - Request a withdrawal from the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_preview_post(withdraw_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param WithdrawRequestBody withdraw_request_body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: WithdrawRequestPreview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraws_preview_post_with_http_info(withdraw_request_body, **kwargs) # noqa: E501 - - def withdraws_preview_post_with_http_info(self, withdraw_request_body, **kwargs): # noqa: E501 - """Withdraw request # noqa: E501 - - Request a withdrawal from the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_preview_post_with_http_info(withdraw_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param WithdrawRequestBody withdraw_request_body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(WithdrawRequestPreview, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'withdraw_request_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraws_preview_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'withdraw_request_body' is set - if self.api_client.client_side_validation and ('withdraw_request_body' not in local_var_params or # noqa: E501 - local_var_params['withdraw_request_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `withdraw_request_body` when calling `withdraws_preview_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'withdraw_request_body' in local_var_params: - body_params = local_var_params['withdraw_request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/withdraws/preview', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='WithdrawRequestPreview', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def withdraws_request_post(self, withdraw_request_body, **kwargs): # noqa: E501 - """Withdraw request # noqa: E501 - - Request a withdrawal from the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_request_post(withdraw_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param WithdrawRequestBody withdraw_request_body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: WithdrawResponseBody - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraws_request_post_with_http_info(withdraw_request_body, **kwargs) # noqa: E501 - - def withdraws_request_post_with_http_info(self, withdraw_request_body, **kwargs): # noqa: E501 - """Withdraw request # noqa: E501 - - Request a withdrawal from the wallet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraws_request_post_with_http_info(withdraw_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param WithdrawRequestBody withdraw_request_body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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. - :return: tuple(WithdrawResponseBody, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'withdraw_request_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraws_request_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'withdraw_request_body' is set - if self.api_client.client_side_validation and ('withdraw_request_body' not in local_var_params or # noqa: E501 - local_var_params['withdraw_request_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `withdraw_request_body` when calling `withdraws_request_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'withdraw_request_body' in local_var_params: - body_params = local_var_params['withdraw_request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/withdraws/request', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='WithdrawResponseBody', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/deposit_api.py b/src/zarban/wallet/openapi_client/api/deposit_api.py new file mode 100644 index 0000000..eb3a532 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/deposit_api.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DepositApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def deposit_money(self, network, symbol, **kwargs): # noqa: E501 + """Deposit money # noqa: E501 + + Deposit money to the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.deposit_money(network, symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str network: Network to deposit (required) + :param str symbol: Coin symbol (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: DepositResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.deposit_money_with_http_info(network, symbol, **kwargs) # noqa: E501 + + def deposit_money_with_http_info(self, network, symbol, **kwargs): # noqa: E501 + """Deposit money # noqa: E501 + + Deposit money to the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.deposit_money_with_http_info(network, symbol, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str network: Network to deposit (required) + :param str symbol: Coin symbol (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(DepositResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'network', + 'symbol' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method deposit_money" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'network' is set + if self.api_client.client_side_validation and ('network' not in local_var_params or # noqa: E501 + local_var_params['network'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `network` when calling `deposit_money`") # noqa: E501 + # verify the required parameter 'symbol' is set + if self.api_client.client_side_validation and ('symbol' not in local_var_params or # noqa: E501 + local_var_params['symbol'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `symbol` when calling `deposit_money`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'network' in local_var_params and local_var_params['network'] is not None: # noqa: E501 + query_params.append(('network', local_var_params['network'])) # noqa: E501 + if 'symbol' in local_var_params and local_var_params['symbol'] is not None: # noqa: E501 + query_params.append(('symbol', local_var_params['symbol'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/deposit', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DepositResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/health_api.py b/src/zarban/wallet/openapi_client/api/health_api.py new file mode 100644 index 0000000..ad2e4a2 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/health_api.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class HealthApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def check_api_health(self, **kwargs): # noqa: E501 + """Health check # noqa: E501 + + Check the health of the API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_api_health(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: HealthStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.check_api_health_with_http_info(**kwargs) # noqa: E501 + + def check_api_health_with_http_info(self, **kwargs): # noqa: E501 + """Health check # noqa: E501 + + Check the health of the API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_api_health_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(HealthStatus, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method check_api_health" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/healthz', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HealthStatus', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/loans_api.py b/src/zarban/wallet/openapi_client/api/loans_api.py index c716a2d..f1b3172 100644 --- a/src/zarban/wallet/openapi_client/api/loans_api.py +++ b/src/zarban/wallet/openapi_client/api/loans_api.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,13 +37,131 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def loans_estimate_get(self, plan_name, loan_to_value_option, amount, input_type, **kwargs): # noqa: E501 + def create_loan_vault(self, loan_create_request, **kwargs): # noqa: E501 + """Create vault # noqa: E501 + + Create a vault # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_loan_vault(loan_create_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param LoanCreateRequest loan_create_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: LoansResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_loan_vault_with_http_info(loan_create_request, **kwargs) # noqa: E501 + + def create_loan_vault_with_http_info(self, loan_create_request, **kwargs): # noqa: E501 + """Create vault # noqa: E501 + + Create a vault # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_loan_vault_with_http_info(loan_create_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param LoanCreateRequest loan_create_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'loan_create_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_loan_vault" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'loan_create_request' is set + if self.api_client.client_side_validation and ('loan_create_request' not in local_var_params or # noqa: E501 + local_var_params['loan_create_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `loan_create_request` when calling `create_loan_vault`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'loan_create_request' in local_var_params: + body_params = local_var_params['loan_create_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/loans/create', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoansResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def estimate_loan_collateral(self, plan_name, loan_to_value_option, amount, input_type, **kwargs): # noqa: E501 """Get collateral and loan amount estimation # noqa: E501 Get an estimate of required collateral for a specific loan amount, and vice versa. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_estimate_get(plan_name, loan_to_value_option, amount, input_type, async_req=True) + >>> thread = api.estimate_loan_collateral(plan_name, loan_to_value_option, amount, input_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -57,20 +176,20 @@ def loans_estimate_get(self, plan_name, loan_to_value_option, amount, input_type number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: dict(str, str) + :return: Currency If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.loans_estimate_get_with_http_info(plan_name, loan_to_value_option, amount, input_type, **kwargs) # noqa: E501 + return self.estimate_loan_collateral_with_http_info(plan_name, loan_to_value_option, amount, input_type, **kwargs) # noqa: E501 - def loans_estimate_get_with_http_info(self, plan_name, loan_to_value_option, amount, input_type, **kwargs): # noqa: E501 + def estimate_loan_collateral_with_http_info(self, plan_name, loan_to_value_option, amount, input_type, **kwargs): # noqa: E501 """Get collateral and loan amount estimation # noqa: E501 Get an estimate of required collateral for a specific loan amount, and vice versa. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.loans_estimate_get_with_http_info(plan_name, loan_to_value_option, amount, input_type, async_req=True) + >>> thread = api.estimate_loan_collateral_with_http_info(plan_name, loan_to_value_option, amount, input_type, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously @@ -87,7 +206,7 @@ def loans_estimate_get_with_http_info(self, plan_name, loan_to_value_option, amo number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(dict(str, str), status_code(int), headers(HTTPHeaderDict)) + :return: tuple(Currency, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -113,26 +232,26 @@ def loans_estimate_get_with_http_info(self, plan_name, loan_to_value_option, amo if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method loans_estimate_get" % key + " to method estimate_loan_collateral" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'plan_name' is set if self.api_client.client_side_validation and ('plan_name' not in local_var_params or # noqa: E501 local_var_params['plan_name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `plan_name` when calling `loans_estimate_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `plan_name` when calling `estimate_loan_collateral`") # noqa: E501 # verify the required parameter 'loan_to_value_option' is set if self.api_client.client_side_validation and ('loan_to_value_option' not in local_var_params or # noqa: E501 local_var_params['loan_to_value_option'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `loan_to_value_option` when calling `loans_estimate_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `loan_to_value_option` when calling `estimate_loan_collateral`") # noqa: E501 # verify the required parameter 'amount' is set if self.api_client.client_side_validation and ('amount' not in local_var_params or # noqa: E501 local_var_params['amount'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `amount` when calling `loans_estimate_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `amount` when calling `estimate_loan_collateral`") # noqa: E501 # verify the required parameter 'input_type' is set if self.api_client.client_side_validation and ('input_type' not in local_var_params or # noqa: E501 local_var_params['input_type'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `input_type` when calling `loans_estimate_get`") # noqa: E501 + raise ApiValueError("Missing the required parameter `input_type` when calling `estimate_loan_collateral`") # noqa: E501 collection_formats = {} @@ -169,7 +288,459 @@ def loans_estimate_get_with_http_info(self, plan_name, loan_to_value_option, amo body=body_params, post_params=form_params, files=local_var_files, - response_type='dict(str, str)', # noqa: E501 + response_type='Currency', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_loan_plans(self, **kwargs): # noqa: E501 + """Get all plan loans # noqa: E501 + + Get a list of the available plan loans. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_loan_plans(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: LoanPlanResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_loan_plans_with_http_info(**kwargs) # noqa: E501 + + def get_all_loan_plans_with_http_info(self, **kwargs): # noqa: E501 + """Get all plan loans # noqa: E501 + + Get a list of the available plan loans. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_loan_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(LoanPlanResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_loan_plans" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loans/plans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoanPlanResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_loan_details(self, id, **kwargs): # noqa: E501 + """Get loan # noqa: E501 + + Get the details of a loan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_loan_details(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: Loan ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: LoansResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_loan_details_with_http_info(id, **kwargs) # noqa: E501 + + def get_loan_details_with_http_info(self, id, **kwargs): # noqa: E501 + """Get loan # noqa: E501 + + Get the details of a loan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_loan_details_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: Loan ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_loan_details" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_loan_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/loans/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoansResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_loans(self, **kwargs): # noqa: E501 + """Get user loans # noqa: E501 + + Get a list of the user's loans. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_loans(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str state: loan state + :param str plan_name: loan plan name + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: LoansResponseList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_loans_with_http_info(**kwargs) # noqa: E501 + + def get_user_loans_with_http_info(self, **kwargs): # noqa: E501 + """Get user loans # noqa: E501 + + Get a list of the user's loans. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_loans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str state: loan state + :param str plan_name: loan plan name + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(LoansResponseList, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'state', + 'plan_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_loans" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 + query_params.append(('state', local_var_params['state'])) # noqa: E501 + if 'plan_name' in local_var_params and local_var_params['plan_name'] is not None: # noqa: E501 + query_params.append(('planName', local_var_params['plan_name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/loans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoansResponseList', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def repay_loan(self, repay_loan_request, **kwargs): # noqa: E501 + """Repay Loan # noqa: E501 + + Repay a loan totally # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_loan(repay_loan_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param RepayLoanRequest repay_loan_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: LoansResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.repay_loan_with_http_info(repay_loan_request, **kwargs) # noqa: E501 + + def repay_loan_with_http_info(self, repay_loan_request, **kwargs): # noqa: E501 + """Repay Loan # noqa: E501 + + Repay a loan totally # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_loan_with_http_info(repay_loan_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param RepayLoanRequest repay_loan_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(LoansResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'repay_loan_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method repay_loan" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'repay_loan_request' is set + if self.api_client.client_side_validation and ('repay_loan_request' not in local_var_params or # noqa: E501 + local_var_params['repay_loan_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repay_loan_request` when calling `repay_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repay_loan_request' in local_var_params: + body_params = local_var_params['repay_loan_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/loans/repay', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoansResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/api/payment_api.py b/src/zarban/wallet/openapi_client/api/payment_api.py new file mode 100644 index 0000000..b477d2c --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/payment_api.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PaymentApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_payment(self, payment_request, **kwargs): # noqa: E501 + """Create a payment # noqa: E501 + + Create a new payment. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_payment(payment_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param PaymentRequest payment_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Payment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_payment_with_http_info(payment_request, **kwargs) # noqa: E501 + + def create_payment_with_http_info(self, payment_request, **kwargs): # noqa: E501 + """Create a payment # noqa: E501 + + Create a new payment. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_payment_with_http_info(payment_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param PaymentRequest payment_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'payment_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_payment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'payment_request' is set + if self.api_client.client_side_validation and ('payment_request' not in local_var_params or # noqa: E501 + local_var_params['payment_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `payment_request` when calling `create_payment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'payment_request' in local_var_params: + body_params = local_var_params['payment_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/payments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Payment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/points_api.py b/src/zarban/wallet/openapi_client/api/points_api.py new file mode 100644 index 0000000..40ecfd3 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/points_api.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PointsApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_friends_points(self, **kwargs): # noqa: E501 + """Get friends points. # noqa: E501 + + Get friends points. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_friends_points(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: FriendPointsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_friends_points_with_http_info(**kwargs) # noqa: E501 + + def get_friends_points_with_http_info(self, **kwargs): # noqa: E501 + """Get friends points. # noqa: E501 + + Get friends points. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_friends_points_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(FriendPointsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_friends_points" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/points/frineds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FriendPointsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/redemptions_api.py b/src/zarban/wallet/openapi_client/api/redemptions_api.py new file mode 100644 index 0000000..098d5bd --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/redemptions_api.py @@ -0,0 +1,507 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class RedemptionsApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_all_redemptions(self, **kwargs): # noqa: E501 + """Get all redemptions # noqa: E501 + + Get a list of all redemptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_redemptions(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str state: Cursor for pagination + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: RedemptionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_redemptions_with_http_info(**kwargs) # noqa: E501 + + def get_all_redemptions_with_http_info(self, **kwargs): # noqa: E501 + """Get all redemptions # noqa: E501 + + Get a list of all redemptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_redemptions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str state: Cursor for pagination + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(RedemptionResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'state' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_redemptions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 + query_params.append(('state', local_var_params['state'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/admin/redemptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RedemptionResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_redemption_details(self, id, **kwargs): # noqa: E501 + """Get redemption # noqa: E501 + + Get the details of a redemption. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_redemption_details(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int id: Redemption ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Redemption + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_redemption_details_with_http_info(id, **kwargs) # noqa: E501 + + def get_redemption_details_with_http_info(self, id, **kwargs): # noqa: E501 + """Get redemption # noqa: E501 + + Get the details of a redemption. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_redemption_details_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int id: Redemption ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_redemption_details" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_redemption_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/admin/redemptions/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Redemption', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def redeem_zar(self, redemption_request, **kwargs): # noqa: E501 + """Redeem zar # noqa: E501 + + Redeem zar # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_zar(redemption_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param RedemptionRequest redemption_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Redemption + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.redeem_zar_with_http_info(redemption_request, **kwargs) # noqa: E501 + + def redeem_zar_with_http_info(self, redemption_request, **kwargs): # noqa: E501 + """Redeem zar # noqa: E501 + + Redeem zar # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_zar_with_http_info(redemption_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param RedemptionRequest redemption_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'redemption_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method redeem_zar" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'redemption_request' is set + if self.api_client.client_side_validation and ('redemption_request' not in local_var_params or # noqa: E501 + local_var_params['redemption_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `redemption_request` when calling `redeem_zar`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'redemption_request' in local_var_params: + body_params = local_var_params['redemption_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/redemptions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Redemption', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_redemption_status(self, id, admin_redemption_update_request, **kwargs): # noqa: E501 + """Update redemption # noqa: E501 + + Update the status of a redemption. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_redemption_status(id, admin_redemption_update_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: Redemption ID (required) + :param AdminRedemptionUpdateRequest admin_redemption_update_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Redemption + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_redemption_status_with_http_info(id, admin_redemption_update_request, **kwargs) # noqa: E501 + + def update_redemption_status_with_http_info(self, id, admin_redemption_update_request, **kwargs): # noqa: E501 + """Update redemption # noqa: E501 + + Update the status of a redemption. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_redemption_status_with_http_info(id, admin_redemption_update_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: Redemption ID (required) + :param AdminRedemptionUpdateRequest admin_redemption_update_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Redemption, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + 'admin_redemption_update_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_redemption_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `update_redemption_status`") # noqa: E501 + # verify the required parameter 'admin_redemption_update_request' is set + if self.api_client.client_side_validation and ('admin_redemption_update_request' not in local_var_params or # noqa: E501 + local_var_params['admin_redemption_update_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `admin_redemption_update_request` when calling `update_redemption_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'admin_redemption_update_request' in local_var_params: + body_params = local_var_params['admin_redemption_update_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/admin/redemptions/{id}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Redemption', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/referrals_api.py b/src/zarban/wallet/openapi_client/api/referrals_api.py new file mode 100644 index 0000000..0262377 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/referrals_api.py @@ -0,0 +1,490 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ReferralsApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_referral_by_id(self, referral_id, **kwargs): # noqa: E501 + """Get referral by ID # noqa: E501 + + Get a referral by its ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_referral_by_id(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: Referral + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_referral_by_id_with_http_info(referral_id, **kwargs) # noqa: E501 + + def get_referral_by_id_with_http_info(self, referral_id, **kwargs): # noqa: E501 + """Get referral by ID # noqa: E501 + + Get a referral by its ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_referral_by_id_with_http_info(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(Referral, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'referral_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_referral_by_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'referral_id' is set + if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 + local_var_params['referral_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `referral_id` when calling `get_referral_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'referral_id' in local_var_params: + path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/referrals/{referralId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Referral', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_referrals(self, **kwargs): # noqa: E501 + """Get referrals # noqa: E501 + + Get referrals by user ID or name. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_referrals(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: Referral name + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: ReferralResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_referrals_with_http_info(**kwargs) # noqa: E501 + + def get_referrals_with_http_info(self, **kwargs): # noqa: E501 + """Get referrals # noqa: E501 + + Get referrals by user ID or name. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_referrals_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: Referral name + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(ReferralResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_referrals" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/referrals', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ReferralResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def redeem_referral(self, referral_id, **kwargs): # noqa: E501 + """Redeem a referral # noqa: E501 + + Redeem a referral for a user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_referral(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.redeem_referral_with_http_info(referral_id, **kwargs) # noqa: E501 + + def redeem_referral_with_http_info(self, referral_id, **kwargs): # noqa: E501 + """Redeem a referral # noqa: E501 + + Redeem a referral for a user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redeem_referral_with_http_info(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'referral_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method redeem_referral" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'referral_id' is set + if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 + local_var_params['referral_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `referral_id` when calling `redeem_referral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'referral_id' in local_var_params: + path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/referrals/{referralId}/redeem', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def validate_referral(self, referral_id, **kwargs): # noqa: E501 + """Validate a referral # noqa: E501 + + Validate a referral to check if it can be redeemed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_referral(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.validate_referral_with_http_info(referral_id, **kwargs) # noqa: E501 + + def validate_referral_with_http_info(self, referral_id, **kwargs): # noqa: E501 + """Validate a referral # noqa: E501 + + Validate a referral to check if it can be redeemed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_referral_with_http_info(referral_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int referral_id: Referral ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'referral_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method validate_referral" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'referral_id' is set + if self.api_client.client_side_validation and ('referral_id' not in local_var_params or # noqa: E501 + local_var_params['referral_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `referral_id` when calling `validate_referral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'referral_id' in local_var_params: + path_params['referralId'] = local_var_params['referral_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/referrals/{referralId}/validate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/swap_api.py b/src/zarban/wallet/openapi_client/api/swap_api.py new file mode 100644 index 0000000..2214904 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/swap_api.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SwapApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def swap_coins(self, swap_request, **kwargs): # noqa: E501 + """Swap coins # noqa: E501 + + Swap coins in the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_coins(swap_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SwapRequest swap_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SwapResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.swap_coins_with_http_info(swap_request, **kwargs) # noqa: E501 + + def swap_coins_with_http_info(self, swap_request, **kwargs): # noqa: E501 + """Swap coins # noqa: E501 + + Swap coins in the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_coins_with_http_info(swap_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SwapRequest swap_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SwapResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'swap_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method swap_coins" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'swap_request' is set + if self.api_client.client_side_validation and ('swap_request' not in local_var_params or # noqa: E501 + local_var_params['swap_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `swap_request` when calling `swap_coins`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'swap_request' in local_var_params: + body_params = local_var_params['swap_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/swap', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SwapResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/tasks_api.py b/src/zarban/wallet/openapi_client/api/tasks_api.py new file mode 100644 index 0000000..d397d97 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/tasks_api.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TasksApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_tasks(self, **kwargs): # noqa: E501 + """Get tasks # noqa: E501 + + Get the list of tasks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tasks(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: TaskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_tasks_with_http_info(**kwargs) # noqa: E501 + + def get_tasks_with_http_info(self, **kwargs): # noqa: E501 + """Get tasks # noqa: E501 + + Get the list of tasks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tasks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(TaskResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tasks" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/tasks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TaskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/transactions_api.py b/src/zarban/wallet/openapi_client/api/transactions_api.py new file mode 100644 index 0000000..3398f99 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/transactions_api.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TransactionsApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_user_transactions(self, **kwargs): # noqa: E501 + """Get user transactions # noqa: E501 + + Get a list of the recent transactions of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_transactions(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int cursor: Cursor for pagination + :param int limit: Limit the number of transactions returned (default is 100) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_transactions_with_http_info(**kwargs) # noqa: E501 + + def get_user_transactions_with_http_info(self, **kwargs): # noqa: E501 + """Get user transactions # noqa: E501 + + Get a list of the recent transactions of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_transactions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int cursor: Cursor for pagination + :param int limit: Limit the number of transactions returned (default is 100) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(TransactionResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'cursor', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_transactions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/user_api.py b/src/zarban/wallet/openapi_client/api/user_api.py new file mode 100644 index 0000000..82ba73f --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/user_api.py @@ -0,0 +1,969 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UserApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def confirm_kyc(self, kyc_confirm_request, **kwargs): # noqa: E501 + """Confirm KYC # noqa: E501 + + Confirm KYC for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_kyc(kyc_confirm_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param KycConfirmRequest kyc_confirm_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SimpleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.confirm_kyc_with_http_info(kyc_confirm_request, **kwargs) # noqa: E501 + + def confirm_kyc_with_http_info(self, kyc_confirm_request, **kwargs): # noqa: E501 + """Confirm KYC # noqa: E501 + + Confirm KYC for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_kyc_with_http_info(kyc_confirm_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param KycConfirmRequest kyc_confirm_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'kyc_confirm_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_kyc" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'kyc_confirm_request' is set + if self.api_client.client_side_validation and ('kyc_confirm_request' not in local_var_params or # noqa: E501 + local_var_params['kyc_confirm_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `kyc_confirm_request` when calling `confirm_kyc`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'kyc_confirm_request' in local_var_params: + body_params = local_var_params['kyc_confirm_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/kyc/confirm', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SimpleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def confirm_phone_number(self, phone_otp_submit_request, **kwargs): # noqa: E501 + """Confirm phone number # noqa: E501 + + Confirm the phone number of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_phone_number(phone_otp_submit_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param PhoneOtpSubmitRequest phone_otp_submit_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.confirm_phone_number_with_http_info(phone_otp_submit_request, **kwargs) # noqa: E501 + + def confirm_phone_number_with_http_info(self, phone_otp_submit_request, **kwargs): # noqa: E501 + """Confirm phone number # noqa: E501 + + Confirm the phone number of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_phone_number_with_http_info(phone_otp_submit_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param PhoneOtpSubmitRequest phone_otp_submit_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_otp_submit_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_phone_number" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_otp_submit_request' is set + if self.api_client.client_side_validation and ('phone_otp_submit_request' not in local_var_params or # noqa: E501 + local_var_params['phone_otp_submit_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_otp_submit_request` when calling `confirm_phone_number`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'phone_otp_submit_request' in local_var_params: + body_params = local_var_params['phone_otp_submit_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/phone/confirm', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_child_user(self, create_child_user_request, **kwargs): # noqa: E501 + """create a child user # noqa: E501 + + create a child user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_child_user(create_child_user_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateChildUserRequest create_child_user_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_child_user_with_http_info(create_child_user_request, **kwargs) # noqa: E501 + + def create_child_user_with_http_info(self, create_child_user_request, **kwargs): # noqa: E501 + """create a child user # noqa: E501 + + create a child user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_child_user_with_http_info(create_child_user_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateChildUserRequest create_child_user_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(User, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_child_user_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_child_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_child_user_request' is set + if self.api_client.client_side_validation and ('create_child_user_request' not in local_var_params or # noqa: E501 + local_var_params['create_child_user_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_child_user_request` when calling `create_child_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_child_user_request' in local_var_params: + body_params = local_var_params['create_child_user_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/children', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_profile(self, **kwargs): # noqa: E501 + """Get profile # noqa: E501 + + Get the profile of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_profile(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: ProfileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_profile_with_http_info(**kwargs) # noqa: E501 + + def get_user_profile_with_http_info(self, **kwargs): # noqa: E501 + """Get profile # noqa: E501 + + Get the profile of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_profile_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(ProfileResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_profile" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/profile', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ProfileResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def submit_email_confirmation_otp(self, email_otp_submit_request, **kwargs): # noqa: E501 + """Submit email confirmation OTP # noqa: E501 + + Submit email confirmation OTP for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_email_confirmation_otp(email_otp_submit_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param EmailOtpSubmitRequest email_otp_submit_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SimpleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.submit_email_confirmation_otp_with_http_info(email_otp_submit_request, **kwargs) # noqa: E501 + + def submit_email_confirmation_otp_with_http_info(self, email_otp_submit_request, **kwargs): # noqa: E501 + """Submit email confirmation OTP # noqa: E501 + + Submit email confirmation OTP for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_email_confirmation_otp_with_http_info(email_otp_submit_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param EmailOtpSubmitRequest email_otp_submit_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_otp_submit_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method submit_email_confirmation_otp" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_otp_submit_request' is set + if self.api_client.client_side_validation and ('email_otp_submit_request' not in local_var_params or # noqa: E501 + local_var_params['email_otp_submit_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_otp_submit_request` when calling `submit_email_confirmation_otp`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'email_otp_submit_request' in local_var_params: + body_params = local_var_params['email_otp_submit_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/email/confirm', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SimpleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def submit_kyc(self, kyc_request, **kwargs): # noqa: E501 + """Submit KYC # noqa: E501 + + Submit KYC for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_kyc(kyc_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param KycRequest kyc_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: KycResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.submit_kyc_with_http_info(kyc_request, **kwargs) # noqa: E501 + + def submit_kyc_with_http_info(self, kyc_request, **kwargs): # noqa: E501 + """Submit KYC # noqa: E501 + + Submit KYC for the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_kyc_with_http_info(kyc_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param KycRequest kyc_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(KycResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'kyc_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method submit_kyc" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'kyc_request' is set + if self.api_client.client_side_validation and ('kyc_request' not in local_var_params or # noqa: E501 + local_var_params['kyc_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `kyc_request` when calling `submit_kyc`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'kyc_request' in local_var_params: + body_params = local_var_params['kyc_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/kyc', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KycResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_phone_number(self, update_phone_request, **kwargs): # noqa: E501 + """Verify phone number # noqa: E501 + + Verify the phone number of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_phone_number(update_phone_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UpdatePhoneRequest update_phone_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.verify_phone_number_with_http_info(update_phone_request, **kwargs) # noqa: E501 + + def verify_phone_number_with_http_info(self, update_phone_request, **kwargs): # noqa: E501 + """Verify phone number # noqa: E501 + + Verify the phone number of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_phone_number_with_http_info(update_phone_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UpdatePhoneRequest update_phone_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'update_phone_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_phone_number" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'update_phone_request' is set + if self.api_client.client_side_validation and ('update_phone_request' not in local_var_params or # noqa: E501 + local_var_params['update_phone_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_phone_request` when calling `verify_phone_number`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_phone_request' in local_var_params: + body_params = local_var_params['update_phone_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/phone', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_user_email_address(self, update_email_request, **kwargs): # noqa: E501 + """Verify email # noqa: E501 + + Verify the email of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_user_email_address(update_email_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UpdateEmailRequest update_email_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: SimpleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.verify_user_email_address_with_http_info(update_email_request, **kwargs) # noqa: E501 + + def verify_user_email_address_with_http_info(self, update_email_request, **kwargs): # noqa: E501 + """Verify email # noqa: E501 + + Verify the email of the user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_user_email_address_with_http_info(update_email_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UpdateEmailRequest update_email_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(SimpleResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'update_email_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_user_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'update_email_request' is set + if self.api_client.client_side_validation and ('update_email_request' not in local_var_params or # noqa: E501 + local_var_params['update_email_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_email_request` when calling `verify_user_email_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_email_request' in local_var_params: + body_params = local_var_params['update_email_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/users/email', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SimpleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api/withdraw_api.py b/src/zarban/wallet/openapi_client/api/withdraw_api.py new file mode 100644 index 0000000..bc85021 --- /dev/null +++ b/src/zarban/wallet/openapi_client/api/withdraw_api.py @@ -0,0 +1,493 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from zarban.wallet.openapi_client.api_client import ApiClient +from zarban.wallet.openapi_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class WithdrawApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_user_withdraw_requests(self, **kwargs): # noqa: E501 + """Get user withdraw requests # noqa: E501 + + Get user withdraw requests # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_withdraw_requests(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: WithdrawRequestResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_withdraw_requests_with_http_info(**kwargs) # noqa: E501 + + def get_user_withdraw_requests_with_http_info(self, **kwargs): # noqa: E501 + """Get user withdraw requests # noqa: E501 + + Get user withdraw requests # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_withdraw_requests_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(WithdrawRequestResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_withdraw_requests" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/withdraws', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WithdrawRequestResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_withdrawal_status(self, id, **kwargs): # noqa: E501 + """Get withdrawal status # noqa: E501 + + Get the status of a withdrawal request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_withdrawal_status(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int id: Withdrawal request ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: WithdrawRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_withdrawal_status_with_http_info(id, **kwargs) # noqa: E501 + + def get_withdrawal_status_with_http_info(self, id, **kwargs): # noqa: E501 + """Get withdrawal status # noqa: E501 + + Get the status of a withdrawal request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_withdrawal_status_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int id: Withdrawal request ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(WithdrawRequest, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_withdrawal_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_withdrawal_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/withdraws/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WithdrawRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def preview_withdrawal(self, withdraw_request_body, **kwargs): # noqa: E501 + """Withdraw request # noqa: E501 + + Request a withdrawal from the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_withdrawal(withdraw_request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WithdrawRequestBody withdraw_request_body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: WithdrawRequestPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_withdrawal_with_http_info(withdraw_request_body, **kwargs) # noqa: E501 + + def preview_withdrawal_with_http_info(self, withdraw_request_body, **kwargs): # noqa: E501 + """Withdraw request # noqa: E501 + + Request a withdrawal from the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_withdrawal_with_http_info(withdraw_request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WithdrawRequestBody withdraw_request_body: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(WithdrawRequestPreview, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'withdraw_request_body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method preview_withdrawal" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'withdraw_request_body' is set + if self.api_client.client_side_validation and ('withdraw_request_body' not in local_var_params or # noqa: E501 + local_var_params['withdraw_request_body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `withdraw_request_body` when calling `preview_withdrawal`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'withdraw_request_body' in local_var_params: + body_params = local_var_params['withdraw_request_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/withdraws/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WithdrawRequestPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def request_withdrawal(self, withdraw_request_body, **kwargs): # noqa: E501 + """Withdraw request # noqa: E501 + + Request a withdrawal from the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.request_withdrawal(withdraw_request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WithdrawRequestBody withdraw_request_body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: WithdrawResponseBody + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.request_withdrawal_with_http_info(withdraw_request_body, **kwargs) # noqa: E501 + + def request_withdrawal_with_http_info(self, withdraw_request_body, **kwargs): # noqa: E501 + """Withdraw request # noqa: E501 + + Request a withdrawal from the wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.request_withdrawal_with_http_info(withdraw_request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WithdrawRequestBody withdraw_request_body: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(WithdrawResponseBody, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'withdraw_request_body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method request_withdrawal" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'withdraw_request_body' is set + if self.api_client.client_side_validation and ('withdraw_request_body' not in local_var_params or # noqa: E501 + local_var_params['withdraw_request_body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `withdraw_request_body` when calling `request_withdrawal`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'withdraw_request_body' in local_var_params: + body_params = local_var_params['withdraw_request_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/withdraws/request', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WithdrawResponseBody', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/src/zarban/wallet/openapi_client/api_client.py b/src/zarban/wallet/openapi_client/api_client.py index ca7209e..3b4f5b4 100644 --- a/src/zarban/wallet/openapi_client/api_client.py +++ b/src/zarban/wallet/openapi_client/api_client.py @@ -5,6 +5,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/configuration.py b/src/zarban/wallet/openapi_client/configuration.py index 811a610..f78b87c 100644 --- a/src/zarban/wallet/openapi_client/configuration.py +++ b/src/zarban/wallet/openapi_client/configuration.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/exceptions.py b/src/zarban/wallet/openapi_client/exceptions.py index 436c41b..b8f77a0 100644 --- a/src/zarban/wallet/openapi_client/exceptions.py +++ b/src/zarban/wallet/openapi_client/exceptions.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/__init__.py b/src/zarban/wallet/openapi_client/models/__init__.py index 39b448f..27c58d5 100644 --- a/src/zarban/wallet/openapi_client/models/__init__.py +++ b/src/zarban/wallet/openapi_client/models/__init__.py @@ -7,6 +7,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,27 +19,31 @@ from zarban.wallet.openapi_client.models.auth_telegram_request import AuthTelegramRequest from zarban.wallet.openapi_client.models.balance import Balance from zarban.wallet.openapi_client.models.bank_info import BankInfo +from zarban.wallet.openapi_client.models.bullet_content import BulletContent from zarban.wallet.openapi_client.models.coin import Coin from zarban.wallet.openapi_client.models.coin_config import CoinConfig -from zarban.wallet.openapi_client.models.coin_content import CoinContent +from zarban.wallet.openapi_client.models.coin_response import CoinResponse from zarban.wallet.openapi_client.models.create_child_user_request import CreateChildUserRequest +from zarban.wallet.openapi_client.models.currency import Currency from zarban.wallet.openapi_client.models.deposit_response import DepositResponse from zarban.wallet.openapi_client.models.detailed_loan_to_value_options import DetailedLoanToValueOptions from zarban.wallet.openapi_client.models.email_otp_submit_request import EmailOtpSubmitRequest from zarban.wallet.openapi_client.models.error import Error +from zarban.wallet.openapi_client.models.error_detail import ErrorDetail from zarban.wallet.openapi_client.models.external_transaction import ExternalTransaction from zarban.wallet.openapi_client.models.friend_points import FriendPoints +from zarban.wallet.openapi_client.models.friend_points_response import FriendPointsResponse from zarban.wallet.openapi_client.models.health_status import HealthStatus from zarban.wallet.openapi_client.models.jwt_response import JwtResponse from zarban.wallet.openapi_client.models.kyc_confirm_request import KycConfirmRequest from zarban.wallet.openapi_client.models.kyc_request import KycRequest from zarban.wallet.openapi_client.models.kyc_response import KycResponse -from zarban.wallet.openapi_client.models.loan import Loan from zarban.wallet.openapi_client.models.loan_create_request import LoanCreateRequest -from zarban.wallet.openapi_client.models.loan_create_response import LoanCreateResponse from zarban.wallet.openapi_client.models.loan_plan import LoanPlan +from zarban.wallet.openapi_client.models.loan_plan_response import LoanPlanResponse from zarban.wallet.openapi_client.models.loan_to_value_options import LoanToValueOptions from zarban.wallet.openapi_client.models.loans_response import LoansResponse +from zarban.wallet.openapi_client.models.loans_response_list import LoansResponseList from zarban.wallet.openapi_client.models.login_request import LoginRequest from zarban.wallet.openapi_client.models.network import Network from zarban.wallet.openapi_client.models.payment import Payment @@ -47,34 +52,30 @@ from zarban.wallet.openapi_client.models.profile_response import ProfileResponse from zarban.wallet.openapi_client.models.redemption import Redemption from zarban.wallet.openapi_client.models.redemption_request import RedemptionRequest +from zarban.wallet.openapi_client.models.redemption_response import RedemptionResponse from zarban.wallet.openapi_client.models.referral import Referral -from zarban.wallet.openapi_client.models.referral_create_request import ReferralCreateRequest -from zarban.wallet.openapi_client.models.referral_create_response import ReferralCreateResponse +from zarban.wallet.openapi_client.models.referral_response import ReferralResponse from zarban.wallet.openapi_client.models.repay_loan_request import RepayLoanRequest -from zarban.wallet.openapi_client.models.repay_loan_response import RepayLoanResponse from zarban.wallet.openapi_client.models.sign_up_request import SignUpRequest from zarban.wallet.openapi_client.models.simple_response import SimpleResponse -from zarban.wallet.openapi_client.models.swap_quote_request import SwapQuoteRequest from zarban.wallet.openapi_client.models.swap_request import SwapRequest from zarban.wallet.openapi_client.models.swap_response import SwapResponse from zarban.wallet.openapi_client.models.symbol import Symbol from zarban.wallet.openapi_client.models.task import Task -from zarban.wallet.openapi_client.models.task_completion_request import TaskCompletionRequest -from zarban.wallet.openapi_client.models.task_completion_response import TaskCompletionResponse +from zarban.wallet.openapi_client.models.task_response import TaskResponse from zarban.wallet.openapi_client.models.telegram_profile import TelegramProfile from zarban.wallet.openapi_client.models.timestamp import Timestamp from zarban.wallet.openapi_client.models.transaction import Transaction +from zarban.wallet.openapi_client.models.transaction_response import TransactionResponse from zarban.wallet.openapi_client.models.transaction_status import TransactionStatus from zarban.wallet.openapi_client.models.transaction_type import TransactionType from zarban.wallet.openapi_client.models.update_email_request import UpdateEmailRequest from zarban.wallet.openapi_client.models.update_phone_request import UpdatePhoneRequest from zarban.wallet.openapi_client.models.user import User from zarban.wallet.openapi_client.models.user_error import UserError -from zarban.wallet.openapi_client.models.user_error_messages import UserErrorMessages from zarban.wallet.openapi_client.models.wallet_balance import WalletBalance from zarban.wallet.openapi_client.models.withdraw_request import WithdrawRequest from zarban.wallet.openapi_client.models.withdraw_request_body import WithdrawRequestBody from zarban.wallet.openapi_client.models.withdraw_request_preview import WithdrawRequestPreview -from zarban.wallet.openapi_client.models.withdraw_response import WithdrawResponse +from zarban.wallet.openapi_client.models.withdraw_request_response import WithdrawRequestResponse from zarban.wallet.openapi_client.models.withdraw_response_body import WithdrawResponseBody -from zarban.wallet.openapi_client.models.withdraw_response_preview import WithdrawResponsePreview diff --git a/src/zarban/wallet/openapi_client/models/admin_redemption_update_request.py b/src/zarban/wallet/openapi_client/models/admin_redemption_update_request.py index f0d0f21..8fb5b63 100644 --- a/src/zarban/wallet/openapi_client/models/admin_redemption_update_request.py +++ b/src/zarban/wallet/openapi_client/models/admin_redemption_update_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,23 +34,28 @@ class AdminRedemptionUpdateRequest(object): and the value is json key in definition. """ openapi_types = { - 'status': 'str' + 'status': 'str', + 'paya_tracking_code': 'str' } attribute_map = { - 'status': 'status' + 'status': 'status', + 'paya_tracking_code': 'payaTrackingCode' } - def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, status=None, paya_tracking_code=None, local_vars_configuration=None): # noqa: E501 """AdminRedemptionUpdateRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._status = None + self._paya_tracking_code = None self.discriminator = None self.status = status + if paya_tracking_code is not None: + self.paya_tracking_code = paya_tracking_code @property def status(self): @@ -73,9 +79,38 @@ def status(self, status): """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["Approved", "Rejected", "Completed"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) self._status = status + @property + def paya_tracking_code(self): + """Gets the paya_tracking_code of this AdminRedemptionUpdateRequest. # noqa: E501 + + The Paya tracking code # noqa: E501 + + :return: The paya_tracking_code of this AdminRedemptionUpdateRequest. # noqa: E501 + :rtype: str + """ + return self._paya_tracking_code + + @paya_tracking_code.setter + def paya_tracking_code(self, paya_tracking_code): + """Sets the paya_tracking_code of this AdminRedemptionUpdateRequest. + + The Paya tracking code # noqa: E501 + + :param paya_tracking_code: The paya_tracking_code of this AdminRedemptionUpdateRequest. # noqa: E501 + :type: str + """ + + self._paya_tracking_code = paya_tracking_code + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/zarban/wallet/openapi_client/models/auth_telegram_request.py b/src/zarban/wallet/openapi_client/models/auth_telegram_request.py index d0cc476..7c96f7e 100644 --- a/src/zarban/wallet/openapi_client/models/auth_telegram_request.py +++ b/src/zarban/wallet/openapi_client/models/auth_telegram_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/balance.py b/src/zarban/wallet/openapi_client/models/balance.py index af7f58b..cbd676f 100644 --- a/src/zarban/wallet/openapi_client/models/balance.py +++ b/src/zarban/wallet/openapi_client/models/balance.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,9 +34,9 @@ class Balance(object): and the value is json key in definition. """ openapi_types = { - 'locked': 'dict(str, str)', + 'locked': 'Currency', 'coin': 'Coin', - 'balance': 'dict(str, str)' + 'balance': 'Currency' } attribute_map = { @@ -65,7 +66,7 @@ def locked(self): :return: The locked of this Balance. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._locked @@ -75,7 +76,7 @@ def locked(self, locked): :param locked: The locked of this Balance. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and locked is None: # noqa: E501 raise ValueError("Invalid value for `locked`, must not be `None`") # noqa: E501 @@ -111,7 +112,7 @@ def balance(self): :return: The balance of this Balance. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._balance @@ -121,7 +122,7 @@ def balance(self, balance): :param balance: The balance of this Balance. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and balance is None: # noqa: E501 raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/bank_info.py b/src/zarban/wallet/openapi_client/models/bank_info.py index 16a054c..2931d2a 100644 --- a/src/zarban/wallet/openapi_client/models/bank_info.py +++ b/src/zarban/wallet/openapi_client/models/bank_info.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/coin_content.py b/src/zarban/wallet/openapi_client/models/bullet_content.py similarity index 72% rename from src/zarban/wallet/openapi_client/models/coin_content.py rename to src/zarban/wallet/openapi_client/models/bullet_content.py index 9d1cf5c..a346b4e 100644 --- a/src/zarban/wallet/openapi_client/models/coin_content.py +++ b/src/zarban/wallet/openapi_client/models/bullet_content.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.wallet.openapi_client.configuration import Configuration -class CoinContent(object): +class BulletContent(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,46 +36,46 @@ class CoinContent(object): openapi_types = { 'title': 'str', 'text': 'str', - 'bollets': 'list[str]' + 'bullets': 'list[str]' } attribute_map = { 'title': 'title', 'text': 'text', - 'bollets': 'bollets' + 'bullets': 'bullets' } - def __init__(self, title=None, text=None, bollets=None, local_vars_configuration=None): # noqa: E501 - """CoinContent - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, title=None, text=None, bullets=None, local_vars_configuration=None): # noqa: E501 + """BulletContent - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._title = None self._text = None - self._bollets = None + self._bullets = None self.discriminator = None self.title = title self.text = text - self.bollets = bollets + self.bullets = bullets @property def title(self): - """Gets the title of this CoinContent. # noqa: E501 + """Gets the title of this BulletContent. # noqa: E501 - :return: The title of this CoinContent. # noqa: E501 + :return: The title of this BulletContent. # noqa: E501 :rtype: str """ return self._title @title.setter def title(self, title): - """Sets the title of this CoinContent. + """Sets the title of this BulletContent. - :param title: The title of this CoinContent. # noqa: E501 + :param title: The title of this BulletContent. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 @@ -84,20 +85,20 @@ def title(self, title): @property def text(self): - """Gets the text of this CoinContent. # noqa: E501 + """Gets the text of this BulletContent. # noqa: E501 - :return: The text of this CoinContent. # noqa: E501 + :return: The text of this BulletContent. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): - """Sets the text of this CoinContent. + """Sets the text of this BulletContent. - :param text: The text of this CoinContent. # noqa: E501 + :param text: The text of this BulletContent. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 @@ -106,27 +107,27 @@ def text(self, text): self._text = text @property - def bollets(self): - """Gets the bollets of this CoinContent. # noqa: E501 + def bullets(self): + """Gets the bullets of this BulletContent. # noqa: E501 - :return: The bollets of this CoinContent. # noqa: E501 + :return: The bullets of this BulletContent. # noqa: E501 :rtype: list[str] """ - return self._bollets + return self._bullets - @bollets.setter - def bollets(self, bollets): - """Sets the bollets of this CoinContent. + @bullets.setter + def bullets(self, bullets): + """Sets the bullets of this BulletContent. - :param bollets: The bollets of this CoinContent. # noqa: E501 + :param bullets: The bullets of this BulletContent. # noqa: E501 :type: list[str] """ - if self.local_vars_configuration.client_side_validation and bollets is None: # noqa: E501 - raise ValueError("Invalid value for `bollets`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and bullets is None: # noqa: E501 + raise ValueError("Invalid value for `bullets`, must not be `None`") # noqa: E501 - self._bollets = bollets + self._bullets = bullets def to_dict(self): """Returns the model properties as a dict""" @@ -162,14 +163,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, CoinContent): + if not isinstance(other, BulletContent): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, CoinContent): + if not isinstance(other, BulletContent): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/coin.py b/src/zarban/wallet/openapi_client/models/coin.py index 3bd8e9b..6487e5d 100644 --- a/src/zarban/wallet/openapi_client/models/coin.py +++ b/src/zarban/wallet/openapi_client/models/coin.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -39,7 +40,7 @@ class Coin(object): 'logo_uri': 'str', 'depositable_networks': 'list[Network]', 'withdrawable_networks': 'list[Network]', - 'content': 'CoinContent' + 'content': 'BulletContent' } attribute_map = { @@ -219,7 +220,7 @@ def content(self): :return: The content of this Coin. # noqa: E501 - :rtype: CoinContent + :rtype: BulletContent """ return self._content @@ -229,7 +230,7 @@ def content(self, content): :param content: The content of this Coin. # noqa: E501 - :type: CoinContent + :type: BulletContent """ if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/coin_config.py b/src/zarban/wallet/openapi_client/models/coin_config.py index 440bbe1..4575bf1 100644 --- a/src/zarban/wallet/openapi_client/models/coin_config.py +++ b/src/zarban/wallet/openapi_client/models/coin_config.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -90,6 +91,7 @@ def is_tradeable(self, is_tradeable): def withdraw_fees(self): """Gets the withdraw_fees of this CoinConfig. # noqa: E501 + Map of network to amount # noqa: E501 :return: The withdraw_fees of this CoinConfig. # noqa: E501 :rtype: dict(str, str) @@ -100,6 +102,7 @@ def withdraw_fees(self): def withdraw_fees(self, withdraw_fees): """Sets the withdraw_fees of this CoinConfig. + Map of network to amount # noqa: E501 :param withdraw_fees: The withdraw_fees of this CoinConfig. # noqa: E501 :type: dict(str, str) @@ -113,6 +116,7 @@ def withdraw_fees(self, withdraw_fees): def min_withdrawal(self): """Gets the min_withdrawal of this CoinConfig. # noqa: E501 + Map of network to amount # noqa: E501 :return: The min_withdrawal of this CoinConfig. # noqa: E501 :rtype: dict(str, str) @@ -123,6 +127,7 @@ def min_withdrawal(self): def min_withdrawal(self, min_withdrawal): """Sets the min_withdrawal of this CoinConfig. + Map of network to amount # noqa: E501 :param min_withdrawal: The min_withdrawal of this CoinConfig. # noqa: E501 :type: dict(str, str) diff --git a/src/zarban/wallet/openapi_client/models/referral_create_response.py b/src/zarban/wallet/openapi_client/models/coin_response.py similarity index 70% rename from src/zarban/wallet/openapi_client/models/referral_create_response.py rename to src/zarban/wallet/openapi_client/models/coin_response.py index c67e71e..a119d29 100644 --- a/src/zarban/wallet/openapi_client/models/referral_create_response.py +++ b/src/zarban/wallet/openapi_client/models/coin_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.wallet.openapi_client.configuration import Configuration -class ReferralCreateResponse(object): +class CoinResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,45 +34,46 @@ class ReferralCreateResponse(object): and the value is json key in definition. """ openapi_types = { - 'referral_id': 'int' + 'data': 'list[Coin]' } attribute_map = { - 'referral_id': 'referralId' + 'data': 'data' } - def __init__(self, referral_id=None, local_vars_configuration=None): # noqa: E501 - """ReferralCreateResponse - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """CoinResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._referral_id = None + self._data = None self.discriminator = None - if referral_id is not None: - self.referral_id = referral_id + self.data = data @property - def referral_id(self): - """Gets the referral_id of this ReferralCreateResponse. # noqa: E501 + def data(self): + """Gets the data of this CoinResponse. # noqa: E501 - :return: The referral_id of this ReferralCreateResponse. # noqa: E501 - :rtype: int + :return: The data of this CoinResponse. # noqa: E501 + :rtype: list[Coin] """ - return self._referral_id + return self._data - @referral_id.setter - def referral_id(self, referral_id): - """Sets the referral_id of this ReferralCreateResponse. + @data.setter + def data(self, data): + """Sets the data of this CoinResponse. - :param referral_id: The referral_id of this ReferralCreateResponse. # noqa: E501 - :type: int + :param data: The data of this CoinResponse. # noqa: E501 + :type: list[Coin] """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - self._referral_id = referral_id + self._data = data def to_dict(self): """Returns the model properties as a dict""" @@ -107,14 +109,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ReferralCreateResponse): + if not isinstance(other, CoinResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ReferralCreateResponse): + if not isinstance(other, CoinResponse): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/create_child_user_request.py b/src/zarban/wallet/openapi_client/models/create_child_user_request.py index 67c1599..08b0e97 100644 --- a/src/zarban/wallet/openapi_client/models/create_child_user_request.py +++ b/src/zarban/wallet/openapi_client/models/create_child_user_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/currency.py b/src/zarban/wallet/openapi_client/models/currency.py new file mode 100644 index 0000000..e21bd0b --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/currency.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class Currency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'values': 'dict(str, str)' + } + + attribute_map = { + 'values': 'values' + } + + def __init__(self, values=None, local_vars_configuration=None): # noqa: E501 + """Currency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._values = None + self.discriminator = None + + if values is not None: + self.values = values + + @property + def values(self): + """Gets the values of this Currency. # noqa: E501 + + + :return: The values of this Currency. # noqa: E501 + :rtype: dict(str, str) + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this Currency. + + + :param values: The values of this Currency. # noqa: E501 + :type: dict(str, str) + """ + + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Currency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Currency): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/deposit_response.py b/src/zarban/wallet/openapi_client/models/deposit_response.py index fe18693..f1dd2dd 100644 --- a/src/zarban/wallet/openapi_client/models/deposit_response.py +++ b/src/zarban/wallet/openapi_client/models/deposit_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/detailed_loan_to_value_options.py b/src/zarban/wallet/openapi_client/models/detailed_loan_to_value_options.py index 45f5faf..d052da4 100644 --- a/src/zarban/wallet/openapi_client/models/detailed_loan_to_value_options.py +++ b/src/zarban/wallet/openapi_client/models/detailed_loan_to_value_options.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/email_otp_submit_request.py b/src/zarban/wallet/openapi_client/models/email_otp_submit_request.py index d105f1d..0e5bced 100644 --- a/src/zarban/wallet/openapi_client/models/email_otp_submit_request.py +++ b/src/zarban/wallet/openapi_client/models/email_otp_submit_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/error.py b/src/zarban/wallet/openapi_client/models/error.py index bbc6fd5..36120c3 100644 --- a/src/zarban/wallet/openapi_client/models/error.py +++ b/src/zarban/wallet/openapi_client/models/error.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -53,8 +54,7 @@ def __init__(self, msg=None, reasons=None, local_vars_configuration=None): # no self.discriminator = None self.msg = msg - if reasons is not None: - self.reasons = reasons + self.reasons = reasons @property def msg(self): @@ -99,6 +99,8 @@ def reasons(self, reasons): :param reasons: The reasons of this Error. # noqa: E501 :type: list[str] """ + if self.local_vars_configuration.client_side_validation and reasons is None: # noqa: E501 + raise ValueError("Invalid value for `reasons`, must not be `None`") # noqa: E501 self._reasons = reasons diff --git a/src/zarban/wallet/openapi_client/models/user_error_messages.py b/src/zarban/wallet/openapi_client/models/error_detail.py similarity index 78% rename from src/zarban/wallet/openapi_client/models/user_error_messages.py rename to src/zarban/wallet/openapi_client/models/error_detail.py index d786365..45f785b 100644 --- a/src/zarban/wallet/openapi_client/models/user_error_messages.py +++ b/src/zarban/wallet/openapi_client/models/error_detail.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.wallet.openapi_client.configuration import Configuration -class UserErrorMessages(object): +class ErrorDetail(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,7 +44,7 @@ class UserErrorMessages(object): } def __init__(self, user_message=None, solutions=None, local_vars_configuration=None): # noqa: E501 - """UserErrorMessages - a model defined in OpenAPI""" # noqa: E501 + """ErrorDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -53,27 +54,26 @@ def __init__(self, user_message=None, solutions=None, local_vars_configuration=N self.discriminator = None self.user_message = user_message - if solutions is not None: - self.solutions = solutions + self.solutions = solutions @property def user_message(self): - """Gets the user_message of this UserErrorMessages. # noqa: E501 + """Gets the user_message of this ErrorDetail. # noqa: E501 User-friendly error message # noqa: E501 - :return: The user_message of this UserErrorMessages. # noqa: E501 + :return: The user_message of this ErrorDetail. # noqa: E501 :rtype: str """ return self._user_message @user_message.setter def user_message(self, user_message): - """Sets the user_message of this UserErrorMessages. + """Sets the user_message of this ErrorDetail. User-friendly error message # noqa: E501 - :param user_message: The user_message of this UserErrorMessages. # noqa: E501 + :param user_message: The user_message of this ErrorDetail. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and user_message is None: # noqa: E501 @@ -83,22 +83,24 @@ def user_message(self, user_message): @property def solutions(self): - """Gets the solutions of this UserErrorMessages. # noqa: E501 + """Gets the solutions of this ErrorDetail. # noqa: E501 - :return: The solutions of this UserErrorMessages. # noqa: E501 + :return: The solutions of this ErrorDetail. # noqa: E501 :rtype: list[str] """ return self._solutions @solutions.setter def solutions(self, solutions): - """Sets the solutions of this UserErrorMessages. + """Sets the solutions of this ErrorDetail. - :param solutions: The solutions of this UserErrorMessages. # noqa: E501 + :param solutions: The solutions of this ErrorDetail. # noqa: E501 :type: list[str] """ + if self.local_vars_configuration.client_side_validation and solutions is None: # noqa: E501 + raise ValueError("Invalid value for `solutions`, must not be `None`") # noqa: E501 self._solutions = solutions @@ -136,14 +138,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, UserErrorMessages): + if not isinstance(other, ErrorDetail): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, UserErrorMessages): + if not isinstance(other, ErrorDetail): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/external_transaction.py b/src/zarban/wallet/openapi_client/models/external_transaction.py index ed4ecde..2b338a9 100644 --- a/src/zarban/wallet/openapi_client/models/external_transaction.py +++ b/src/zarban/wallet/openapi_client/models/external_transaction.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -40,7 +41,7 @@ class ExternalTransaction(object): '_from': 'str', 'to': 'str', 'comment': 'str', - 'amount': 'dict(str, str)', + 'amount': 'Currency', 'symbol': 'Symbol', 'network': 'Network', 'status': 'TransactionStatus' @@ -266,7 +267,7 @@ def amount(self): :return: The amount of this ExternalTransaction. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._amount @@ -276,7 +277,7 @@ def amount(self, amount): :param amount: The amount of this ExternalTransaction. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/friend_points.py b/src/zarban/wallet/openapi_client/models/friend_points.py index e6438e6..6324892 100644 --- a/src/zarban/wallet/openapi_client/models/friend_points.py +++ b/src/zarban/wallet/openapi_client/models/friend_points.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -52,10 +53,8 @@ def __init__(self, first_name=None, points=None, local_vars_configuration=None): self._points = None self.discriminator = None - if first_name is not None: - self.first_name = first_name - if points is not None: - self.points = points + self.first_name = first_name + self.points = points @property def first_name(self): @@ -77,6 +76,8 @@ def first_name(self, first_name): :param first_name: The first_name of this FriendPoints. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and first_name is None: # noqa: E501 + raise ValueError("Invalid value for `first_name`, must not be `None`") # noqa: E501 self._first_name = first_name @@ -100,6 +101,8 @@ def points(self, points): :param points: The points of this FriendPoints. # noqa: E501 :type: int """ + if self.local_vars_configuration.client_side_validation and points is None: # noqa: E501 + raise ValueError("Invalid value for `points`, must not be `None`") # noqa: E501 self._points = points diff --git a/src/zarban/wallet/openapi_client/models/task_completion_request.py b/src/zarban/wallet/openapi_client/models/friend_points_response.py similarity index 69% rename from src/zarban/wallet/openapi_client/models/task_completion_request.py rename to src/zarban/wallet/openapi_client/models/friend_points_response.py index 09b97b7..cac1ade 100644 --- a/src/zarban/wallet/openapi_client/models/task_completion_request.py +++ b/src/zarban/wallet/openapi_client/models/friend_points_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.wallet.openapi_client.configuration import Configuration -class TaskCompletionRequest(object): +class FriendPointsResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +34,46 @@ class TaskCompletionRequest(object): and the value is json key in definition. """ openapi_types = { - 'task_id': 'str' + 'data': 'list[FriendPoints]' } attribute_map = { - 'task_id': 'taskId' + 'data': 'data' } - def __init__(self, task_id=None, local_vars_configuration=None): # noqa: E501 - """TaskCompletionRequest - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """FriendPointsResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._task_id = None + self._data = None self.discriminator = None - self.task_id = task_id + self.data = data @property - def task_id(self): - """Gets the task_id of this TaskCompletionRequest. # noqa: E501 + def data(self): + """Gets the data of this FriendPointsResponse. # noqa: E501 - Task ID # noqa: E501 - :return: The task_id of this TaskCompletionRequest. # noqa: E501 - :rtype: str + :return: The data of this FriendPointsResponse. # noqa: E501 + :rtype: list[FriendPoints] """ - return self._task_id + return self._data - @task_id.setter - def task_id(self, task_id): - """Sets the task_id of this TaskCompletionRequest. + @data.setter + def data(self, data): + """Sets the data of this FriendPointsResponse. - Task ID # noqa: E501 - :param task_id: The task_id of this TaskCompletionRequest. # noqa: E501 - :type: str + :param data: The data of this FriendPointsResponse. # noqa: E501 + :type: list[FriendPoints] """ - if self.local_vars_configuration.client_side_validation and task_id is None: # noqa: E501 - raise ValueError("Invalid value for `task_id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - self._task_id = task_id + self._data = data def to_dict(self): """Returns the model properties as a dict""" @@ -110,14 +109,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, TaskCompletionRequest): + if not isinstance(other, FriendPointsResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TaskCompletionRequest): + if not isinstance(other, FriendPointsResponse): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/health_status.py b/src/zarban/wallet/openapi_client/models/health_status.py index 767da70..e7352c7 100644 --- a/src/zarban/wallet/openapi_client/models/health_status.py +++ b/src/zarban/wallet/openapi_client/models/health_status.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/jwt_response.py b/src/zarban/wallet/openapi_client/models/jwt_response.py index 112db5f..8da66d4 100644 --- a/src/zarban/wallet/openapi_client/models/jwt_response.py +++ b/src/zarban/wallet/openapi_client/models/jwt_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/kyc_confirm_request.py b/src/zarban/wallet/openapi_client/models/kyc_confirm_request.py index 01f2c39..3cf8ba0 100644 --- a/src/zarban/wallet/openapi_client/models/kyc_confirm_request.py +++ b/src/zarban/wallet/openapi_client/models/kyc_confirm_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/kyc_request.py b/src/zarban/wallet/openapi_client/models/kyc_request.py index 5a43503..4ab8e1c 100644 --- a/src/zarban/wallet/openapi_client/models/kyc_request.py +++ b/src/zarban/wallet/openapi_client/models/kyc_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/kyc_response.py b/src/zarban/wallet/openapi_client/models/kyc_response.py index 3bfe1ce..7d04001 100644 --- a/src/zarban/wallet/openapi_client/models/kyc_response.py +++ b/src/zarban/wallet/openapi_client/models/kyc_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/loan.py b/src/zarban/wallet/openapi_client/models/loan.py deleted file mode 100644 index 0425d7a..0000000 --- a/src/zarban/wallet/openapi_client/models/loan.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class Loan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'user_id': 'int', - 'liquidation_price': 'dict(str, str)', - 'collateral': 'dict(str, str)', - 'collateralization_ratio': 'str', - 'loan_to_value': 'str', - 'debt': 'dict(str, str)', - 'plan': 'LoanPlan' - } - - attribute_map = { - 'id': 'id', - 'user_id': 'userId', - 'liquidation_price': 'liquidationPrice', - 'collateral': 'collateral', - 'collateralization_ratio': 'collateralizationRatio', - 'loan_to_value': 'loanToValue', - 'debt': 'debt', - 'plan': 'plan' - } - - def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=None, collateralization_ratio=None, loan_to_value=None, debt=None, plan=None, local_vars_configuration=None): # noqa: E501 - """Loan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user_id = None - self._liquidation_price = None - self._collateral = None - self._collateralization_ratio = None - self._loan_to_value = None - self._debt = None - self._plan = None - self.discriminator = None - - if id is not None: - self.id = id - self.user_id = user_id - self.liquidation_price = liquidation_price - self.collateral = collateral - self.collateralization_ratio = collateralization_ratio - self.loan_to_value = loan_to_value - self.debt = debt - self.plan = plan - - @property - def id(self): - """Gets the id of this Loan. # noqa: E501 - - Identifier for the vault. # noqa: E501 - - :return: The id of this Loan. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Loan. - - Identifier for the vault. # noqa: E501 - - :param id: The id of this Loan. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user_id(self): - """Gets the user_id of this Loan. # noqa: E501 - - Identifier for the user. # noqa: E501 - - :return: The user_id of this Loan. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this Loan. - - Identifier for the user. # noqa: E501 - - :param user_id: The user_id of this Loan. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 - raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 - - self._user_id = user_id - - @property - def liquidation_price(self): - """Gets the liquidation_price of this Loan. # noqa: E501 - - - :return: The liquidation_price of this Loan. # noqa: E501 - :rtype: dict(str, str) - """ - return self._liquidation_price - - @liquidation_price.setter - def liquidation_price(self, liquidation_price): - """Sets the liquidation_price of this Loan. - - - :param liquidation_price: The liquidation_price of this Loan. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and liquidation_price is None: # noqa: E501 - raise ValueError("Invalid value for `liquidation_price`, must not be `None`") # noqa: E501 - - self._liquidation_price = liquidation_price - - @property - def collateral(self): - """Gets the collateral of this Loan. # noqa: E501 - - - :return: The collateral of this Loan. # noqa: E501 - :rtype: dict(str, str) - """ - return self._collateral - - @collateral.setter - def collateral(self, collateral): - """Sets the collateral of this Loan. - - - :param collateral: The collateral of this Loan. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and collateral is None: # noqa: E501 - raise ValueError("Invalid value for `collateral`, must not be `None`") # noqa: E501 - - self._collateral = collateral - - @property - def collateralization_ratio(self): - """Gets the collateralization_ratio of this Loan. # noqa: E501 - - The collateralization ratio of the vault. # noqa: E501 - - :return: The collateralization_ratio of this Loan. # noqa: E501 - :rtype: str - """ - return self._collateralization_ratio - - @collateralization_ratio.setter - def collateralization_ratio(self, collateralization_ratio): - """Sets the collateralization_ratio of this Loan. - - The collateralization ratio of the vault. # noqa: E501 - - :param collateralization_ratio: The collateralization_ratio of this Loan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateralization_ratio is None: # noqa: E501 - raise ValueError("Invalid value for `collateralization_ratio`, must not be `None`") # noqa: E501 - - self._collateralization_ratio = collateralization_ratio - - @property - def loan_to_value(self): - """Gets the loan_to_value of this Loan. # noqa: E501 - - The loan to value of the vault. # noqa: E501 - - :return: The loan_to_value of this Loan. # noqa: E501 - :rtype: str - """ - return self._loan_to_value - - @loan_to_value.setter - def loan_to_value(self, loan_to_value): - """Sets the loan_to_value of this Loan. - - The loan to value of the vault. # noqa: E501 - - :param loan_to_value: The loan_to_value of this Loan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and loan_to_value is None: # noqa: E501 - raise ValueError("Invalid value for `loan_to_value`, must not be `None`") # noqa: E501 - - self._loan_to_value = loan_to_value - - @property - def debt(self): - """Gets the debt of this Loan. # noqa: E501 - - - :return: The debt of this Loan. # noqa: E501 - :rtype: dict(str, str) - """ - return self._debt - - @debt.setter - def debt(self, debt): - """Sets the debt of this Loan. - - - :param debt: The debt of this Loan. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and debt is None: # noqa: E501 - raise ValueError("Invalid value for `debt`, must not be `None`") # noqa: E501 - - self._debt = debt - - @property - def plan(self): - """Gets the plan of this Loan. # noqa: E501 - - - :return: The plan of this Loan. # noqa: E501 - :rtype: LoanPlan - """ - return self._plan - - @plan.setter - def plan(self, plan): - """Sets the plan of this Loan. - - - :param plan: The plan of this Loan. # noqa: E501 - :type: LoanPlan - """ - if self.local_vars_configuration.client_side_validation and plan is None: # noqa: E501 - raise ValueError("Invalid value for `plan`, must not be `None`") # noqa: E501 - - self._plan = plan - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Loan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Loan): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/loan_create_request.py b/src/zarban/wallet/openapi_client/models/loan_create_request.py index 9f0f951..6b0f477 100644 --- a/src/zarban/wallet/openapi_client/models/loan_create_request.py +++ b/src/zarban/wallet/openapi_client/models/loan_create_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -95,7 +96,7 @@ def intent(self, intent): """ if self.local_vars_configuration.client_side_validation and intent is None: # noqa: E501 raise ValueError("Invalid value for `intent`, must not be `None`") # noqa: E501 - allowed_values = ["Create", "Preview"] # noqa: E501 + allowed_values = ["create", "preview"] # noqa: E501 if self.local_vars_configuration.client_side_validation and intent not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `intent` ({0}), must be one of {1}" # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/loan_plan.py b/src/zarban/wallet/openapi_client/models/loan_plan.py index 3d3e838..41f74e3 100644 --- a/src/zarban/wallet/openapi_client/models/loan_plan.py +++ b/src/zarban/wallet/openapi_client/models/loan_plan.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -37,8 +38,8 @@ class LoanPlan(object): 'min_collateralization_ratio': 'str', 'acceptable_coins': 'list[Coin]', 'fee': 'str', - 'max_debt': 'dict(str, str)', - 'min_debt': 'dict(str, str)', + 'max_debt': 'Currency', + 'min_debt': 'Currency', 'loan_to_value_options': 'list[DetailedLoanToValueOptions]' } @@ -179,7 +180,7 @@ def max_debt(self): :return: The max_debt of this LoanPlan. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._max_debt @@ -189,7 +190,7 @@ def max_debt(self, max_debt): :param max_debt: The max_debt of this LoanPlan. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and max_debt is None: # noqa: E501 raise ValueError("Invalid value for `max_debt`, must not be `None`") # noqa: E501 @@ -202,7 +203,7 @@ def min_debt(self): :return: The min_debt of this LoanPlan. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._min_debt @@ -212,7 +213,7 @@ def min_debt(self, min_debt): :param min_debt: The min_debt of this LoanPlan. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and min_debt is None: # noqa: E501 raise ValueError("Invalid value for `min_debt`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/loan_plan_response.py b/src/zarban/wallet/openapi_client/models/loan_plan_response.py new file mode 100644 index 0000000..5f7bcd0 --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/loan_plan_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class LoanPlanResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[LoanPlan]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """LoanPlanResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this LoanPlanResponse. # noqa: E501 + + + :return: The data of this LoanPlanResponse. # noqa: E501 + :rtype: list[LoanPlan] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this LoanPlanResponse. + + + :param data: The data of this LoanPlanResponse. # noqa: E501 + :type: list[LoanPlan] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoanPlanResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LoanPlanResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/loan_to_value_options.py b/src/zarban/wallet/openapi_client/models/loan_to_value_options.py index 86e7613..a7c4b05 100644 --- a/src/zarban/wallet/openapi_client/models/loan_to_value_options.py +++ b/src/zarban/wallet/openapi_client/models/loan_to_value_options.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/loans_response.py b/src/zarban/wallet/openapi_client/models/loans_response.py index c3f2adc..4cfb1f9 100644 --- a/src/zarban/wallet/openapi_client/models/loans_response.py +++ b/src/zarban/wallet/openapi_client/models/loans_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -35,13 +36,18 @@ class LoansResponse(object): openapi_types = { 'id': 'str', 'user_id': 'int', - 'liquidation_price': 'dict(str, str)', - 'collateral': 'dict(str, str)', + 'liquidation_price': 'Currency', + 'collateral': 'Currency', 'collateralization_ratio': 'str', 'loan_to_value': 'str', - 'debt': 'dict(str, str)', + 'debt': 'Currency', + 'principal': 'Currency', + 'scaled_debt': 'Currency', 'plan': 'LoanPlan', - 'state': 'dict(str, str)' + 'state': 'dict(str, str)', + 'updated_collateral_token_balance': 'Currency', + 'updated_debt_token_balance': 'Currency', + 'terms_and_conditions': 'BulletContent' } attribute_map = { @@ -52,11 +58,16 @@ class LoansResponse(object): 'collateralization_ratio': 'collateralizationRatio', 'loan_to_value': 'loanToValue', 'debt': 'debt', + 'principal': 'principal', + 'scaled_debt': 'scaledDebt', 'plan': 'plan', - 'state': 'state' + 'state': 'state', + 'updated_collateral_token_balance': 'updatedCollateralTokenBalance', + 'updated_debt_token_balance': 'updatedDebtTokenBalance', + 'terms_and_conditions': 'termsAndConditions' } - def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=None, collateralization_ratio=None, loan_to_value=None, debt=None, plan=None, state=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=None, collateralization_ratio=None, loan_to_value=None, debt=None, principal=None, scaled_debt=None, plan=None, state=None, updated_collateral_token_balance=None, updated_debt_token_balance=None, terms_and_conditions=None, local_vars_configuration=None): # noqa: E501 """LoansResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -69,8 +80,13 @@ def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=Non self._collateralization_ratio = None self._loan_to_value = None self._debt = None + self._principal = None + self._scaled_debt = None self._plan = None self._state = None + self._updated_collateral_token_balance = None + self._updated_debt_token_balance = None + self._terms_and_conditions = None self.discriminator = None if id is not None: @@ -81,8 +97,16 @@ def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=Non self.collateralization_ratio = collateralization_ratio self.loan_to_value = loan_to_value self.debt = debt + self.principal = principal + self.scaled_debt = scaled_debt self.plan = plan self.state = state + if updated_collateral_token_balance is not None: + self.updated_collateral_token_balance = updated_collateral_token_balance + if updated_debt_token_balance is not None: + self.updated_debt_token_balance = updated_debt_token_balance + if terms_and_conditions is not None: + self.terms_and_conditions = terms_and_conditions @property def id(self): @@ -138,7 +162,7 @@ def liquidation_price(self): :return: The liquidation_price of this LoansResponse. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._liquidation_price @@ -148,7 +172,7 @@ def liquidation_price(self, liquidation_price): :param liquidation_price: The liquidation_price of this LoansResponse. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and liquidation_price is None: # noqa: E501 raise ValueError("Invalid value for `liquidation_price`, must not be `None`") # noqa: E501 @@ -161,7 +185,7 @@ def collateral(self): :return: The collateral of this LoansResponse. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._collateral @@ -171,7 +195,7 @@ def collateral(self, collateral): :param collateral: The collateral of this LoansResponse. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and collateral is None: # noqa: E501 raise ValueError("Invalid value for `collateral`, must not be `None`") # noqa: E501 @@ -234,7 +258,7 @@ def debt(self): :return: The debt of this LoansResponse. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._debt @@ -244,13 +268,59 @@ def debt(self, debt): :param debt: The debt of this LoansResponse. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and debt is None: # noqa: E501 raise ValueError("Invalid value for `debt`, must not be `None`") # noqa: E501 self._debt = debt + @property + def principal(self): + """Gets the principal of this LoansResponse. # noqa: E501 + + + :return: The principal of this LoansResponse. # noqa: E501 + :rtype: Currency + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this LoansResponse. + + + :param principal: The principal of this LoansResponse. # noqa: E501 + :type: Currency + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def scaled_debt(self): + """Gets the scaled_debt of this LoansResponse. # noqa: E501 + + + :return: The scaled_debt of this LoansResponse. # noqa: E501 + :rtype: Currency + """ + return self._scaled_debt + + @scaled_debt.setter + def scaled_debt(self, scaled_debt): + """Sets the scaled_debt of this LoansResponse. + + + :param scaled_debt: The scaled_debt of this LoansResponse. # noqa: E501 + :type: Currency + """ + if self.local_vars_configuration.client_side_validation and scaled_debt is None: # noqa: E501 + raise ValueError("Invalid value for `scaled_debt`, must not be `None`") # noqa: E501 + + self._scaled_debt = scaled_debt + @property def plan(self): """Gets the plan of this LoansResponse. # noqa: E501 @@ -297,6 +367,69 @@ def state(self, state): self._state = state + @property + def updated_collateral_token_balance(self): + """Gets the updated_collateral_token_balance of this LoansResponse. # noqa: E501 + + + :return: The updated_collateral_token_balance of this LoansResponse. # noqa: E501 + :rtype: Currency + """ + return self._updated_collateral_token_balance + + @updated_collateral_token_balance.setter + def updated_collateral_token_balance(self, updated_collateral_token_balance): + """Sets the updated_collateral_token_balance of this LoansResponse. + + + :param updated_collateral_token_balance: The updated_collateral_token_balance of this LoansResponse. # noqa: E501 + :type: Currency + """ + + self._updated_collateral_token_balance = updated_collateral_token_balance + + @property + def updated_debt_token_balance(self): + """Gets the updated_debt_token_balance of this LoansResponse. # noqa: E501 + + + :return: The updated_debt_token_balance of this LoansResponse. # noqa: E501 + :rtype: Currency + """ + return self._updated_debt_token_balance + + @updated_debt_token_balance.setter + def updated_debt_token_balance(self, updated_debt_token_balance): + """Sets the updated_debt_token_balance of this LoansResponse. + + + :param updated_debt_token_balance: The updated_debt_token_balance of this LoansResponse. # noqa: E501 + :type: Currency + """ + + self._updated_debt_token_balance = updated_debt_token_balance + + @property + def terms_and_conditions(self): + """Gets the terms_and_conditions of this LoansResponse. # noqa: E501 + + + :return: The terms_and_conditions of this LoansResponse. # noqa: E501 + :rtype: BulletContent + """ + return self._terms_and_conditions + + @terms_and_conditions.setter + def terms_and_conditions(self, terms_and_conditions): + """Sets the terms_and_conditions of this LoansResponse. + + + :param terms_and_conditions: The terms_and_conditions of this LoansResponse. # noqa: E501 + :type: BulletContent + """ + + self._terms_and_conditions = terms_and_conditions + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/zarban/wallet/openapi_client/models/loans_response_list.py b/src/zarban/wallet/openapi_client/models/loans_response_list.py new file mode 100644 index 0000000..69595f7 --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/loans_response_list.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class LoansResponseList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[LoansResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """LoansResponseList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this LoansResponseList. # noqa: E501 + + + :return: The data of this LoansResponseList. # noqa: E501 + :rtype: list[LoansResponse] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this LoansResponseList. + + + :param data: The data of this LoansResponseList. # noqa: E501 + :type: list[LoansResponse] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoansResponseList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LoansResponseList): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/login_request.py b/src/zarban/wallet/openapi_client/models/login_request.py index 9dd92ef..d9fc043 100644 --- a/src/zarban/wallet/openapi_client/models/login_request.py +++ b/src/zarban/wallet/openapi_client/models/login_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/network.py b/src/zarban/wallet/openapi_client/models/network.py index e8907c7..f3d6039 100644 --- a/src/zarban/wallet/openapi_client/models/network.py +++ b/src/zarban/wallet/openapi_client/models/network.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/payment.py b/src/zarban/wallet/openapi_client/models/payment.py index d88b96a..79c1ea6 100644 --- a/src/zarban/wallet/openapi_client/models/payment.py +++ b/src/zarban/wallet/openapi_client/models/payment.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/payment_request.py b/src/zarban/wallet/openapi_client/models/payment_request.py index 0b7e528..b5ec6c4 100644 --- a/src/zarban/wallet/openapi_client/models/payment_request.py +++ b/src/zarban/wallet/openapi_client/models/payment_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/phone_otp_submit_request.py b/src/zarban/wallet/openapi_client/models/phone_otp_submit_request.py index a5eae3b..b1a7e06 100644 --- a/src/zarban/wallet/openapi_client/models/phone_otp_submit_request.py +++ b/src/zarban/wallet/openapi_client/models/phone_otp_submit_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/profile_response.py b/src/zarban/wallet/openapi_client/models/profile_response.py index 4c5b525..14d69fd 100644 --- a/src/zarban/wallet/openapi_client/models/profile_response.py +++ b/src/zarban/wallet/openapi_client/models/profile_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -61,8 +62,7 @@ def __init__(self, referral=None, points=None, user=None, bank_info=None, local_ self.referral = referral self.points = points self.user = user - if bank_info is not None: - self.bank_info = bank_info + self.bank_info = bank_info @property def referral(self): @@ -151,6 +151,8 @@ def bank_info(self, bank_info): :param bank_info: The bank_info of this ProfileResponse. # noqa: E501 :type: list[BankInfo] """ + if self.local_vars_configuration.client_side_validation and bank_info is None: # noqa: E501 + raise ValueError("Invalid value for `bank_info`, must not be `None`") # noqa: E501 self._bank_info = bank_info diff --git a/src/zarban/wallet/openapi_client/models/redemption.py b/src/zarban/wallet/openapi_client/models/redemption.py index 010e459..accc60a 100644 --- a/src/zarban/wallet/openapi_client/models/redemption.py +++ b/src/zarban/wallet/openapi_client/models/redemption.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,39 +34,49 @@ class Redemption(object): and the value is json key in definition. """ openapi_types = { - 'amount': 'dict(str, str)', - 'destination_card_number': 'str', + 'amount': 'Currency', + 'destination_bank_info': 'BankInfo', 'status': 'dict(str, str)', 'id': 'str', - 'created_at': 'Timestamp' + 'created_at': 'Timestamp', + 'updated_at': 'Timestamp', + 'paya_tracking_code': 'str' } attribute_map = { 'amount': 'amount', - 'destination_card_number': 'destinationCardNumber', + 'destination_bank_info': 'destinationBankInfo', 'status': 'status', 'id': 'id', - 'created_at': 'createdAt' + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'paya_tracking_code': 'payaTrackingCode' } - def __init__(self, amount=None, destination_card_number=None, status=None, id=None, created_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, amount=None, destination_bank_info=None, status=None, id=None, created_at=None, updated_at=None, paya_tracking_code=None, local_vars_configuration=None): # noqa: E501 """Redemption - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._amount = None - self._destination_card_number = None + self._destination_bank_info = None self._status = None self._id = None self._created_at = None + self._updated_at = None + self._paya_tracking_code = None self.discriminator = None self.amount = amount - self.destination_card_number = destination_card_number + self.destination_bank_info = destination_bank_info self.status = status self.id = id self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + if paya_tracking_code is not None: + self.paya_tracking_code = paya_tracking_code @property def amount(self): @@ -73,7 +84,7 @@ def amount(self): :return: The amount of this Redemption. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._amount @@ -83,7 +94,7 @@ def amount(self, amount): :param amount: The amount of this Redemption. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 @@ -91,29 +102,27 @@ def amount(self, amount): self._amount = amount @property - def destination_card_number(self): - """Gets the destination_card_number of this Redemption. # noqa: E501 + def destination_bank_info(self): + """Gets the destination_bank_info of this Redemption. # noqa: E501 - The card number to which the redemption amount will be transferred # noqa: E501 - :return: The destination_card_number of this Redemption. # noqa: E501 - :rtype: str + :return: The destination_bank_info of this Redemption. # noqa: E501 + :rtype: BankInfo """ - return self._destination_card_number + return self._destination_bank_info - @destination_card_number.setter - def destination_card_number(self, destination_card_number): - """Sets the destination_card_number of this Redemption. + @destination_bank_info.setter + def destination_bank_info(self, destination_bank_info): + """Sets the destination_bank_info of this Redemption. - The card number to which the redemption amount will be transferred # noqa: E501 - :param destination_card_number: The destination_card_number of this Redemption. # noqa: E501 - :type: str + :param destination_bank_info: The destination_bank_info of this Redemption. # noqa: E501 + :type: BankInfo """ - if self.local_vars_configuration.client_side_validation and destination_card_number is None: # noqa: E501 - raise ValueError("Invalid value for `destination_card_number`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and destination_bank_info is None: # noqa: E501 + raise ValueError("Invalid value for `destination_bank_info`, must not be `None`") # noqa: E501 - self._destination_card_number = destination_card_number + self._destination_bank_info = destination_bank_info @property def status(self): @@ -186,6 +195,50 @@ def created_at(self, created_at): self._created_at = created_at + @property + def updated_at(self): + """Gets the updated_at of this Redemption. # noqa: E501 + + + :return: The updated_at of this Redemption. # noqa: E501 + :rtype: Timestamp + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Redemption. + + + :param updated_at: The updated_at of this Redemption. # noqa: E501 + :type: Timestamp + """ + + self._updated_at = updated_at + + @property + def paya_tracking_code(self): + """Gets the paya_tracking_code of this Redemption. # noqa: E501 + + The Paya tracking code # noqa: E501 + + :return: The paya_tracking_code of this Redemption. # noqa: E501 + :rtype: str + """ + return self._paya_tracking_code + + @paya_tracking_code.setter + def paya_tracking_code(self, paya_tracking_code): + """Sets the paya_tracking_code of this Redemption. + + The Paya tracking code # noqa: E501 + + :param paya_tracking_code: The paya_tracking_code of this Redemption. # noqa: E501 + :type: str + """ + + self._paya_tracking_code = paya_tracking_code + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/zarban/wallet/openapi_client/models/redemption_request.py b/src/zarban/wallet/openapi_client/models/redemption_request.py index 673e839..63c2a25 100644 --- a/src/zarban/wallet/openapi_client/models/redemption_request.py +++ b/src/zarban/wallet/openapi_client/models/redemption_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/loan_create_response.py b/src/zarban/wallet/openapi_client/models/redemption_response.py similarity index 71% rename from src/zarban/wallet/openapi_client/models/loan_create_response.py rename to src/zarban/wallet/openapi_client/models/redemption_response.py index 5ef2272..ca93e85 100644 --- a/src/zarban/wallet/openapi_client/models/loan_create_response.py +++ b/src/zarban/wallet/openapi_client/models/redemption_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -18,7 +19,7 @@ from zarban.wallet.openapi_client.configuration import Configuration -class LoanCreateResponse(object): +class RedemptionResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,48 +34,46 @@ class LoanCreateResponse(object): and the value is json key in definition. """ openapi_types = { - 'id': 'str' + 'data': 'list[Redemption]' } attribute_map = { - 'id': 'id' + 'data': 'data' } - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """LoanCreateResponse - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """RedemptionResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._id = None + self._data = None self.discriminator = None - self.id = id + self.data = data @property - def id(self): - """Gets the id of this LoanCreateResponse. # noqa: E501 + def data(self): + """Gets the data of this RedemptionResponse. # noqa: E501 - Identifier for the loan. # noqa: E501 - :return: The id of this LoanCreateResponse. # noqa: E501 - :rtype: str + :return: The data of this RedemptionResponse. # noqa: E501 + :rtype: list[Redemption] """ - return self._id + return self._data - @id.setter - def id(self, id): - """Sets the id of this LoanCreateResponse. + @data.setter + def data(self, data): + """Sets the data of this RedemptionResponse. - Identifier for the loan. # noqa: E501 - :param id: The id of this LoanCreateResponse. # noqa: E501 - :type: str + :param data: The data of this RedemptionResponse. # noqa: E501 + :type: list[Redemption] """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - self._id = id + self._data = data def to_dict(self): """Returns the model properties as a dict""" @@ -110,14 +109,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, LoanCreateResponse): + if not isinstance(other, RedemptionResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, LoanCreateResponse): + if not isinstance(other, RedemptionResponse): return True return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/referral.py b/src/zarban/wallet/openapi_client/models/referral.py index 2ca0808..2f20e74 100644 --- a/src/zarban/wallet/openapi_client/models/referral.py +++ b/src/zarban/wallet/openapi_client/models/referral.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/referral_create_request.py b/src/zarban/wallet/openapi_client/models/referral_create_request.py deleted file mode 100644 index f02d1c0..0000000 --- a/src/zarban/wallet/openapi_client/models/referral_create_request.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class ReferralCreateRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'usage_limit': 'int' - } - - attribute_map = { - 'name': 'name', - 'usage_limit': 'usageLimit' - } - - def __init__(self, name=None, usage_limit=None, local_vars_configuration=None): # noqa: E501 - """ReferralCreateRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._usage_limit = None - self.discriminator = None - - self.name = name - self.usage_limit = usage_limit - - @property - def name(self): - """Gets the name of this ReferralCreateRequest. # noqa: E501 - - - :return: The name of this ReferralCreateRequest. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ReferralCreateRequest. - - - :param name: The name of this ReferralCreateRequest. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def usage_limit(self): - """Gets the usage_limit of this ReferralCreateRequest. # noqa: E501 - - - :return: The usage_limit of this ReferralCreateRequest. # noqa: E501 - :rtype: int - """ - return self._usage_limit - - @usage_limit.setter - def usage_limit(self, usage_limit): - """Sets the usage_limit of this ReferralCreateRequest. - - - :param usage_limit: The usage_limit of this ReferralCreateRequest. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and usage_limit is None: # noqa: E501 - raise ValueError("Invalid value for `usage_limit`, must not be `None`") # noqa: E501 - - self._usage_limit = usage_limit - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReferralCreateRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ReferralCreateRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/referral_response.py b/src/zarban/wallet/openapi_client/models/referral_response.py new file mode 100644 index 0000000..6d98067 --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/referral_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class ReferralResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Referral]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """ReferralResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this ReferralResponse. # noqa: E501 + + + :return: The data of this ReferralResponse. # noqa: E501 + :rtype: list[Referral] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ReferralResponse. + + + :param data: The data of this ReferralResponse. # noqa: E501 + :type: list[Referral] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReferralResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReferralResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/repay_loan_request.py b/src/zarban/wallet/openapi_client/models/repay_loan_request.py index bb64a5f..a61a72f 100644 --- a/src/zarban/wallet/openapi_client/models/repay_loan_request.py +++ b/src/zarban/wallet/openapi_client/models/repay_loan_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/repay_loan_response.py b/src/zarban/wallet/openapi_client/models/repay_loan_response.py deleted file mode 100644 index dc9f5cd..0000000 --- a/src/zarban/wallet/openapi_client/models/repay_loan_response.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class RepayLoanResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'user_id': 'int', - 'liquidation_price': 'dict(str, str)', - 'collateral': 'dict(str, str)', - 'collateralization_ratio': 'str', - 'loan_to_value': 'str', - 'debt': 'dict(str, str)', - 'plan': 'LoanPlan', - 'state': 'dict(str, str)' - } - - attribute_map = { - 'id': 'id', - 'user_id': 'userId', - 'liquidation_price': 'liquidationPrice', - 'collateral': 'collateral', - 'collateralization_ratio': 'collateralizationRatio', - 'loan_to_value': 'loanToValue', - 'debt': 'debt', - 'plan': 'plan', - 'state': 'state' - } - - def __init__(self, id=None, user_id=None, liquidation_price=None, collateral=None, collateralization_ratio=None, loan_to_value=None, debt=None, plan=None, state=None, local_vars_configuration=None): # noqa: E501 - """RepayLoanResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user_id = None - self._liquidation_price = None - self._collateral = None - self._collateralization_ratio = None - self._loan_to_value = None - self._debt = None - self._plan = None - self._state = None - self.discriminator = None - - if id is not None: - self.id = id - self.user_id = user_id - self.liquidation_price = liquidation_price - self.collateral = collateral - self.collateralization_ratio = collateralization_ratio - self.loan_to_value = loan_to_value - self.debt = debt - self.plan = plan - self.state = state - - @property - def id(self): - """Gets the id of this RepayLoanResponse. # noqa: E501 - - Identifier for the vault. # noqa: E501 - - :return: The id of this RepayLoanResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RepayLoanResponse. - - Identifier for the vault. # noqa: E501 - - :param id: The id of this RepayLoanResponse. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user_id(self): - """Gets the user_id of this RepayLoanResponse. # noqa: E501 - - Identifier for the user. # noqa: E501 - - :return: The user_id of this RepayLoanResponse. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this RepayLoanResponse. - - Identifier for the user. # noqa: E501 - - :param user_id: The user_id of this RepayLoanResponse. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 - raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 - - self._user_id = user_id - - @property - def liquidation_price(self): - """Gets the liquidation_price of this RepayLoanResponse. # noqa: E501 - - - :return: The liquidation_price of this RepayLoanResponse. # noqa: E501 - :rtype: dict(str, str) - """ - return self._liquidation_price - - @liquidation_price.setter - def liquidation_price(self, liquidation_price): - """Sets the liquidation_price of this RepayLoanResponse. - - - :param liquidation_price: The liquidation_price of this RepayLoanResponse. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and liquidation_price is None: # noqa: E501 - raise ValueError("Invalid value for `liquidation_price`, must not be `None`") # noqa: E501 - - self._liquidation_price = liquidation_price - - @property - def collateral(self): - """Gets the collateral of this RepayLoanResponse. # noqa: E501 - - - :return: The collateral of this RepayLoanResponse. # noqa: E501 - :rtype: dict(str, str) - """ - return self._collateral - - @collateral.setter - def collateral(self, collateral): - """Sets the collateral of this RepayLoanResponse. - - - :param collateral: The collateral of this RepayLoanResponse. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and collateral is None: # noqa: E501 - raise ValueError("Invalid value for `collateral`, must not be `None`") # noqa: E501 - - self._collateral = collateral - - @property - def collateralization_ratio(self): - """Gets the collateralization_ratio of this RepayLoanResponse. # noqa: E501 - - The collateralization ratio of the vault. # noqa: E501 - - :return: The collateralization_ratio of this RepayLoanResponse. # noqa: E501 - :rtype: str - """ - return self._collateralization_ratio - - @collateralization_ratio.setter - def collateralization_ratio(self, collateralization_ratio): - """Sets the collateralization_ratio of this RepayLoanResponse. - - The collateralization ratio of the vault. # noqa: E501 - - :param collateralization_ratio: The collateralization_ratio of this RepayLoanResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateralization_ratio is None: # noqa: E501 - raise ValueError("Invalid value for `collateralization_ratio`, must not be `None`") # noqa: E501 - - self._collateralization_ratio = collateralization_ratio - - @property - def loan_to_value(self): - """Gets the loan_to_value of this RepayLoanResponse. # noqa: E501 - - The loan to value of the vault. # noqa: E501 - - :return: The loan_to_value of this RepayLoanResponse. # noqa: E501 - :rtype: str - """ - return self._loan_to_value - - @loan_to_value.setter - def loan_to_value(self, loan_to_value): - """Sets the loan_to_value of this RepayLoanResponse. - - The loan to value of the vault. # noqa: E501 - - :param loan_to_value: The loan_to_value of this RepayLoanResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and loan_to_value is None: # noqa: E501 - raise ValueError("Invalid value for `loan_to_value`, must not be `None`") # noqa: E501 - - self._loan_to_value = loan_to_value - - @property - def debt(self): - """Gets the debt of this RepayLoanResponse. # noqa: E501 - - - :return: The debt of this RepayLoanResponse. # noqa: E501 - :rtype: dict(str, str) - """ - return self._debt - - @debt.setter - def debt(self, debt): - """Sets the debt of this RepayLoanResponse. - - - :param debt: The debt of this RepayLoanResponse. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and debt is None: # noqa: E501 - raise ValueError("Invalid value for `debt`, must not be `None`") # noqa: E501 - - self._debt = debt - - @property - def plan(self): - """Gets the plan of this RepayLoanResponse. # noqa: E501 - - - :return: The plan of this RepayLoanResponse. # noqa: E501 - :rtype: LoanPlan - """ - return self._plan - - @plan.setter - def plan(self, plan): - """Sets the plan of this RepayLoanResponse. - - - :param plan: The plan of this RepayLoanResponse. # noqa: E501 - :type: LoanPlan - """ - if self.local_vars_configuration.client_side_validation and plan is None: # noqa: E501 - raise ValueError("Invalid value for `plan`, must not be `None`") # noqa: E501 - - self._plan = plan - - @property - def state(self): - """Gets the state of this RepayLoanResponse. # noqa: E501 - - - :return: The state of this RepayLoanResponse. # noqa: E501 - :rtype: dict(str, str) - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this RepayLoanResponse. - - - :param state: The state of this RepayLoanResponse. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - - self._state = state - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayLoanResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayLoanResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/sign_up_request.py b/src/zarban/wallet/openapi_client/models/sign_up_request.py index 3b25607..0e1448f 100644 --- a/src/zarban/wallet/openapi_client/models/sign_up_request.py +++ b/src/zarban/wallet/openapi_client/models/sign_up_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/simple_response.py b/src/zarban/wallet/openapi_client/models/simple_response.py index 41437a7..a8b3087 100644 --- a/src/zarban/wallet/openapi_client/models/simple_response.py +++ b/src/zarban/wallet/openapi_client/models/simple_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/swap_request.py b/src/zarban/wallet/openapi_client/models/swap_request.py index 50249a5..482947f 100644 --- a/src/zarban/wallet/openapi_client/models/swap_request.py +++ b/src/zarban/wallet/openapi_client/models/swap_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/swap_response.py b/src/zarban/wallet/openapi_client/models/swap_response.py index b2831b6..890b32b 100644 --- a/src/zarban/wallet/openapi_client/models/swap_response.py +++ b/src/zarban/wallet/openapi_client/models/swap_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -45,7 +46,7 @@ class SwapResponse(object): 'created_at': 'Timestamp', 'expires_at': 'Timestamp', 'executed_at': 'Timestamp', - 'value': 'dict(str, str)' + 'value': 'Currency' } attribute_map = { @@ -384,7 +385,7 @@ def value(self): :return: The value of this SwapResponse. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._value @@ -394,7 +395,7 @@ def value(self, value): :param value: The value of this SwapResponse. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/symbol.py b/src/zarban/wallet/openapi_client/models/symbol.py index 03cba99..1854398 100644 --- a/src/zarban/wallet/openapi_client/models/symbol.py +++ b/src/zarban/wallet/openapi_client/models/symbol.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/task.py b/src/zarban/wallet/openapi_client/models/task.py index 5ccdeec..e275f9d 100644 --- a/src/zarban/wallet/openapi_client/models/task.py +++ b/src/zarban/wallet/openapi_client/models/task.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/task_completion_response.py b/src/zarban/wallet/openapi_client/models/task_completion_response.py deleted file mode 100644 index 2196d57..0000000 --- a/src/zarban/wallet/openapi_client/models/task_completion_response.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class TaskCompletionResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'completed': 'bool', - 'completed_at': 'Timestamp' - } - - attribute_map = { - 'completed': 'completed', - 'completed_at': 'completedAt' - } - - def __init__(self, completed=None, completed_at=None, local_vars_configuration=None): # noqa: E501 - """TaskCompletionResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._completed = None - self._completed_at = None - self.discriminator = None - - self.completed = completed - if completed_at is not None: - self.completed_at = completed_at - - @property - def completed(self): - """Gets the completed of this TaskCompletionResponse. # noqa: E501 - - Task completion status # noqa: E501 - - :return: The completed of this TaskCompletionResponse. # noqa: E501 - :rtype: bool - """ - return self._completed - - @completed.setter - def completed(self, completed): - """Sets the completed of this TaskCompletionResponse. - - Task completion status # noqa: E501 - - :param completed: The completed of this TaskCompletionResponse. # noqa: E501 - :type: bool - """ - if self.local_vars_configuration.client_side_validation and completed is None: # noqa: E501 - raise ValueError("Invalid value for `completed`, must not be `None`") # noqa: E501 - - self._completed = completed - - @property - def completed_at(self): - """Gets the completed_at of this TaskCompletionResponse. # noqa: E501 - - - :return: The completed_at of this TaskCompletionResponse. # noqa: E501 - :rtype: Timestamp - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this TaskCompletionResponse. - - - :param completed_at: The completed_at of this TaskCompletionResponse. # noqa: E501 - :type: Timestamp - """ - - self._completed_at = completed_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TaskCompletionResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TaskCompletionResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/task_response.py b/src/zarban/wallet/openapi_client/models/task_response.py new file mode 100644 index 0000000..4d2755b --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/task_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class TaskResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Task]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """TaskResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this TaskResponse. # noqa: E501 + + + :return: The data of this TaskResponse. # noqa: E501 + :rtype: list[Task] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TaskResponse. + + + :param data: The data of this TaskResponse. # noqa: E501 + :type: list[Task] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TaskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/telegram_profile.py b/src/zarban/wallet/openapi_client/models/telegram_profile.py index ce52b9a..3bb16c2 100644 --- a/src/zarban/wallet/openapi_client/models/telegram_profile.py +++ b/src/zarban/wallet/openapi_client/models/telegram_profile.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/timestamp.py b/src/zarban/wallet/openapi_client/models/timestamp.py index e7ce3f9..ecba759 100644 --- a/src/zarban/wallet/openapi_client/models/timestamp.py +++ b/src/zarban/wallet/openapi_client/models/timestamp.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/transaction.py b/src/zarban/wallet/openapi_client/models/transaction.py index f2a9bde..63472be 100644 --- a/src/zarban/wallet/openapi_client/models/transaction.py +++ b/src/zarban/wallet/openapi_client/models/transaction.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -39,7 +40,7 @@ class Transaction(object): '_from': 'str', 'to': 'str', 'symbol': 'Symbol', - 'amount': 'dict(str, str)', + 'amount': 'Currency', 'direction': 'str', 'external_transaction': 'ExternalTransaction' } @@ -234,7 +235,7 @@ def amount(self): :return: The amount of this Transaction. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._amount @@ -244,7 +245,7 @@ def amount(self, amount): :param amount: The amount of this Transaction. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/transaction_response.py b/src/zarban/wallet/openapi_client/models/transaction_response.py new file mode 100644 index 0000000..0c38178 --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/transaction_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class TransactionResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[Transaction]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """TransactionResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this TransactionResponse. # noqa: E501 + + + :return: The data of this TransactionResponse. # noqa: E501 + :rtype: list[Transaction] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionResponse. + + + :param data: The data of this TransactionResponse. # noqa: E501 + :type: list[Transaction] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransactionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/transaction_status.py b/src/zarban/wallet/openapi_client/models/transaction_status.py index 722da34..2741c0c 100644 --- a/src/zarban/wallet/openapi_client/models/transaction_status.py +++ b/src/zarban/wallet/openapi_client/models/transaction_status.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/transaction_type.py b/src/zarban/wallet/openapi_client/models/transaction_type.py index 0bcf80a..61eec21 100644 --- a/src/zarban/wallet/openapi_client/models/transaction_type.py +++ b/src/zarban/wallet/openapi_client/models/transaction_type.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/update_email_request.py b/src/zarban/wallet/openapi_client/models/update_email_request.py index 2d600ed..d54067d 100644 --- a/src/zarban/wallet/openapi_client/models/update_email_request.py +++ b/src/zarban/wallet/openapi_client/models/update_email_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/update_phone_request.py b/src/zarban/wallet/openapi_client/models/update_phone_request.py index 4ab20f9..354ac31 100644 --- a/src/zarban/wallet/openapi_client/models/update_phone_request.py +++ b/src/zarban/wallet/openapi_client/models/update_phone_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/user.py b/src/zarban/wallet/openapi_client/models/user.py index c009047..754dc15 100644 --- a/src/zarban/wallet/openapi_client/models/user.py +++ b/src/zarban/wallet/openapi_client/models/user.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -43,6 +44,7 @@ class User(object): 'is_kyc_verified': 'bool', 'is_child': 'bool', 'is_super_user': 'bool', + 'is_admin': 'bool', 'telegram': 'TelegramProfile' } @@ -57,10 +59,11 @@ class User(object): 'is_kyc_verified': 'isKycVerified', 'is_child': 'isChild', 'is_super_user': 'isSuperUser', + 'is_admin': 'isAdmin', 'telegram': 'telegram' } - def __init__(self, first_name=None, last_name=None, email=None, username=None, phone=None, is_email_verified=None, is_phone_verified=None, is_kyc_verified=None, is_child=None, is_super_user=None, telegram=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, first_name=None, last_name=None, email=None, username=None, phone=None, is_email_verified=None, is_phone_verified=None, is_kyc_verified=None, is_child=None, is_super_user=None, is_admin=None, telegram=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -76,6 +79,7 @@ def __init__(self, first_name=None, last_name=None, email=None, username=None, p self._is_kyc_verified = None self._is_child = None self._is_super_user = None + self._is_admin = None self._telegram = None self.discriminator = None @@ -99,6 +103,8 @@ def __init__(self, first_name=None, last_name=None, email=None, username=None, p self.is_child = is_child if is_super_user is not None: self.is_super_user = is_super_user + if is_admin is not None: + self.is_admin = is_admin if telegram is not None: self.telegram = telegram @@ -316,6 +322,27 @@ def is_super_user(self, is_super_user): self._is_super_user = is_super_user + @property + def is_admin(self): + """Gets the is_admin of this User. # noqa: E501 + + + :return: The is_admin of this User. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this User. + + + :param is_admin: The is_admin of this User. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + @property def telegram(self): """Gets the telegram of this User. # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/user_error.py b/src/zarban/wallet/openapi_client/models/user_error.py index 849a44e..e4f176a 100644 --- a/src/zarban/wallet/openapi_client/models/user_error.py +++ b/src/zarban/wallet/openapi_client/models/user_error.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,7 +34,7 @@ class UserError(object): and the value is json key in definition. """ openapi_types = { - 'messages': 'dict(str, UserErrorMessages)' + 'messages': 'dict(str, ErrorDetail)' } attribute_map = { @@ -58,7 +59,7 @@ def messages(self): Localized error messages # noqa: E501 :return: The messages of this UserError. # noqa: E501 - :rtype: dict(str, UserErrorMessages) + :rtype: dict(str, ErrorDetail) """ return self._messages @@ -69,7 +70,7 @@ def messages(self, messages): Localized error messages # noqa: E501 :param messages: The messages of this UserError. # noqa: E501 - :type: dict(str, UserErrorMessages) + :type: dict(str, ErrorDetail) """ if self.local_vars_configuration.client_side_validation and messages is None: # noqa: E501 raise ValueError("Invalid value for `messages`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/wallet_balance.py b/src/zarban/wallet/openapi_client/models/wallet_balance.py index 0d9ab5a..f04fe43 100644 --- a/src/zarban/wallet/openapi_client/models/wallet_balance.py +++ b/src/zarban/wallet/openapi_client/models/wallet_balance.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -33,7 +34,7 @@ class WalletBalance(object): and the value is json key in definition. """ openapi_types = { - 'total': 'dict(str, str)', + 'total': 'Currency', 'balances': 'list[Balance]' } @@ -61,7 +62,7 @@ def total(self): :return: The total of this WalletBalance. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._total @@ -71,7 +72,7 @@ def total(self, total): :param total: The total of this WalletBalance. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/withdraw_request.py b/src/zarban/wallet/openapi_client/models/withdraw_request.py index 1389f44..14f9aa9 100644 --- a/src/zarban/wallet/openapi_client/models/withdraw_request.py +++ b/src/zarban/wallet/openapi_client/models/withdraw_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/withdraw_request_body.py b/src/zarban/wallet/openapi_client/models/withdraw_request_body.py index 544853d..08cdace 100644 --- a/src/zarban/wallet/openapi_client/models/withdraw_request_body.py +++ b/src/zarban/wallet/openapi_client/models/withdraw_request_body.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/withdraw_request_preview.py b/src/zarban/wallet/openapi_client/models/withdraw_request_preview.py index 1971339..51f6178 100644 --- a/src/zarban/wallet/openapi_client/models/withdraw_request_preview.py +++ b/src/zarban/wallet/openapi_client/models/withdraw_request_preview.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -36,9 +37,9 @@ class WithdrawRequestPreview(object): 'address': 'str', 'network': 'Network', 'symbol': 'Symbol', - 'amount': 'dict(str, str)', - 'fee': 'dict(str, str)', - 'balance_after_withdraw': 'dict(str, str)' + 'amount': 'Currency', + 'fee': 'Currency', + 'balance_after_withdraw': 'Currency' } attribute_map = { @@ -148,7 +149,7 @@ def amount(self): :return: The amount of this WithdrawRequestPreview. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._amount @@ -158,7 +159,7 @@ def amount(self, amount): :param amount: The amount of this WithdrawRequestPreview. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 @@ -171,7 +172,7 @@ def fee(self): :return: The fee of this WithdrawRequestPreview. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._fee @@ -181,7 +182,7 @@ def fee(self, fee): :param fee: The fee of this WithdrawRequestPreview. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and fee is None: # noqa: E501 raise ValueError("Invalid value for `fee`, must not be `None`") # noqa: E501 @@ -194,7 +195,7 @@ def balance_after_withdraw(self): :return: The balance_after_withdraw of this WithdrawRequestPreview. # noqa: E501 - :rtype: dict(str, str) + :rtype: Currency """ return self._balance_after_withdraw @@ -204,7 +205,7 @@ def balance_after_withdraw(self, balance_after_withdraw): :param balance_after_withdraw: The balance_after_withdraw of this WithdrawRequestPreview. # noqa: E501 - :type: dict(str, str) + :type: Currency """ if self.local_vars_configuration.client_side_validation and balance_after_withdraw is None: # noqa: E501 raise ValueError("Invalid value for `balance_after_withdraw`, must not be `None`") # noqa: E501 diff --git a/src/zarban/wallet/openapi_client/models/withdraw_request_response.py b/src/zarban/wallet/openapi_client/models/withdraw_request_response.py new file mode 100644 index 0000000..9928882 --- /dev/null +++ b/src/zarban/wallet/openapi_client/models/withdraw_request_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from zarban.wallet.openapi_client.configuration import Configuration + + +class WithdrawRequestResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[WithdrawRequest]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """WithdrawRequestResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this WithdrawRequestResponse. # noqa: E501 + + + :return: The data of this WithdrawRequestResponse. # noqa: E501 + :rtype: list[WithdrawRequest] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this WithdrawRequestResponse. + + + :param data: The data of this WithdrawRequestResponse. # noqa: E501 + :type: list[WithdrawRequest] + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WithdrawRequestResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WithdrawRequestResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/withdraw_response.py b/src/zarban/wallet/openapi_client/models/withdraw_response.py deleted file mode 100644 index ee69beb..0000000 --- a/src/zarban/wallet/openapi_client/models/withdraw_response.py +++ /dev/null @@ -1,339 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class WithdrawResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'time_created': 'Timestamp', - 'network': 'Network', - 'symbol': 'Symbol', - 'amount': 'str', - 'to': 'str', - 'comment': 'str', - 'status': 'str', - 'block_explorer_url': 'str' - } - - attribute_map = { - 'id': 'id', - 'time_created': 'timeCreated', - 'network': 'network', - 'symbol': 'symbol', - 'amount': 'amount', - 'to': 'to', - 'comment': 'comment', - 'status': 'status', - 'block_explorer_url': 'blockExplorerUrl' - } - - def __init__(self, id=None, time_created=None, network=None, symbol=None, amount=None, to=None, comment=None, status=None, block_explorer_url=None, local_vars_configuration=None): # noqa: E501 - """WithdrawResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time_created = None - self._network = None - self._symbol = None - self._amount = None - self._to = None - self._comment = None - self._status = None - self._block_explorer_url = None - self.discriminator = None - - self.id = id - self.time_created = time_created - self.network = network - self.symbol = symbol - self.amount = amount - self.to = to - self.comment = comment - self.status = status - self.block_explorer_url = block_explorer_url - - @property - def id(self): - """Gets the id of this WithdrawResponse. # noqa: E501 - - - :return: The id of this WithdrawResponse. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this WithdrawResponse. - - - :param id: The id of this WithdrawResponse. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def time_created(self): - """Gets the time_created of this WithdrawResponse. # noqa: E501 - - - :return: The time_created of this WithdrawResponse. # noqa: E501 - :rtype: Timestamp - """ - return self._time_created - - @time_created.setter - def time_created(self, time_created): - """Sets the time_created of this WithdrawResponse. - - - :param time_created: The time_created of this WithdrawResponse. # noqa: E501 - :type: Timestamp - """ - if self.local_vars_configuration.client_side_validation and time_created is None: # noqa: E501 - raise ValueError("Invalid value for `time_created`, must not be `None`") # noqa: E501 - - self._time_created = time_created - - @property - def network(self): - """Gets the network of this WithdrawResponse. # noqa: E501 - - - :return: The network of this WithdrawResponse. # noqa: E501 - :rtype: Network - """ - return self._network - - @network.setter - def network(self, network): - """Sets the network of this WithdrawResponse. - - - :param network: The network of this WithdrawResponse. # noqa: E501 - :type: Network - """ - if self.local_vars_configuration.client_side_validation and network is None: # noqa: E501 - raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501 - - self._network = network - - @property - def symbol(self): - """Gets the symbol of this WithdrawResponse. # noqa: E501 - - - :return: The symbol of this WithdrawResponse. # noqa: E501 - :rtype: Symbol - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this WithdrawResponse. - - - :param symbol: The symbol of this WithdrawResponse. # noqa: E501 - :type: Symbol - """ - if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 - raise ValueError("Invalid value for `symbol`, must not be `None`") # noqa: E501 - - self._symbol = symbol - - @property - def amount(self): - """Gets the amount of this WithdrawResponse. # noqa: E501 - - - :return: The amount of this WithdrawResponse. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this WithdrawResponse. - - - :param amount: The amount of this WithdrawResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def to(self): - """Gets the to of this WithdrawResponse. # noqa: E501 - - - :return: The to of this WithdrawResponse. # noqa: E501 - :rtype: str - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this WithdrawResponse. - - - :param to: The to of this WithdrawResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - - self._to = to - - @property - def comment(self): - """Gets the comment of this WithdrawResponse. # noqa: E501 - - - :return: The comment of this WithdrawResponse. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this WithdrawResponse. - - - :param comment: The comment of this WithdrawResponse. # noqa: E501 - :type: str - """ - - self._comment = comment - - @property - def status(self): - """Gets the status of this WithdrawResponse. # noqa: E501 - - - :return: The status of this WithdrawResponse. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this WithdrawResponse. - - - :param status: The status of this WithdrawResponse. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["Pending", "Canceled", "Approved", "Rejected", "Proccessing", "Failed", "Sent", "AccountDebited", "AccountBalanceUnlocked", "Completed"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def block_explorer_url(self): - """Gets the block_explorer_url of this WithdrawResponse. # noqa: E501 - - - :return: The block_explorer_url of this WithdrawResponse. # noqa: E501 - :rtype: str - """ - return self._block_explorer_url - - @block_explorer_url.setter - def block_explorer_url(self, block_explorer_url): - """Sets the block_explorer_url of this WithdrawResponse. - - - :param block_explorer_url: The block_explorer_url of this WithdrawResponse. # noqa: E501 - :type: str - """ - - self._block_explorer_url = block_explorer_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WithdrawResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WithdrawResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/models/withdraw_response_body.py b/src/zarban/wallet/openapi_client/models/withdraw_response_body.py index bbef52e..5855ca3 100644 --- a/src/zarban/wallet/openapi_client/models/withdraw_response_body.py +++ b/src/zarban/wallet/openapi_client/models/withdraw_response_body.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/openapi_client/models/withdraw_response_preview.py b/src/zarban/wallet/openapi_client/models/withdraw_response_preview.py deleted file mode 100644 index 34f4338..0000000 --- a/src/zarban/wallet/openapi_client/models/withdraw_response_preview.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from zarban.wallet.openapi_client.configuration import Configuration - - -class WithdrawResponsePreview(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'address': 'str', - 'network': 'Network', - 'symbol': 'Symbol', - 'amount': 'dict(str, str)', - 'fee': 'dict(str, str)', - 'balance_after_withdraw': 'dict(str, str)' - } - - attribute_map = { - 'address': 'address', - 'network': 'network', - 'symbol': 'symbol', - 'amount': 'amount', - 'fee': 'fee', - 'balance_after_withdraw': 'balanceAfterWithdraw' - } - - def __init__(self, address=None, network=None, symbol=None, amount=None, fee=None, balance_after_withdraw=None, local_vars_configuration=None): # noqa: E501 - """WithdrawResponsePreview - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._address = None - self._network = None - self._symbol = None - self._amount = None - self._fee = None - self._balance_after_withdraw = None - self.discriminator = None - - self.address = address - self.network = network - self.symbol = symbol - self.amount = amount - self.fee = fee - self.balance_after_withdraw = balance_after_withdraw - - @property - def address(self): - """Gets the address of this WithdrawResponsePreview. # noqa: E501 - - Withdrawal address # noqa: E501 - - :return: The address of this WithdrawResponsePreview. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this WithdrawResponsePreview. - - Withdrawal address # noqa: E501 - - :param address: The address of this WithdrawResponsePreview. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 - - self._address = address - - @property - def network(self): - """Gets the network of this WithdrawResponsePreview. # noqa: E501 - - - :return: The network of this WithdrawResponsePreview. # noqa: E501 - :rtype: Network - """ - return self._network - - @network.setter - def network(self, network): - """Sets the network of this WithdrawResponsePreview. - - - :param network: The network of this WithdrawResponsePreview. # noqa: E501 - :type: Network - """ - if self.local_vars_configuration.client_side_validation and network is None: # noqa: E501 - raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501 - - self._network = network - - @property - def symbol(self): - """Gets the symbol of this WithdrawResponsePreview. # noqa: E501 - - - :return: The symbol of this WithdrawResponsePreview. # noqa: E501 - :rtype: Symbol - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this WithdrawResponsePreview. - - - :param symbol: The symbol of this WithdrawResponsePreview. # noqa: E501 - :type: Symbol - """ - if self.local_vars_configuration.client_side_validation and symbol is None: # noqa: E501 - raise ValueError("Invalid value for `symbol`, must not be `None`") # noqa: E501 - - self._symbol = symbol - - @property - def amount(self): - """Gets the amount of this WithdrawResponsePreview. # noqa: E501 - - - :return: The amount of this WithdrawResponsePreview. # noqa: E501 - :rtype: dict(str, str) - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this WithdrawResponsePreview. - - - :param amount: The amount of this WithdrawResponsePreview. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def fee(self): - """Gets the fee of this WithdrawResponsePreview. # noqa: E501 - - - :return: The fee of this WithdrawResponsePreview. # noqa: E501 - :rtype: dict(str, str) - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this WithdrawResponsePreview. - - - :param fee: The fee of this WithdrawResponsePreview. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and fee is None: # noqa: E501 - raise ValueError("Invalid value for `fee`, must not be `None`") # noqa: E501 - - self._fee = fee - - @property - def balance_after_withdraw(self): - """Gets the balance_after_withdraw of this WithdrawResponsePreview. # noqa: E501 - - - :return: The balance_after_withdraw of this WithdrawResponsePreview. # noqa: E501 - :rtype: dict(str, str) - """ - return self._balance_after_withdraw - - @balance_after_withdraw.setter - def balance_after_withdraw(self, balance_after_withdraw): - """Sets the balance_after_withdraw of this WithdrawResponsePreview. - - - :param balance_after_withdraw: The balance_after_withdraw of this WithdrawResponsePreview. # noqa: E501 - :type: dict(str, str) - """ - if self.local_vars_configuration.client_side_validation and balance_after_withdraw is None: # noqa: E501 - raise ValueError("Invalid value for `balance_after_withdraw`, must not be `None`") # noqa: E501 - - self._balance_after_withdraw = balance_after_withdraw - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WithdrawResponsePreview): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WithdrawResponsePreview): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/zarban/wallet/openapi_client/rest.py b/src/zarban/wallet/openapi_client/rest.py index ac93ea7..ea195e7 100644 --- a/src/zarban/wallet/openapi_client/rest.py +++ b/src/zarban/wallet/openapi_client/rest.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ diff --git a/src/zarban/wallet/test/test_admin_redemption_update_request.py b/src/zarban/wallet/test/test_admin_redemption_update_request.py new file mode 100644 index 0000000..4ca82ce --- /dev/null +++ b/src/zarban/wallet/test/test_admin_redemption_update_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.admin_redemption_update_request import AdminRedemptionUpdateRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestAdminRedemptionUpdateRequest(unittest.TestCase): + """AdminRedemptionUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AdminRedemptionUpdateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.admin_redemption_update_request.AdminRedemptionUpdateRequest() # noqa: E501 + if include_optional : + return AdminRedemptionUpdateRequest( + status = 'Approved', + paya_tracking_code = '1234567890' + ) + else : + return AdminRedemptionUpdateRequest( + status = 'Approved', + ) + + def testAdminRedemptionUpdateRequest(self): + """Test AdminRedemptionUpdateRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_auth_api.py b/src/zarban/wallet/test/test_auth_api.py new file mode 100644 index 0000000..f775e9e --- /dev/null +++ b/src/zarban/wallet/test/test_auth_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.auth_api import AuthApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestAuthApi(unittest.TestCase): + """AuthApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.auth_api.AuthApi() # noqa: E501 + + def tearDown(self): + pass + + def test_authenticate_with_telegram(self): + """Test case for authenticate_with_telegram + + Authenticate with Telegram # noqa: E501 + """ + pass + + def test_generate_jwt_token(self): + """Test case for generate_jwt_token + + Generate a JWT token # noqa: E501 + """ + pass + + def test_get_otp(self): + """Test case for get_otp + + Get OTP # noqa: E501 + """ + pass + + def test_login_with_email_and_password(self): + """Test case for login_with_email_and_password + + Login with email and password # noqa: E501 + """ + pass + + def test_signup_with_email_and_password(self): + """Test case for signup_with_email_and_password + + signup with email and password # noqa: E501 + """ + pass + + def test_verify_user_email(self): + """Test case for verify_user_email + + Verify email # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object9.py b/src/zarban/wallet/test/test_auth_telegram_request.py similarity index 58% rename from src/zarban/wallet/test/test_inline_object9.py rename to src/zarban/wallet/test/test_auth_telegram_request.py index f3c8f23..cc406e5 100644 --- a/src/zarban/wallet/test/test_inline_object9.py +++ b/src/zarban/wallet/test/test_auth_telegram_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object9 import InlineObject9 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.auth_telegram_request import AuthTelegramRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject9(unittest.TestCase): - """InlineObject9 unit test stubs""" +class TestAuthTelegramRequest(unittest.TestCase): + """AuthTelegramRequest unit test stubs""" def setUp(self): pass @@ -29,22 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject9 + """Test AuthTelegramRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object9.InlineObject9() # noqa: E501 + # model = zarban.wallet.openapi_client.models.auth_telegram_request.AuthTelegramRequest() # noqa: E501 if include_optional : - return InlineObject9( + return AuthTelegramRequest( initdata = '0' ) else : - return InlineObject9( + return AuthTelegramRequest( initdata = '0', ) - def testInlineObject9(self): - """Test InlineObject9""" + def testAuthTelegramRequest(self): + """Test AuthTelegramRequest""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_balance.py b/src/zarban/wallet/test/test_balance.py index a03f093..2f73558 100644 --- a/src/zarban/wallet/test/test_balance.py +++ b/src/zarban/wallet/test/test_balance.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.balance import Balance # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.balance import Balance # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestBalance(unittest.TestCase): """Balance unit test stubs""" @@ -33,66 +34,66 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.balance.Balance() # noqa: E501 + # model = zarban.wallet.openapi_client.models.balance.Balance() # noqa: E501 if include_optional : return Balance( - locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - coin = openapi_client.models.coin.Coin( - config = openapi_client.models.coin_config.CoinConfig( + locked = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + coin = zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ), ), - balance = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"} + balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}} ) else : return Balance( - locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - coin = openapi_client.models.coin.Coin( - config = openapi_client.models.coin_config.CoinConfig( + locked = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + coin = zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ), ), - balance = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, ) def testBalance(self): diff --git a/src/zarban/wallet/test/test_balance_api.py b/src/zarban/wallet/test/test_balance_api.py new file mode 100644 index 0000000..d5f9859 --- /dev/null +++ b/src/zarban/wallet/test/test_balance_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.balance_api import BalanceApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestBalanceApi(unittest.TestCase): + """BalanceApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.balance_api.BalanceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_balance_by_symbol(self): + """Test case for get_balance_by_symbol + + Get balance # noqa: E501 + """ + pass + + def test_get_wallet_balance(self): + """Test case for get_wallet_balance + + Get wallet balance # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_bank_info.py b/src/zarban/wallet/test/test_bank_info.py new file mode 100644 index 0000000..094385b --- /dev/null +++ b/src/zarban/wallet/test/test_bank_info.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.bank_info import BankInfo # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestBankInfo(unittest.TestCase): + """BankInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BankInfo + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.bank_info.BankInfo() # noqa: E501 + if include_optional : + return BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890' + ) + else : + return BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', + ) + + def testBankInfo(self): + """Test BankInfo""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_coin_content.py b/src/zarban/wallet/test/test_bullet_content.py similarity index 62% rename from src/zarban/wallet/test/test_coin_content.py rename to src/zarban/wallet/test/test_bullet_content.py index d162eb5..3025181 100644 --- a/src/zarban/wallet/test/test_coin_content.py +++ b/src/zarban/wallet/test/test_bullet_content.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.coin_content import CoinContent # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.bullet_content import BulletContent # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestCoinContent(unittest.TestCase): - """CoinContent unit test stubs""" +class TestBulletContent(unittest.TestCase): + """BulletContent unit test stubs""" def setUp(self): pass @@ -29,30 +30,30 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test CoinContent + """Test BulletContent include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.coin_content.CoinContent() # noqa: E501 + # model = zarban.wallet.openapi_client.models.bullet_content.BulletContent() # noqa: E501 if include_optional : - return CoinContent( + return BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ] ) else : - return CoinContent( + return BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ) - def testCoinContent(self): - """Test CoinContent""" + def testBulletContent(self): + """Test BulletContent""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_coin.py b/src/zarban/wallet/test/test_coin.py index f6c2fcd..093fc8e 100644 --- a/src/zarban/wallet/test/test_coin.py +++ b/src/zarban/wallet/test/test_coin.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.coin import Coin # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.coin import Coin # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestCoin(unittest.TestCase): """Coin unit test stubs""" @@ -33,58 +34,58 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.coin.Coin() # noqa: E501 + # model = zarban.wallet.openapi_client.models.coin.Coin() # noqa: E501 if include_optional : return Coin( - config = openapi_client.models.coin_config.CoinConfig( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ) ) else : return Coin( - config = openapi_client.models.coin_config.CoinConfig( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ), ) diff --git a/src/zarban/wallet/test/test_coin_config.py b/src/zarban/wallet/test/test_coin_config.py index b6bae45..331ac95 100644 --- a/src/zarban/wallet/test/test_coin_config.py +++ b/src/zarban/wallet/test/test_coin_config.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.coin_config import CoinConfig # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.coin_config import CoinConfig # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestCoinConfig(unittest.TestCase): """CoinConfig unit test stubs""" @@ -33,19 +34,19 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.coin_config.CoinConfig() # noqa: E501 + # model = zarban.wallet.openapi_client.models.coin_config.CoinConfig() # noqa: E501 if include_optional : return CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True ) else : return CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ) diff --git a/src/zarban/wallet/test/test_coin_response.py b/src/zarban/wallet/test/test_coin_response.py new file mode 100644 index 0000000..f5a10fe --- /dev/null +++ b/src/zarban/wallet/test/test_coin_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.coin_response import CoinResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestCoinResponse(unittest.TestCase): + """CoinResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CoinResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.coin_response.CoinResponse() # noqa: E501 + if include_optional : + return CoinResponse( + data = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ] + ) + else : + return CoinResponse( + data = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + ) + + def testCoinResponse(self): + """Test CoinResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_coins_api.py b/src/zarban/wallet/test/test_coins_api.py new file mode 100644 index 0000000..89ab707 --- /dev/null +++ b/src/zarban/wallet/test/test_coins_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.coins_api import CoinsApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestCoinsApi(unittest.TestCase): + """CoinsApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.coins_api.CoinsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_coin_details(self): + """Test case for get_coin_details + + Get coin # noqa: E501 + """ + pass + + def test_get_supported_coins(self): + """Test case for get_supported_coins + + Get coins # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_create_child_user_request.py b/src/zarban/wallet/test/test_create_child_user_request.py new file mode 100644 index 0000000..823fec2 --- /dev/null +++ b/src/zarban/wallet/test/test_create_child_user_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.create_child_user_request import CreateChildUserRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestCreateChildUserRequest(unittest.TestCase): + """CreateChildUserRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateChildUserRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.create_child_user_request.CreateChildUserRequest() # noqa: E501 + if include_optional : + return CreateChildUserRequest( + username = 'john' + ) + else : + return CreateChildUserRequest( + username = 'john', + ) + + def testCreateChildUserRequest(self): + """Test CreateChildUserRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object12.py b/src/zarban/wallet/test/test_currency.py similarity index 58% rename from src/zarban/wallet/test/test_inline_object12.py rename to src/zarban/wallet/test/test_currency.py index 5d85ab4..c6b04d5 100644 --- a/src/zarban/wallet/test/test_inline_object12.py +++ b/src/zarban/wallet/test/test_currency.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object12 import InlineObject12 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.currency import Currency # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject12(unittest.TestCase): - """InlineObject12 unit test stubs""" +class TestCurrency(unittest.TestCase): + """Currency unit test stubs""" def setUp(self): pass @@ -29,22 +30,23 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject12 + """Test Currency include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object12.InlineObject12() # noqa: E501 + # model = zarban.wallet.openapi_client.models.currency.Currency() # noqa: E501 if include_optional : - return InlineObject12( - task_id = '1234567890' + return Currency( + values = { + 'key' : '0' + } ) else : - return InlineObject12( - task_id = '1234567890', + return Currency( ) - def testInlineObject12(self): - """Test InlineObject12""" + def testCurrency(self): + """Test Currency""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_default_api.py b/src/zarban/wallet/test/test_default_api.py deleted file mode 100644 index ca243e3..0000000 --- a/src/zarban/wallet/test/test_default_api.py +++ /dev/null @@ -1,243 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import openapi_client -from openapi_client.api.default_api import DefaultApi # noqa: E501 -from openapi_client.rest import ApiException - - -class TestDefaultApi(unittest.TestCase): - """DefaultApi unit test stubs""" - - def setUp(self): - self.api = openapi_client.api.default_api.DefaultApi() # noqa: E501 - - def tearDown(self): - pass - - def test_auth_login_post(self): - """Test case for auth_login_post - - Login with email and password # noqa: E501 - """ - pass - - def test_auth_signup_post(self): - """Test case for auth_signup_post - - signup with email and password # noqa: E501 - """ - pass - - def test_auth_telegram_post(self): - """Test case for auth_telegram_post - - Authenticate with Telegram # noqa: E501 - """ - pass - - def test_balance_get(self): - """Test case for balance_get - - Get wallet balance # noqa: E501 - """ - pass - - def test_balance_symbol_get(self): - """Test case for balance_symbol_get - - Get balance # noqa: E501 - """ - pass - - def test_coins_get(self): - """Test case for coins_get - - Get coins # noqa: E501 - """ - pass - - def test_coins_symbol_get(self): - """Test case for coins_symbol_get - - Get coin # noqa: E501 - """ - pass - - def test_deposit_get(self): - """Test case for deposit_get - - Deposit money # noqa: E501 - """ - pass - - def test_payments_post(self): - """Test case for payments_post - - Create a payment # noqa: E501 - """ - pass - - def test_points_frineds_get(self): - """Test case for points_frineds_get - - Get friends points. # noqa: E501 - """ - pass - - def test_profile_get(self): - """Test case for profile_get - - Get profile # noqa: E501 - """ - pass - - def test_referrals_get(self): - """Test case for referrals_get - - Get referrals # noqa: E501 - """ - pass - - def test_referrals_post(self): - """Test case for referrals_post - - Create a referral # noqa: E501 - """ - pass - - def test_referrals_referral_id_get(self): - """Test case for referrals_referral_id_get - - Get referral by ID # noqa: E501 - """ - pass - - def test_referrals_referral_id_redeem_post(self): - """Test case for referrals_referral_id_redeem_post - - Redeem a referral # noqa: E501 - """ - pass - - def test_referrals_referral_id_validate_post(self): - """Test case for referrals_referral_id_validate_post - - Validate a referral # noqa: E501 - """ - pass - - def test_saving_deposit_post(self): - """Test case for saving_deposit_post - - Create a saving # noqa: E501 - """ - pass - - def test_saving_offers_get(self): - """Test case for saving_offers_get - - Get saving offers # noqa: E501 - """ - pass - - def test_saving_positions_get(self): - """Test case for saving_positions_get - - Get saving positions # noqa: E501 - """ - pass - - def test_saving_withdraw_post(self): - """Test case for saving_withdraw_post - - Withdraw saving # noqa: E501 - """ - pass - - def test_swap_post(self): - """Test case for swap_post - - Swap coins # noqa: E501 - """ - pass - - def test_swap_quote_post(self): - """Test case for swap_quote_post - - post a swap quote # noqa: E501 - """ - pass - - def test_tasks_get(self): - """Test case for tasks_get - - Get tasks # noqa: E501 - """ - pass - - def test_tasks_post(self): - """Test case for tasks_post - - check task completion # noqa: E501 - """ - pass - - def test_users_nickname_get(self): - """Test case for users_nickname_get - - Get nickname # noqa: E501 - """ - pass - - def test_users_nickname_post(self): - """Test case for users_nickname_post - - Add a nickname # noqa: E501 - """ - pass - - def test_withdraws_get(self): - """Test case for withdraws_get - - Get user withdraw requests # noqa: E501 - """ - pass - - def test_withdraws_id_get(self): - """Test case for withdraws_id_get - - Get withdrawal status # noqa: E501 - """ - pass - - def test_withdraws_preview_post(self): - """Test case for withdraws_preview_post - - Withdraw request # noqa: E501 - """ - pass - - def test_withdraws_request_post(self): - """Test case for withdraws_request_post - - Withdraw request # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_deposit_api.py b/src/zarban/wallet/test/test_deposit_api.py new file mode 100644 index 0000000..83063d8 --- /dev/null +++ b/src/zarban/wallet/test/test_deposit_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.deposit_api import DepositApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestDepositApi(unittest.TestCase): + """DepositApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.deposit_api.DepositApi() # noqa: E501 + + def tearDown(self): + pass + + def test_deposit_money(self): + """Test case for deposit_money + + Deposit money # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2006.py b/src/zarban/wallet/test/test_deposit_response.py similarity index 62% rename from src/zarban/wallet/test/test_inline_response2006.py rename to src/zarban/wallet/test/test_deposit_response.py index 9983219..542bb88 100644 --- a/src/zarban/wallet/test/test_inline_response2006.py +++ b/src/zarban/wallet/test/test_deposit_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_response2006 import InlineResponse2006 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.deposit_response import DepositResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineResponse2006(unittest.TestCase): - """InlineResponse2006 unit test stubs""" +class TestDepositResponse(unittest.TestCase): + """DepositResponse unit test stubs""" def setUp(self): pass @@ -29,30 +30,30 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineResponse2006 + """Test DepositResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_response2006.InlineResponse2006() # noqa: E501 + # model = zarban.wallet.openapi_client.models.deposit_response.DepositResponse() # noqa: E501 if include_optional : - return InlineResponse2006( + return DepositResponse( address = '0x1234567890abcdef', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'ZAR' ) else : - return InlineResponse2006( + return DepositResponse( address = '0x1234567890abcdef', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'ZAR', ) - def testInlineResponse2006(self): - """Test InlineResponse2006""" + def testDepositResponse(self): + """Test DepositResponse""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_detailed_loan_to_value_options.py b/src/zarban/wallet/test/test_detailed_loan_to_value_options.py new file mode 100644 index 0000000..a384d8f --- /dev/null +++ b/src/zarban/wallet/test/test_detailed_loan_to_value_options.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.detailed_loan_to_value_options import DetailedLoanToValueOptions # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestDetailedLoanToValueOptions(unittest.TestCase): + """DetailedLoanToValueOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DetailedLoanToValueOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions() # noqa: E501 + if include_optional : + return DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5' + ) + else : + return DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', + ) + + def testDetailedLoanToValueOptions(self): + """Test DetailedLoanToValueOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_email_otp_submit_request.py b/src/zarban/wallet/test/test_email_otp_submit_request.py new file mode 100644 index 0000000..cff9645 --- /dev/null +++ b/src/zarban/wallet/test/test_email_otp_submit_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.email_otp_submit_request import EmailOtpSubmitRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestEmailOtpSubmitRequest(unittest.TestCase): + """EmailOtpSubmitRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailOtpSubmitRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.email_otp_submit_request.EmailOtpSubmitRequest() # noqa: E501 + if include_optional : + return EmailOtpSubmitRequest( + code = 123456 + ) + else : + return EmailOtpSubmitRequest( + code = 123456, + ) + + def testEmailOtpSubmitRequest(self): + """Test EmailOtpSubmitRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_error.py b/src/zarban/wallet/test/test_error.py index 8a9d885..8c2d4af 100644 --- a/src/zarban/wallet/test/test_error.py +++ b/src/zarban/wallet/test/test_error.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.error import Error # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.error import Error # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestError(unittest.TestCase): """Error unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.error.Error() # noqa: E501 + # model = zarban.wallet.openapi_client.models.error.Error() # noqa: E501 if include_optional : return Error( msg = 'Bad request', @@ -44,6 +45,9 @@ def make_instance(self, include_optional): else : return Error( msg = 'Bad request', + reasons = [ + 'Invalid address' + ], ) def testError(self): diff --git a/src/zarban/wallet/test/test_user_error_messages.py b/src/zarban/wallet/test/test_error_detail.py similarity index 62% rename from src/zarban/wallet/test/test_user_error_messages.py rename to src/zarban/wallet/test/test_error_detail.py index dff0068..b1ac285 100644 --- a/src/zarban/wallet/test/test_user_error_messages.py +++ b/src/zarban/wallet/test/test_error_detail.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.user_error_messages import UserErrorMessages # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.error_detail import ErrorDetail # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestUserErrorMessages(unittest.TestCase): - """UserErrorMessages unit test stubs""" +class TestErrorDetail(unittest.TestCase): + """ErrorDetail unit test stubs""" def setUp(self): pass @@ -29,25 +30,28 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test UserErrorMessages + """Test ErrorDetail include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.user_error_messages.UserErrorMessages() # noqa: E501 + # model = zarban.wallet.openapi_client.models.error_detail.ErrorDetail() # noqa: E501 if include_optional : - return UserErrorMessages( + return ErrorDetail( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' ] ) else : - return UserErrorMessages( + return ErrorDetail( user_message = 'Invalid request. Please check the provided address.', + solutions = [ + 'Ensure the address follows the correct format.' + ], ) - def testUserErrorMessages(self): - """Test UserErrorMessages""" + def testErrorDetail(self): + """Test ErrorDetail""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_external_transaction.py b/src/zarban/wallet/test/test_external_transaction.py index 7693027..bb7236a 100644 --- a/src/zarban/wallet/test/test_external_transaction.py +++ b/src/zarban/wallet/test/test_external_transaction.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.external_transaction import ExternalTransaction # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.external_transaction import ExternalTransaction # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestExternalTransaction(unittest.TestCase): """ExternalTransaction unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.external_transaction.ExternalTransaction() # noqa: E501 + # model = zarban.wallet.openapi_client.models.external_transaction.ExternalTransaction() # noqa: E501 if include_optional : return ExternalTransaction( id = 56, - time = openapi_client.models.timestamp.Timestamp( + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), type = 'Credit', @@ -45,9 +46,9 @@ def make_instance(self, include_optional): _from = '0', to = '0', comment = '0', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, symbol = 'USD', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), status = 'Sent' @@ -55,7 +56,7 @@ def make_instance(self, include_optional): else : return ExternalTransaction( id = 56, - time = openapi_client.models.timestamp.Timestamp( + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), type = 'Credit', @@ -63,9 +64,9 @@ def make_instance(self, include_optional): _from = '0', to = '0', comment = '0', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, symbol = 'USD', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), status = 'Sent', diff --git a/src/zarban/wallet/test/test_inline_response2009.py b/src/zarban/wallet/test/test_friend_points.py similarity index 59% rename from src/zarban/wallet/test/test_inline_response2009.py rename to src/zarban/wallet/test/test_friend_points.py index bad69b1..92bf3da 100644 --- a/src/zarban/wallet/test/test_inline_response2009.py +++ b/src/zarban/wallet/test/test_friend_points.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_response2009 import InlineResponse2009 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.friend_points import FriendPoints # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineResponse2009(unittest.TestCase): - """InlineResponse2009 unit test stubs""" +class TestFriendPoints(unittest.TestCase): + """FriendPoints unit test stubs""" def setUp(self): pass @@ -29,22 +30,24 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineResponse2009 + """Test FriendPoints include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_response2009.InlineResponse2009() # noqa: E501 + # model = zarban.wallet.openapi_client.models.friend_points.FriendPoints() # noqa: E501 if include_optional : - return InlineResponse2009( + return FriendPoints( first_name = 'John', points = 56 ) else : - return InlineResponse2009( + return FriendPoints( + first_name = 'John', + points = 56, ) - def testInlineResponse2009(self): - """Test InlineResponse2009""" + def testFriendPoints(self): + """Test FriendPoints""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_friend_points_response.py b/src/zarban/wallet/test/test_friend_points_response.py new file mode 100644 index 0000000..d409d82 --- /dev/null +++ b/src/zarban/wallet/test/test_friend_points_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.friend_points_response import FriendPointsResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestFriendPointsResponse(unittest.TestCase): + """FriendPointsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test FriendPointsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.friend_points_response.FriendPointsResponse() # noqa: E501 + if include_optional : + return FriendPointsResponse( + data = [ + zarban.wallet.openapi_client.models.friend_points.FriendPoints( + first_name = 'John', + points = 56, ) + ] + ) + else : + return FriendPointsResponse( + data = [ + zarban.wallet.openapi_client.models.friend_points.FriendPoints( + first_name = 'John', + points = 56, ) + ], + ) + + def testFriendPointsResponse(self): + """Test FriendPointsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_health_api.py b/src/zarban/wallet/test/test_health_api.py new file mode 100644 index 0000000..e554b56 --- /dev/null +++ b/src/zarban/wallet/test/test_health_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.health_api import HealthApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestHealthApi(unittest.TestCase): + """HealthApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.health_api.HealthApi() # noqa: E501 + + def tearDown(self): + pass + + def test_check_api_health(self): + """Test case for check_api_health + + Health check # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2004.py b/src/zarban/wallet/test/test_health_status.py similarity index 62% rename from src/zarban/wallet/test/test_inline_response2004.py rename to src/zarban/wallet/test/test_health_status.py index 5242535..260bbf3 100644 --- a/src/zarban/wallet/test/test_inline_response2004.py +++ b/src/zarban/wallet/test/test_health_status.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_response2004 import InlineResponse2004 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.health_status import HealthStatus # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineResponse2004(unittest.TestCase): - """InlineResponse2004 unit test stubs""" +class TestHealthStatus(unittest.TestCase): + """HealthStatus unit test stubs""" def setUp(self): pass @@ -29,22 +30,21 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineResponse2004 + """Test HealthStatus include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_response2004.InlineResponse2004() # noqa: E501 + # model = zarban.wallet.openapi_client.models.health_status.HealthStatus() # noqa: E501 if include_optional : - return InlineResponse2004( - id = 1234567890 + return HealthStatus( + status = 'ok' ) else : - return InlineResponse2004( - id = 1234567890, + return HealthStatus( ) - def testInlineResponse2004(self): - """Test InlineResponse2004""" + def testHealthStatus(self): + """Test HealthStatus""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_inline_object4.py b/src/zarban/wallet/test/test_inline_object4.py deleted file mode 100644 index 31adab9..0000000 --- a/src/zarban/wallet/test/test_inline_object4.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_object4 import InlineObject4 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineObject4(unittest.TestCase): - """InlineObject4 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineObject4 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_object4.InlineObject4() # noqa: E501 - if include_optional : - return InlineObject4( - name = '0', - usage_limit = 56 - ) - else : - return InlineObject4( - usage_limit = 56, - ) - - def testInlineObject4(self): - """Test InlineObject4""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object5.py b/src/zarban/wallet/test/test_inline_object5.py deleted file mode 100644 index 85c1408..0000000 --- a/src/zarban/wallet/test/test_inline_object5.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_object5 import InlineObject5 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineObject5(unittest.TestCase): - """InlineObject5 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineObject5 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_object5.InlineObject5() # noqa: E501 - if include_optional : - return InlineObject5( - quote_id = '1234567890', - quote = '0.1234567890' - ) - else : - return InlineObject5( - quote_id = '1234567890', - quote = '0.1234567890', - ) - - def testInlineObject5(self): - """Test InlineObject5""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object7.py b/src/zarban/wallet/test/test_inline_object7.py deleted file mode 100644 index 46f0cdd..0000000 --- a/src/zarban/wallet/test/test_inline_object7.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_object7 import InlineObject7 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineObject7(unittest.TestCase): - """InlineObject7 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineObject7 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_object7.InlineObject7() # noqa: E501 - if include_optional : - return InlineObject7( - network = 'arbitrum', - symbol = 'ZAR', - amount = '100.00', - address = '0x1234567890abcdef', - comment = 'Withdrawal request comment' - ) - else : - return InlineObject7( - network = 'arbitrum', - symbol = 'ZAR', - amount = '100.00', - address = '0x1234567890abcdef', - ) - - def testInlineObject7(self): - """Test InlineObject7""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response200.py b/src/zarban/wallet/test/test_inline_response200.py deleted file mode 100644 index 5f5f42d..0000000 --- a/src/zarban/wallet/test/test_inline_response200.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response200 import InlineResponse200 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse200 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response200.InlineResponse200() # noqa: E501 - if include_optional : - return InlineResponse200( - nickname = '0', - transactions = [ - openapi_client.models.transaction.Transaction( - id = 56, - time = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - type = 'Credit', - from = '0', - to = '0', - symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - external_transaction = openapi_client.models.external_transaction.ExternalTransaction( - id = 56, - time = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - type = 'Credit', - hash = '0', - from = '0', - to = '0', - comment = '0', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - symbol = 'USD', - network = openapi_client.models.network.Network( - name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, - logo_uri = '0', ), - status = 'Sent', ), ) - ], - referral = openapi_client.models.referral.Referral( - id = 56, - referrer_id = 56, - name = '0', - usage_limit = 56, - usage_count = 56, - created_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - link = 'https://t.me/zarbanwalletbot?start=referral-29', ), - points = 56, - avatar = 'https://example.com/avatar.json', - telegram = openapi_client.models.telegram_profile.TelegramProfile( - id = 56, - username = '0', - first_name = '0', - last_name = '0', - photo_url = '0', ) - ) - else : - return InlineResponse200( - nickname = '0', - transactions = [ - openapi_client.models.transaction.Transaction( - id = 56, - time = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - type = 'Credit', - from = '0', - to = '0', - symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - external_transaction = openapi_client.models.external_transaction.ExternalTransaction( - id = 56, - time = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - type = 'Credit', - hash = '0', - from = '0', - to = '0', - comment = '0', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - symbol = 'USD', - network = openapi_client.models.network.Network( - name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, - logo_uri = '0', ), - status = 'Sent', ), ) - ], - referral = openapi_client.models.referral.Referral( - id = 56, - referrer_id = 56, - name = '0', - usage_limit = 56, - usage_count = 56, - created_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - link = 'https://t.me/zarbanwalletbot?start=referral-29', ), - points = 56, - ) - - def testInlineResponse200(self): - """Test InlineResponse200""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2001.py b/src/zarban/wallet/test/test_inline_response2001.py deleted file mode 100644 index 686cf67..0000000 --- a/src/zarban/wallet/test/test_inline_response2001.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2001 import InlineResponse2001 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2001(unittest.TestCase): - """InlineResponse2001 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2001 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2001.InlineResponse2001() # noqa: E501 - if include_optional : - return InlineResponse2001( - nicknames = [ - '0' - ] - ) - else : - return InlineResponse2001( - ) - - def testInlineResponse2001(self): - """Test InlineResponse2001""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2002.py b/src/zarban/wallet/test/test_inline_response2002.py deleted file mode 100644 index 6f649e8..0000000 --- a/src/zarban/wallet/test/test_inline_response2002.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2002 import InlineResponse2002 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2002(unittest.TestCase): - """InlineResponse2002 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2002 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2002.InlineResponse2002() # noqa: E501 - if include_optional : - return InlineResponse2002( - referral_id = 56 - ) - else : - return InlineResponse2002( - ) - - def testInlineResponse2002(self): - """Test InlineResponse2002""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2003.py b/src/zarban/wallet/test/test_inline_response2003.py deleted file mode 100644 index f529397..0000000 --- a/src/zarban/wallet/test/test_inline_response2003.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2003 import InlineResponse2003 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2003(unittest.TestCase): - """InlineResponse2003 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2003 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2003.InlineResponse2003() # noqa: E501 - if include_optional : - return InlineResponse2003( - quote = openapi_client.models.swap_response.SwapResponse( - id = '0', - trade_type = 'ExactInput', - in = 'USD', - out = 'USD', - amount = '0', - quote = '0', - rate = '0', - value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - input_balance_after_swap = '0', - output_balance_after_swap = '0', - created_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - expires_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - executed_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), ) - ) - else : - return InlineResponse2003( - ) - - def testInlineResponse2003(self): - """Test InlineResponse2003""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2005.py b/src/zarban/wallet/test/test_inline_response2005.py deleted file mode 100644 index 28b9eb1..0000000 --- a/src/zarban/wallet/test/test_inline_response2005.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2005 import InlineResponse2005 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2005(unittest.TestCase): - """InlineResponse2005 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2005 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2005.InlineResponse2005() # noqa: E501 - if include_optional : - return InlineResponse2005( - schema = openapi_client.models.withdraw_request_preview.WithdrawRequestPreview( - address = '0x1234567890abcdef', - network = openapi_client.models.network.Network( - name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, - logo_uri = '0', ), - symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - fee = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - balance_after_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) - ) - else : - return InlineResponse2005( - ) - - def testInlineResponse2005(self): - """Test InlineResponse2005""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2007.py b/src/zarban/wallet/test/test_inline_response2007.py deleted file mode 100644 index 33130f7..0000000 --- a/src/zarban/wallet/test/test_inline_response2007.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2007 import InlineResponse2007 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2007(unittest.TestCase): - """InlineResponse2007 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2007 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2007.InlineResponse2007() # noqa: E501 - if include_optional : - return InlineResponse2007( - token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' - ) - else : - return InlineResponse2007( - token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c', - ) - - def testInlineResponse2007(self): - """Test InlineResponse2007""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_response2008.py b/src/zarban/wallet/test/test_inline_response2008.py deleted file mode 100644 index 4652e34..0000000 --- a/src/zarban/wallet/test/test_inline_response2008.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.inline_response2008 import InlineResponse2008 # noqa: E501 -from openapi_client.rest import ApiException - -class TestInlineResponse2008(unittest.TestCase): - """InlineResponse2008 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2008 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.inline_response2008.InlineResponse2008() # noqa: E501 - if include_optional : - return InlineResponse2008( - completed = True, - completed_at = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ) - ) - else : - return InlineResponse2008( - completed = True, - ) - - def testInlineResponse2008(self): - """Test InlineResponse2008""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object11.py b/src/zarban/wallet/test/test_jwt_response.py similarity index 56% rename from src/zarban/wallet/test/test_inline_object11.py rename to src/zarban/wallet/test/test_jwt_response.py index bd3d156..37c2766 100644 --- a/src/zarban/wallet/test/test_inline_object11.py +++ b/src/zarban/wallet/test/test_jwt_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object11 import InlineObject11 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.jwt_response import JwtResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject11(unittest.TestCase): - """InlineObject11 unit test stubs""" +class TestJwtResponse(unittest.TestCase): + """JwtResponse unit test stubs""" def setUp(self): pass @@ -29,24 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject11 + """Test JwtResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object11.InlineObject11() # noqa: E501 + # model = zarban.wallet.openapi_client.models.jwt_response.JwtResponse() # noqa: E501 if include_optional : - return InlineObject11( - email = 'john@domain.com', - password = '0' + return JwtResponse( + token = 'eyJhbGciOiJIUzI1NiIsInR...' ) else : - return InlineObject11( - email = 'john@domain.com', - password = '0', + return JwtResponse( + token = 'eyJhbGciOiJIUzI1NiIsInR...', ) - def testInlineObject11(self): - """Test InlineObject11""" + def testJwtResponse(self): + """Test JwtResponse""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_inline_object10.py b/src/zarban/wallet/test/test_kyc_confirm_request.py similarity index 54% rename from src/zarban/wallet/test/test_inline_object10.py rename to src/zarban/wallet/test/test_kyc_confirm_request.py index 183320c..d875362 100644 --- a/src/zarban/wallet/test/test_inline_object10.py +++ b/src/zarban/wallet/test/test_kyc_confirm_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object10 import InlineObject10 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.kyc_confirm_request import KycConfirmRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject10(unittest.TestCase): - """InlineObject10 unit test stubs""" +class TestKycConfirmRequest(unittest.TestCase): + """KycConfirmRequest unit test stubs""" def setUp(self): pass @@ -29,24 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject10 + """Test KycConfirmRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object10.InlineObject10() # noqa: E501 + # model = zarban.wallet.openapi_client.models.kyc_confirm_request.KycConfirmRequest() # noqa: E501 if include_optional : - return InlineObject10( - email = 'john@domain.com', - password = '0' + return KycConfirmRequest( + id = '1234567890' ) else : - return InlineObject10( - email = 'john@domain.com', - password = '0', + return KycConfirmRequest( + id = '1234567890', ) - def testInlineObject10(self): - """Test InlineObject10""" + def testKycConfirmRequest(self): + """Test KycConfirmRequest""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_kyc_request.py b/src/zarban/wallet/test/test_kyc_request.py new file mode 100644 index 0000000..eecbc6c --- /dev/null +++ b/src/zarban/wallet/test/test_kyc_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.kyc_request import KycRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestKycRequest(unittest.TestCase): + """KycRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test KycRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.kyc_request.KycRequest() # noqa: E501 + if include_optional : + return KycRequest( + national_id = '1234567890', + date_of_birth = '1360/01/01', + card_number = '1234567890' + ) + else : + return KycRequest( + national_id = '1234567890', + date_of_birth = '1360/01/01', + card_number = '1234567890', + ) + + def testKycRequest(self): + """Test KycRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_kyc_response.py b/src/zarban/wallet/test/test_kyc_response.py new file mode 100644 index 0000000..3f4258f --- /dev/null +++ b/src/zarban/wallet/test/test_kyc_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.kyc_response import KycResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestKycResponse(unittest.TestCase): + """KycResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test KycResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.kyc_response.KycResponse() # noqa: E501 + if include_optional : + return KycResponse( + id = '1234567890', + first_name = 'John', + last_name = 'Doe', + national_id = '1234567890', + date_of_birth = '1360/01/01', + bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ) + ) + else : + return KycResponse( + id = '1234567890', + first_name = 'John', + last_name = 'Doe', + national_id = '1234567890', + date_of_birth = '1360/01/01', + bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ), + ) + + def testKycResponse(self): + """Test KycResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_loan_create_request.py b/src/zarban/wallet/test/test_loan_create_request.py new file mode 100644 index 0000000..a74e893 --- /dev/null +++ b/src/zarban/wallet/test/test_loan_create_request.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loan_create_request import LoanCreateRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoanCreateRequest(unittest.TestCase): + """LoanCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoanCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.loan_create_request.LoanCreateRequest() # noqa: E501 + if include_optional : + return LoanCreateRequest( + intent = 'Create', + plan_name = 'ETH', + collateral = '1.234', + debt = '1.234', + symbol = 'ZAR', + loan_to_value_option = 'Safe' + ) + else : + return LoanCreateRequest( + intent = 'Create', + plan_name = 'ETH', + symbol = 'ZAR', + loan_to_value_option = 'Safe', + ) + + def testLoanCreateRequest(self): + """Test LoanCreateRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_loan_plan.py b/src/zarban/wallet/test/test_loan_plan.py new file mode 100644 index 0000000..7f68c95 --- /dev/null +++ b/src/zarban/wallet/test/test_loan_plan.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loan_plan import LoanPlan # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoanPlan(unittest.TestCase): + """LoanPlan unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoanPlan + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.loan_plan.LoanPlan() # noqa: E501 + if include_optional : + return LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ] + ) + else : + return LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], + ) + + def testLoanPlan(self): + """Test LoanPlan""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_loan_plan_response.py b/src/zarban/wallet/test/test_loan_plan_response.py new file mode 100644 index 0000000..5496e89 --- /dev/null +++ b/src/zarban/wallet/test/test_loan_plan_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loan_plan_response import LoanPlanResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoanPlanResponse(unittest.TestCase): + """LoanPlanResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoanPlanResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.loan_plan_response.LoanPlanResponse() # noqa: E501 + if include_optional : + return LoanPlanResponse( + data = [ + zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ) + ] + ) + else : + return LoanPlanResponse( + data = [ + zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ) + ], + ) + + def testLoanPlanResponse(self): + """Test LoanPlanResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object3.py b/src/zarban/wallet/test/test_loan_to_value_options.py similarity index 57% rename from src/zarban/wallet/test/test_inline_object3.py rename to src/zarban/wallet/test/test_loan_to_value_options.py index 4e04e4c..c16f721 100644 --- a/src/zarban/wallet/test/test_inline_object3.py +++ b/src/zarban/wallet/test/test_loan_to_value_options.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object3 import InlineObject3 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loan_to_value_options import LoanToValueOptions # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject3(unittest.TestCase): - """InlineObject3 unit test stubs""" +class TestLoanToValueOptions(unittest.TestCase): + """LoanToValueOptions unit test stubs""" def setUp(self): pass @@ -29,22 +30,20 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject3 + """Test LoanToValueOptions include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object3.InlineObject3() # noqa: E501 + # model = zarban.wallet.openapi_client.models.loan_to_value_options.LoanToValueOptions() # noqa: E501 if include_optional : - return InlineObject3( - nickname = '0' + return LoanToValueOptions( ) else : - return InlineObject3( - nickname = '0', + return LoanToValueOptions( ) - def testInlineObject3(self): - """Test InlineObject3""" + def testLoanToValueOptions(self): + """Test LoanToValueOptions""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_loans_api.py b/src/zarban/wallet/test/test_loans_api.py new file mode 100644 index 0000000..d30ea23 --- /dev/null +++ b/src/zarban/wallet/test/test_loans_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.loans_api import LoansApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestLoansApi(unittest.TestCase): + """LoansApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.loans_api.LoansApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_loan_vault(self): + """Test case for create_loan_vault + + Create vault # noqa: E501 + """ + pass + + def test_estimate_loan_collateral(self): + """Test case for estimate_loan_collateral + + Get collateral and loan amount estimation # noqa: E501 + """ + pass + + def test_get_all_loan_plans(self): + """Test case for get_all_loan_plans + + Get all plan loans # noqa: E501 + """ + pass + + def test_get_loan_details(self): + """Test case for get_loan_details + + Get loan # noqa: E501 + """ + pass + + def test_get_user_loans(self): + """Test case for get_user_loans + + Get user loans # noqa: E501 + """ + pass + + def test_repay_loan(self): + """Test case for repay_loan + + Repay Loan # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_loans_response.py b/src/zarban/wallet/test/test_loans_response.py new file mode 100644 index 0000000..b443530 --- /dev/null +++ b/src/zarban/wallet/test/test_loans_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loans_response import LoansResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoansResponse(unittest.TestCase): + """LoansResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoansResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.loans_response.LoansResponse() # noqa: E501 + if include_optional : + return LoansResponse( + id = '0', + user_id = 56, + liquidation_price = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateral = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + principal = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + scaled_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + plan = zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ), + state = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + updated_collateral_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + updated_debt_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + terms_and_conditions = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ) + ) + else : + return LoansResponse( + user_id = 56, + liquidation_price = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateral = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + principal = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + scaled_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + plan = zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ), + state = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + ) + + def testLoansResponse(self): + """Test LoansResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_loans_response_list.py b/src/zarban/wallet/test/test_loans_response_list.py new file mode 100644 index 0000000..f7c3b1b --- /dev/null +++ b/src/zarban/wallet/test/test_loans_response_list.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.loans_response_list import LoansResponseList # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoansResponseList(unittest.TestCase): + """LoansResponseList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoansResponseList + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.loans_response_list.LoansResponseList() # noqa: E501 + if include_optional : + return LoansResponseList( + data = [ + zarban.wallet.openapi_client.models.loans_response.LoansResponse( + id = '0', + user_id = 56, + liquidation_price = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateral = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + principal = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + scaled_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + plan = zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ), + state = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + updated_collateral_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + updated_debt_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + terms_and_conditions = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ] + ) + else : + return LoansResponseList( + data = [ + zarban.wallet.openapi_client.models.loans_response.LoansResponse( + id = '0', + user_id = 56, + liquidation_price = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateral = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + collateralization_ratio = '1.5', + loan_to_value = '0.5', + debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + principal = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + scaled_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + plan = zarban.wallet.openapi_client.models.loan_plan.LoanPlan( + name = 'ETH-A', + min_collateralization_ratio = '1.5', + acceptable_coins = [ + zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( + is_tradeable = True, + withdraw_fees = {"tron":"10"}, + min_withdrawal = {"tron":"10"}, + needs_memo = True, ), + symbol = 'USD', + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', + depositable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + withdrawable_networks = [ + zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ) + ], + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + fee = '0.05', + max_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + min_debt = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + loan_to_value_options = [ + zarban.wallet.openapi_client.models.detailed_loan_to_value_options.DetailedLoanToValueOptions( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + value = '0.5', ) + ], ), + state = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + updated_collateral_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + updated_debt_token_balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + terms_and_conditions = zarban.wallet.openapi_client.models.bullet_content.BulletContent( + title = '0', + text = '0', + bullets = [ + '0' + ], ), ) + ], + ) + + def testLoansResponseList(self): + """Test LoansResponseList""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_login_request.py b/src/zarban/wallet/test/test_login_request.py new file mode 100644 index 0000000..efcffca --- /dev/null +++ b/src/zarban/wallet/test/test_login_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.login_request import LoginRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestLoginRequest(unittest.TestCase): + """LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LoginRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.login_request.LoginRequest() # noqa: E501 + if include_optional : + return LoginRequest( + email = 'example@domain.com', + password = 'password' + ) + else : + return LoginRequest( + email = 'example@domain.com', + password = 'password', + ) + + def testLoginRequest(self): + """Test LoginRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_network.py b/src/zarban/wallet/test/test_network.py index 5f19f4c..482b1b9 100644 --- a/src/zarban/wallet/test/test_network.py +++ b/src/zarban/wallet/test/test_network.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.network import Network # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.network import Network # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestNetwork(unittest.TestCase): """Network unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.network.Network() # noqa: E501 + # model = zarban.wallet.openapi_client.models.network.Network() # noqa: E501 if include_optional : return Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, diff --git a/src/zarban/wallet/test/test_payment.py b/src/zarban/wallet/test/test_payment.py index 902f9e7..f8a24dc 100644 --- a/src/zarban/wallet/test/test_payment.py +++ b/src/zarban/wallet/test/test_payment.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.payment import Payment # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.payment import Payment # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestPayment(unittest.TestCase): """Payment unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.payment.Payment() # noqa: E501 + # model = zarban.wallet.openapi_client.models.payment.Payment() # noqa: E501 if include_optional : return Payment( amount = '100.00', diff --git a/src/zarban/wallet/test/test_payment_api.py b/src/zarban/wallet/test/test_payment_api.py new file mode 100644 index 0000000..fbac266 --- /dev/null +++ b/src/zarban/wallet/test/test_payment_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.payment_api import PaymentApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestPaymentApi(unittest.TestCase): + """PaymentApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.payment_api.PaymentApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_payment(self): + """Test case for create_payment + + Create a payment # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object2.py b/src/zarban/wallet/test/test_payment_request.py similarity index 60% rename from src/zarban/wallet/test/test_inline_object2.py rename to src/zarban/wallet/test/test_payment_request.py index 16e3553..8ffc33c 100644 --- a/src/zarban/wallet/test/test_inline_object2.py +++ b/src/zarban/wallet/test/test_payment_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object2 import InlineObject2 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.payment_request import PaymentRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject2(unittest.TestCase): - """InlineObject2 unit test stubs""" +class TestPaymentRequest(unittest.TestCase): + """PaymentRequest unit test stubs""" def setUp(self): pass @@ -29,22 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject2 + """Test PaymentRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object2.InlineObject2() # noqa: E501 + # model = zarban.wallet.openapi_client.models.payment_request.PaymentRequest() # noqa: E501 if include_optional : - return InlineObject2( + return PaymentRequest( amount = '100.00' ) else : - return InlineObject2( + return PaymentRequest( amount = '100.00', ) - def testInlineObject2(self): - """Test InlineObject2""" + def testPaymentRequest(self): + """Test PaymentRequest""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_phone_otp_submit_request.py b/src/zarban/wallet/test/test_phone_otp_submit_request.py new file mode 100644 index 0000000..eedc98d --- /dev/null +++ b/src/zarban/wallet/test/test_phone_otp_submit_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.phone_otp_submit_request import PhoneOtpSubmitRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestPhoneOtpSubmitRequest(unittest.TestCase): + """PhoneOtpSubmitRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PhoneOtpSubmitRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.phone_otp_submit_request.PhoneOtpSubmitRequest() # noqa: E501 + if include_optional : + return PhoneOtpSubmitRequest( + code = 123456 + ) + else : + return PhoneOtpSubmitRequest( + code = 123456, + ) + + def testPhoneOtpSubmitRequest(self): + """Test PhoneOtpSubmitRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_points_api.py b/src/zarban/wallet/test/test_points_api.py new file mode 100644 index 0000000..4537d11 --- /dev/null +++ b/src/zarban/wallet/test/test_points_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.points_api import PointsApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestPointsApi(unittest.TestCase): + """PointsApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.points_api.PointsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_friends_points(self): + """Test case for get_friends_points + + Get friends points. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_profile_response.py b/src/zarban/wallet/test/test_profile_response.py new file mode 100644 index 0000000..7f2b58c --- /dev/null +++ b/src/zarban/wallet/test/test_profile_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.profile_response import ProfileResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestProfileResponse(unittest.TestCase): + """ProfileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ProfileResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.profile_response.ProfileResponse() # noqa: E501 + if include_optional : + return ProfileResponse( + referral = zarban.wallet.openapi_client.models.referral.Referral( + id = 56, + referrer_id = 56, + name = '0', + usage_limit = 56, + usage_count = 56, + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + link = 'https://t.me/zarbanwalletbot?start=referral-29', + share_url = 'https://t.me/zarbanwalletbot?start=referral-29', ), + points = 56, + user = zarban.wallet.openapi_client.models.user.User( + first_name = 'John', + last_name = 'Doe', + email = '0', + username = '0', + phone = '0', + is_email_verified = True, + is_phone_verified = True, + is_kyc_verified = True, + is_child = True, + is_super_user = True, + is_admin = True, + telegram = zarban.wallet.openapi_client.models.telegram_profile.TelegramProfile( + username = '0', + first_name = '0', + last_name = '0', + photo_url = '0', ), ), + bank_info = [ + zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ) + ] + ) + else : + return ProfileResponse( + referral = zarban.wallet.openapi_client.models.referral.Referral( + id = 56, + referrer_id = 56, + name = '0', + usage_limit = 56, + usage_count = 56, + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + link = 'https://t.me/zarbanwalletbot?start=referral-29', + share_url = 'https://t.me/zarbanwalletbot?start=referral-29', ), + points = 56, + user = zarban.wallet.openapi_client.models.user.User( + first_name = 'John', + last_name = 'Doe', + email = '0', + username = '0', + phone = '0', + is_email_verified = True, + is_phone_verified = True, + is_kyc_verified = True, + is_child = True, + is_super_user = True, + is_admin = True, + telegram = zarban.wallet.openapi_client.models.telegram_profile.TelegramProfile( + username = '0', + first_name = '0', + last_name = '0', + photo_url = '0', ), ), + bank_info = [ + zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ) + ], + ) + + def testProfileResponse(self): + """Test ProfileResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_redemption.py b/src/zarban/wallet/test/test_redemption.py new file mode 100644 index 0000000..c757d94 --- /dev/null +++ b/src/zarban/wallet/test/test_redemption.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.redemption import Redemption # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestRedemption(unittest.TestCase): + """Redemption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Redemption + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.redemption.Redemption() # noqa: E501 + if include_optional : + return Redemption( + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + destination_bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ), + status = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + id = '1234567890', + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + updated_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + paya_tracking_code = '1234567890' + ) + else : + return Redemption( + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + destination_bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ), + status = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + id = '1234567890', + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + ) + + def testRedemption(self): + """Test Redemption""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_redemption_request.py b/src/zarban/wallet/test/test_redemption_request.py new file mode 100644 index 0000000..825cb7a --- /dev/null +++ b/src/zarban/wallet/test/test_redemption_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.redemption_request import RedemptionRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestRedemptionRequest(unittest.TestCase): + """RedemptionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RedemptionRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.redemption_request.RedemptionRequest() # noqa: E501 + if include_optional : + return RedemptionRequest( + amount = '0', + destination_card_number = '1234567890', + sms_otp = 123456 + ) + else : + return RedemptionRequest( + amount = '0', + destination_card_number = '1234567890', + sms_otp = 123456, + ) + + def testRedemptionRequest(self): + """Test RedemptionRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_redemption_response.py b/src/zarban/wallet/test/test_redemption_response.py new file mode 100644 index 0000000..ca10b71 --- /dev/null +++ b/src/zarban/wallet/test/test_redemption_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.redemption_response import RedemptionResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestRedemptionResponse(unittest.TestCase): + """RedemptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RedemptionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.redemption_response.RedemptionResponse() # noqa: E501 + if include_optional : + return RedemptionResponse( + data = [ + zarban.wallet.openapi_client.models.redemption.Redemption( + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + destination_bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ), + status = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + id = '1234567890', + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + updated_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + paya_tracking_code = '1234567890', ) + ] + ) + else : + return RedemptionResponse( + data = [ + zarban.wallet.openapi_client.models.redemption.Redemption( + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + destination_bank_info = zarban.wallet.openapi_client.models.bank_info.BankInfo( + bank_name = 'Bank Melli', + card_number = '1234567890', + iban = 'IR1234567890', ), + status = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + id = '1234567890', + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + updated_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + paya_tracking_code = '1234567890', ) + ], + ) + + def testRedemptionResponse(self): + """Test RedemptionResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_redemptions_api.py b/src/zarban/wallet/test/test_redemptions_api.py new file mode 100644 index 0000000..0710623 --- /dev/null +++ b/src/zarban/wallet/test/test_redemptions_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.redemptions_api import RedemptionsApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestRedemptionsApi(unittest.TestCase): + """RedemptionsApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.redemptions_api.RedemptionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_all_redemptions(self): + """Test case for get_all_redemptions + + Get all redemptions # noqa: E501 + """ + pass + + def test_get_redemption_details(self): + """Test case for get_redemption_details + + Get redemption # noqa: E501 + """ + pass + + def test_redeem_zar(self): + """Test case for redeem_zar + + Redeem zar # noqa: E501 + """ + pass + + def test_update_redemption_status(self): + """Test case for update_redemption_status + + Update redemption # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_referral.py b/src/zarban/wallet/test/test_referral.py index 48cb6fe..e0c20e4 100644 --- a/src/zarban/wallet/test/test_referral.py +++ b/src/zarban/wallet/test/test_referral.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.referral import Referral # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.referral import Referral # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestReferral(unittest.TestCase): """Referral unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.referral.Referral() # noqa: E501 + # model = zarban.wallet.openapi_client.models.referral.Referral() # noqa: E501 if include_optional : return Referral( id = 56, @@ -41,10 +42,11 @@ def make_instance(self, include_optional): name = '0', usage_limit = 56, usage_count = 56, - created_at = openapi_client.models.timestamp.Timestamp( + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - link = 'https://t.me/zarbanwalletbot?start=referral-29' + link = 'https://t.me/zarbanwalletbot?start=referral-29', + share_url = 'https://t.me/zarbanwalletbot?start=referral-29' ) else : return Referral( @@ -52,7 +54,7 @@ def make_instance(self, include_optional): referrer_id = 56, usage_limit = 56, usage_count = 56, - created_at = openapi_client.models.timestamp.Timestamp( + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), ) diff --git a/src/zarban/wallet/test/test_referral_response.py b/src/zarban/wallet/test/test_referral_response.py new file mode 100644 index 0000000..57092d4 --- /dev/null +++ b/src/zarban/wallet/test/test_referral_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.referral_response import ReferralResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestReferralResponse(unittest.TestCase): + """ReferralResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReferralResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.referral_response.ReferralResponse() # noqa: E501 + if include_optional : + return ReferralResponse( + data = [ + zarban.wallet.openapi_client.models.referral.Referral( + id = 56, + referrer_id = 56, + name = '0', + usage_limit = 56, + usage_count = 56, + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + link = 'https://t.me/zarbanwalletbot?start=referral-29', + share_url = 'https://t.me/zarbanwalletbot?start=referral-29', ) + ] + ) + else : + return ReferralResponse( + data = [ + zarban.wallet.openapi_client.models.referral.Referral( + id = 56, + referrer_id = 56, + name = '0', + usage_limit = 56, + usage_count = 56, + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + link = 'https://t.me/zarbanwalletbot?start=referral-29', + share_url = 'https://t.me/zarbanwalletbot?start=referral-29', ) + ], + ) + + def testReferralResponse(self): + """Test ReferralResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_referrals_api.py b/src/zarban/wallet/test/test_referrals_api.py new file mode 100644 index 0000000..9e46626 --- /dev/null +++ b/src/zarban/wallet/test/test_referrals_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.referrals_api import ReferralsApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestReferralsApi(unittest.TestCase): + """ReferralsApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.referrals_api.ReferralsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_referral_by_id(self): + """Test case for get_referral_by_id + + Get referral by ID # noqa: E501 + """ + pass + + def test_get_referrals(self): + """Test case for get_referrals + + Get referrals # noqa: E501 + """ + pass + + def test_redeem_referral(self): + """Test case for redeem_referral + + Redeem a referral # noqa: E501 + """ + pass + + def test_validate_referral(self): + """Test case for validate_referral + + Validate a referral # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_repay_loan_request.py b/src/zarban/wallet/test/test_repay_loan_request.py new file mode 100644 index 0000000..942916e --- /dev/null +++ b/src/zarban/wallet/test/test_repay_loan_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.repay_loan_request import RepayLoanRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestRepayLoanRequest(unittest.TestCase): + """RepayLoanRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RepayLoanRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.repay_loan_request.RepayLoanRequest() # noqa: E501 + if include_optional : + return RepayLoanRequest( + intent = 'Repay', + loan_id = '123e4567-e89b-12d3-a456-426614174000' + ) + else : + return RepayLoanRequest( + intent = 'Repay', + loan_id = '123e4567-e89b-12d3-a456-426614174000', + ) + + def testRepayLoanRequest(self): + """Test RepayLoanRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_saving_deposit_response.py b/src/zarban/wallet/test/test_saving_deposit_response.py deleted file mode 100644 index 4f20105..0000000 --- a/src/zarban/wallet/test/test_saving_deposit_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.saving_deposit_response import SavingDepositResponse # noqa: E501 -from openapi_client.rest import ApiException - -class TestSavingDepositResponse(unittest.TestCase): - """SavingDepositResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SavingDepositResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.saving_deposit_response.SavingDepositResponse() # noqa: E501 - if include_optional : - return SavingDepositResponse( - id = 56, - symbol = 'USD', - fee = '1', - apy = '0.20', - principal = '100.00', - interest = '10.00', - time_created = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ) - ) - else : - return SavingDepositResponse( - symbol = 'USD', - apy = '0.20', - principal = '100.00', - interest = '10.00', - time_created = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - ) - - def testSavingDepositResponse(self): - """Test SavingDepositResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_saving_offer.py b/src/zarban/wallet/test/test_saving_offer.py deleted file mode 100644 index f82e6a2..0000000 --- a/src/zarban/wallet/test/test_saving_offer.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.saving_offer import SavingOffer # noqa: E501 -from openapi_client.rest import ApiException - -class TestSavingOffer(unittest.TestCase): - """SavingOffer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SavingOffer - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.saving_offer.SavingOffer() # noqa: E501 - if include_optional : - return SavingOffer( - id = '0', - name = 'Zarban ZAR 10% APY', - description = 'Earn 10% APY on your ZAR savings', - apy = '0.20', - min_amount = '100.00', - symbol = 'USD' - ) - else : - return SavingOffer( - id = '0', - name = 'Zarban ZAR 10% APY', - description = 'Earn 10% APY on your ZAR savings', - apy = '0.20', - min_amount = '100.00', - symbol = 'USD', - ) - - def testSavingOffer(self): - """Test SavingOffer""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_saving_withdraw_response.py b/src/zarban/wallet/test/test_saving_withdraw_response.py deleted file mode 100644 index 29000ee..0000000 --- a/src/zarban/wallet/test/test_saving_withdraw_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.saving_withdraw_response import SavingWithdrawResponse # noqa: E501 -from openapi_client.rest import ApiException - -class TestSavingWithdrawResponse(unittest.TestCase): - """SavingWithdrawResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SavingWithdrawResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = openapi_client.models.saving_withdraw_response.SavingWithdrawResponse() # noqa: E501 - if include_optional : - return SavingWithdrawResponse( - id = 56, - fee = '1', - balance_after_withdraw = '99.00', - principal = '100.00', - interest = '10.00', - time_created = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ) - ) - else : - return SavingWithdrawResponse( - fee = '1', - balance_after_withdraw = '99.00', - principal = '100.00', - interest = '10.00', - time_created = openapi_client.models.timestamp.Timestamp( - jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ), - ) - - def testSavingWithdrawResponse(self): - """Test SavingWithdrawResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_sign_up_request.py b/src/zarban/wallet/test/test_sign_up_request.py new file mode 100644 index 0000000..2eba78a --- /dev/null +++ b/src/zarban/wallet/test/test_sign_up_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.sign_up_request import SignUpRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestSignUpRequest(unittest.TestCase): + """SignUpRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SignUpRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.sign_up_request.SignUpRequest() # noqa: E501 + if include_optional : + return SignUpRequest( + email = 'example@domain.com', + password = 'password' + ) + else : + return SignUpRequest( + email = 'example@domain.com', + password = 'password', + ) + + def testSignUpRequest(self): + """Test SignUpRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_simple_response.py b/src/zarban/wallet/test/test_simple_response.py new file mode 100644 index 0000000..fbe31cb --- /dev/null +++ b/src/zarban/wallet/test/test_simple_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.simple_response import SimpleResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestSimpleResponse(unittest.TestCase): + """SimpleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SimpleResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.simple_response.SimpleResponse() # noqa: E501 + if include_optional : + return SimpleResponse( + messages = { + 'key' : '0' + } + ) + else : + return SimpleResponse( + messages = { + 'key' : '0' + }, + ) + + def testSimpleResponse(self): + """Test SimpleResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_swap_api.py b/src/zarban/wallet/test/test_swap_api.py new file mode 100644 index 0000000..15a08e3 --- /dev/null +++ b/src/zarban/wallet/test/test_swap_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.swap_api import SwapApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestSwapApi(unittest.TestCase): + """SwapApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.swap_api.SwapApi() # noqa: E501 + + def tearDown(self): + pass + + def test_swap_coins(self): + """Test case for swap_coins + + Swap coins # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object6.py b/src/zarban/wallet/test/test_swap_request.py similarity index 66% rename from src/zarban/wallet/test/test_inline_object6.py rename to src/zarban/wallet/test/test_swap_request.py index 961cc13..eebf6a4 100644 --- a/src/zarban/wallet/test/test_inline_object6.py +++ b/src/zarban/wallet/test/test_swap_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object6 import InlineObject6 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.swap_request import SwapRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject6(unittest.TestCase): - """InlineObject6 unit test stubs""" +class TestSwapRequest(unittest.TestCase): + """SwapRequest unit test stubs""" def setUp(self): pass @@ -29,13 +30,13 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject6 + """Test SwapRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object6.InlineObject6() # noqa: E501 + # model = zarban.wallet.openapi_client.models.swap_request.SwapRequest() # noqa: E501 if include_optional : - return InlineObject6( + return SwapRequest( intent = 'Swap', quote_id = '1234567890', trade_type = 'ExactInput', @@ -44,12 +45,12 @@ def make_instance(self, include_optional): amount = '100.00' ) else : - return InlineObject6( + return SwapRequest( intent = 'Swap', ) - def testInlineObject6(self): - """Test InlineObject6""" + def testSwapRequest(self): + """Test SwapRequest""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_swap_response.py b/src/zarban/wallet/test/test_swap_response.py index ca8347a..5e43c72 100644 --- a/src/zarban/wallet/test/test_swap_response.py +++ b/src/zarban/wallet/test/test_swap_response.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.swap_response import SwapResponse # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.swap_response import SwapResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestSwapResponse(unittest.TestCase): """SwapResponse unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.swap_response.SwapResponse() # noqa: E501 + # model = zarban.wallet.openapi_client.models.swap_response.SwapResponse() # noqa: E501 if include_optional : return SwapResponse( id = '0', @@ -43,18 +44,18 @@ def make_instance(self, include_optional): amount = '0', quote = '0', rate = '0', - value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, input_balance_after_swap = '0', output_balance_after_swap = '0', - created_at = openapi_client.models.timestamp.Timestamp( + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - expires_at = openapi_client.models.timestamp.Timestamp( + expires_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - executed_at = openapi_client.models.timestamp.Timestamp( + executed_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', - gregorian = '2020-01-01T00:00:00Z', ) + gregorian = '2020-01-01T00:00:00Z', ), + value = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}} ) else : return SwapResponse( @@ -65,13 +66,13 @@ def make_instance(self, include_optional): amount = '0', quote = '0', rate = '0', - value = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - created_at = openapi_client.models.timestamp.Timestamp( + created_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - expires_at = openapi_client.models.timestamp.Timestamp( + expires_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), + value = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, ) def testSwapResponse(self): diff --git a/src/zarban/wallet/test/test_symbol.py b/src/zarban/wallet/test/test_symbol.py index ae72920..42fa02f 100644 --- a/src/zarban/wallet/test/test_symbol.py +++ b/src/zarban/wallet/test/test_symbol.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.symbol import Symbol # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.symbol import Symbol # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestSymbol(unittest.TestCase): """Symbol unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.symbol.Symbol() # noqa: E501 + # model = zarban.wallet.openapi_client.models.symbol.Symbol() # noqa: E501 if include_optional : return Symbol( ) diff --git a/src/zarban/wallet/test/test_task.py b/src/zarban/wallet/test/test_task.py index 7ff8c8c..56b1a32 100644 --- a/src/zarban/wallet/test/test_task.py +++ b/src/zarban/wallet/test/test_task.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.task import Task # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.task import Task # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTask(unittest.TestCase): """Task unit test stubs""" @@ -33,14 +34,14 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.task.Task() # noqa: E501 + # model = zarban.wallet.openapi_client.models.task.Task() # noqa: E501 if include_optional : return Task( id = '1234567890', description = 'Complete your profile to earn rewards', points = 10, status = 'Pending', - completed_at = openapi_client.models.timestamp.Timestamp( + completed_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ) ) diff --git a/src/zarban/wallet/test/test_task_response.py b/src/zarban/wallet/test/test_task_response.py new file mode 100644 index 0000000..2b35ce3 --- /dev/null +++ b/src/zarban/wallet/test/test_task_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.task_response import TaskResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestTaskResponse(unittest.TestCase): + """TaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TaskResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.task_response.TaskResponse() # noqa: E501 + if include_optional : + return TaskResponse( + data = [ + zarban.wallet.openapi_client.models.task.Task( + id = '1234567890', + description = 'Complete your profile to earn rewards', + points = 10, + status = 'Pending', + completed_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ] + ) + else : + return TaskResponse( + data = [ + zarban.wallet.openapi_client.models.task.Task( + id = '1234567890', + description = 'Complete your profile to earn rewards', + points = 10, + status = 'Pending', + completed_at = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), ) + ], + ) + + def testTaskResponse(self): + """Test TaskResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_tasks_api.py b/src/zarban/wallet/test/test_tasks_api.py new file mode 100644 index 0000000..b502454 --- /dev/null +++ b/src/zarban/wallet/test/test_tasks_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.tasks_api import TasksApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestTasksApi(unittest.TestCase): + """TasksApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.tasks_api.TasksApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_tasks(self): + """Test case for get_tasks + + Get tasks # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_telegram_profile.py b/src/zarban/wallet/test/test_telegram_profile.py index f1fb334..31d81c3 100644 --- a/src/zarban/wallet/test/test_telegram_profile.py +++ b/src/zarban/wallet/test/test_telegram_profile.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.telegram_profile import TelegramProfile # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.telegram_profile import TelegramProfile # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTelegramProfile(unittest.TestCase): """TelegramProfile unit test stubs""" @@ -33,10 +34,9 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.telegram_profile.TelegramProfile() # noqa: E501 + # model = zarban.wallet.openapi_client.models.telegram_profile.TelegramProfile() # noqa: E501 if include_optional : return TelegramProfile( - id = 56, username = '0', first_name = '0', last_name = '0', diff --git a/src/zarban/wallet/test/test_timestamp.py b/src/zarban/wallet/test/test_timestamp.py index f2eddca..1c87d1d 100644 --- a/src/zarban/wallet/test/test_timestamp.py +++ b/src/zarban/wallet/test/test_timestamp.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.timestamp import Timestamp # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.timestamp import Timestamp # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTimestamp(unittest.TestCase): """Timestamp unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.timestamp.Timestamp() # noqa: E501 + # model = zarban.wallet.openapi_client.models.timestamp.Timestamp() # noqa: E501 if include_optional : return Timestamp( jalaali = '1399-01-01T00:00:00Z', diff --git a/src/zarban/wallet/test/test_transaction.py b/src/zarban/wallet/test/test_transaction.py index 4888265..73fb4ec 100644 --- a/src/zarban/wallet/test/test_transaction.py +++ b/src/zarban/wallet/test/test_transaction.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.transaction import Transaction # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.transaction import Transaction # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTransaction(unittest.TestCase): """Transaction unit test stubs""" @@ -33,21 +34,22 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.transaction.Transaction() # noqa: E501 + # model = zarban.wallet.openapi_client.models.transaction.Transaction() # noqa: E501 if include_optional : return Transaction( id = 56, - time = openapi_client.models.timestamp.Timestamp( + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), type = 'Credit', _from = '0', to = '0', symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - external_transaction = openapi_client.models.external_transaction.ExternalTransaction( + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + direction = 'Inbound', + external_transaction = zarban.wallet.openapi_client.models.external_transaction.ExternalTransaction( id = 56, - time = openapi_client.models.timestamp.Timestamp( + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), type = 'Credit', @@ -55,9 +57,9 @@ def make_instance(self, include_optional): from = '0', to = '0', comment = '0', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, symbol = 'USD', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), status = 'Sent', ) @@ -65,14 +67,15 @@ def make_instance(self, include_optional): else : return Transaction( id = 56, - time = openapi_client.models.timestamp.Timestamp( + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), type = 'Credit', _from = '0', to = '0', symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + direction = 'Inbound', ) def testTransaction(self): diff --git a/src/zarban/wallet/test/test_transaction_response.py b/src/zarban/wallet/test/test_transaction_response.py new file mode 100644 index 0000000..47fbb03 --- /dev/null +++ b/src/zarban/wallet/test/test_transaction_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.transaction_response import TransactionResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestTransactionResponse(unittest.TestCase): + """TransactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TransactionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.transaction_response.TransactionResponse() # noqa: E501 + if include_optional : + return TransactionResponse( + data = [ + zarban.wallet.openapi_client.models.transaction.Transaction( + id = 56, + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + type = 'Credit', + from = '0', + to = '0', + symbol = 'USD', + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + direction = 'Inbound', + external_transaction = zarban.wallet.openapi_client.models.external_transaction.ExternalTransaction( + id = 56, + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + type = 'Credit', + hash = '0', + from = '0', + to = '0', + comment = '0', + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + symbol = 'USD', + network = zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ), + status = 'Sent', ), ) + ] + ) + else : + return TransactionResponse( + data = [ + zarban.wallet.openapi_client.models.transaction.Transaction( + id = 56, + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + type = 'Credit', + from = '0', + to = '0', + symbol = 'USD', + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + direction = 'Inbound', + external_transaction = zarban.wallet.openapi_client.models.external_transaction.ExternalTransaction( + id = 56, + time = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + type = 'Credit', + hash = '0', + from = '0', + to = '0', + comment = '0', + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + symbol = 'USD', + network = zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ), + status = 'Sent', ), ) + ], + ) + + def testTransactionResponse(self): + """Test TransactionResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_transaction_status.py b/src/zarban/wallet/test/test_transaction_status.py index adf0562..e420ca8 100644 --- a/src/zarban/wallet/test/test_transaction_status.py +++ b/src/zarban/wallet/test/test_transaction_status.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.transaction_status import TransactionStatus # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.transaction_status import TransactionStatus # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTransactionStatus(unittest.TestCase): """TransactionStatus unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.transaction_status.TransactionStatus() # noqa: E501 + # model = zarban.wallet.openapi_client.models.transaction_status.TransactionStatus() # noqa: E501 if include_optional : return TransactionStatus( ) diff --git a/src/zarban/wallet/test/test_transaction_type.py b/src/zarban/wallet/test/test_transaction_type.py index 397bf7d..37b378e 100644 --- a/src/zarban/wallet/test/test_transaction_type.py +++ b/src/zarban/wallet/test/test_transaction_type.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.transaction_type import TransactionType # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.transaction_type import TransactionType # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestTransactionType(unittest.TestCase): """TransactionType unit test stubs""" @@ -33,7 +34,7 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.transaction_type.TransactionType() # noqa: E501 + # model = zarban.wallet.openapi_client.models.transaction_type.TransactionType() # noqa: E501 if include_optional : return TransactionType( ) diff --git a/src/zarban/wallet/test/test_transactions_api.py b/src/zarban/wallet/test/test_transactions_api.py new file mode 100644 index 0000000..569485a --- /dev/null +++ b/src/zarban/wallet/test/test_transactions_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.transactions_api import TransactionsApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestTransactionsApi(unittest.TestCase): + """TransactionsApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.transactions_api.TransactionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_user_transactions(self): + """Test case for get_user_transactions + + Get user transactions # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_update_email_request.py b/src/zarban/wallet/test/test_update_email_request.py new file mode 100644 index 0000000..22de7d2 --- /dev/null +++ b/src/zarban/wallet/test/test_update_email_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.update_email_request import UpdateEmailRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestUpdateEmailRequest(unittest.TestCase): + """UpdateEmailRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateEmailRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.update_email_request.UpdateEmailRequest() # noqa: E501 + if include_optional : + return UpdateEmailRequest( + email = 'example@example.com' + ) + else : + return UpdateEmailRequest( + email = 'example@example.com', + ) + + def testUpdateEmailRequest(self): + """Test UpdateEmailRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object.py b/src/zarban/wallet/test/test_update_phone_request.py similarity index 54% rename from src/zarban/wallet/test/test_inline_object.py rename to src/zarban/wallet/test/test_update_phone_request.py index d973956..e49f535 100644 --- a/src/zarban/wallet/test/test_inline_object.py +++ b/src/zarban/wallet/test/test_update_phone_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object import InlineObject # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.update_phone_request import UpdatePhoneRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject(unittest.TestCase): - """InlineObject unit test stubs""" +class TestUpdatePhoneRequest(unittest.TestCase): + """UpdatePhoneRequest unit test stubs""" def setUp(self): pass @@ -29,26 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject + """Test UpdatePhoneRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object.InlineObject() # noqa: E501 + # model = zarban.wallet.openapi_client.models.update_phone_request.UpdatePhoneRequest() # noqa: E501 if include_optional : - return InlineObject( - intent = 'Withdraw', - amount = '100.00', - saving_position_id = 56 + return UpdatePhoneRequest( + number = '09123456789' ) else : - return InlineObject( - intent = 'Withdraw', - amount = '100.00', - saving_position_id = 56, + return UpdatePhoneRequest( + number = '09123456789', ) - def testInlineObject(self): - """Test InlineObject""" + def testUpdatePhoneRequest(self): + """Test UpdatePhoneRequest""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_user.py b/src/zarban/wallet/test/test_user.py new file mode 100644 index 0000000..790dc1f --- /dev/null +++ b/src/zarban/wallet/test/test_user.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.user import User # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test User + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.user.User() # noqa: E501 + if include_optional : + return User( + first_name = 'John', + last_name = 'Doe', + email = '0', + username = '0', + phone = '0', + is_email_verified = True, + is_phone_verified = True, + is_kyc_verified = True, + is_child = True, + is_super_user = True, + is_admin = True, + telegram = zarban.wallet.openapi_client.models.telegram_profile.TelegramProfile( + username = '0', + first_name = '0', + last_name = '0', + photo_url = '0', ) + ) + else : + return User( + ) + + def testUser(self): + """Test User""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_user_api.py b/src/zarban/wallet/test/test_user_api.py new file mode 100644 index 0000000..34d8ada --- /dev/null +++ b/src/zarban/wallet/test/test_user_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.user_api import UserApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.user_api.UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_confirm_kyc(self): + """Test case for confirm_kyc + + Confirm KYC # noqa: E501 + """ + pass + + def test_confirm_phone_number(self): + """Test case for confirm_phone_number + + Confirm phone number # noqa: E501 + """ + pass + + def test_create_child_user(self): + """Test case for create_child_user + + create a child user # noqa: E501 + """ + pass + + def test_get_user_profile(self): + """Test case for get_user_profile + + Get profile # noqa: E501 + """ + pass + + def test_submit_email_confirmation_otp(self): + """Test case for submit_email_confirmation_otp + + Submit email confirmation OTP # noqa: E501 + """ + pass + + def test_submit_kyc(self): + """Test case for submit_kyc + + Submit KYC # noqa: E501 + """ + pass + + def test_verify_phone_number(self): + """Test case for verify_phone_number + + Verify phone number # noqa: E501 + """ + pass + + def test_verify_user_email_address(self): + """Test case for verify_user_email_address + + Verify email # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_user_error.py b/src/zarban/wallet/test/test_user_error.py index 1aa542a..36c044d 100644 --- a/src/zarban/wallet/test/test_user_error.py +++ b/src/zarban/wallet/test/test_user_error.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.user_error import UserError # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.user_error import UserError # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestUserError(unittest.TestCase): """UserError unit test stubs""" @@ -33,11 +34,11 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.user_error.UserError() # noqa: E501 + # model = zarban.wallet.openapi_client.models.user_error.UserError() # noqa: E501 if include_optional : return UserError( messages = { - 'key' : openapi_client.models.user_error_messages.UserError_messages( + 'key' : zarban.wallet.openapi_client.models.error_detail.ErrorDetail( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' @@ -47,7 +48,7 @@ def make_instance(self, include_optional): else : return UserError( messages = { - 'key' : openapi_client.models.user_error_messages.UserError_messages( + 'key' : zarban.wallet.openapi_client.models.error_detail.ErrorDetail( user_message = 'Invalid request. Please check the provided address.', solutions = [ 'Ensure the address follows the correct format.' diff --git a/src/zarban/wallet/test/test_wallet_balance.py b/src/zarban/wallet/test/test_wallet_balance.py index a7bdd64..cb07259 100644 --- a/src/zarban/wallet/test/test_wallet_balance.py +++ b/src/zarban/wallet/test/test_wallet_balance.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.wallet_balance import WalletBalance # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.wallet_balance import WalletBalance # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestWalletBalance(unittest.TestCase): """WalletBalance unit test stubs""" @@ -33,73 +34,73 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.wallet_balance.WalletBalance() # noqa: E501 + # model = zarban.wallet.openapi_client.models.wallet_balance.WalletBalance() # noqa: E501 if include_optional : return WalletBalance( - total = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + total = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, balances = [ - openapi_client.models.balance.Balance( - locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - coin = openapi_client.models.coin.Coin( - config = openapi_client.models.coin_config.CoinConfig( + zarban.wallet.openapi_client.models.balance.Balance( + locked = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + coin = zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ), ), - balance = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, ) ] ) else : return WalletBalance( - total = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + total = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, balances = [ - openapi_client.models.balance.Balance( - locked = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - coin = openapi_client.models.coin.Coin( - config = openapi_client.models.coin_config.CoinConfig( + zarban.wallet.openapi_client.models.balance.Balance( + locked = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + coin = zarban.wallet.openapi_client.models.coin.Coin( + config = zarban.wallet.openapi_client.models.coin_config.CoinConfig( is_tradeable = True, withdraw_fees = {"tron":"10"}, - min_withdrawal = {"tron":"100"}, + min_withdrawal = {"tron":"10"}, needs_memo = True, ), symbol = 'USD', name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', depositable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], withdrawable_networks = [ - openapi_client.models.network.Network( + zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ) ], - content = openapi_client.models.coin_content.Coin_content( + content = zarban.wallet.openapi_client.models.bullet_content.BulletContent( title = '0', text = '0', - bollets = [ + bullets = [ '0' ], ), ), - balance = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, ) + balance = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, ) ], ) diff --git a/src/zarban/wallet/test/test_websocket_api.py b/src/zarban/wallet/test/test_websocket_api.py deleted file mode 100644 index 42041d0..0000000 --- a/src/zarban/wallet/test/test_websocket_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Zarban Wallet API - - API for Zarban wallet services. # noqa: E501 - - The version of the OpenAPI document: 2.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import openapi_client -from openapi_client.api.websocket_api import WebsocketApi # noqa: E501 -from openapi_client.rest import ApiException - - -class TestWebsocketApi(unittest.TestCase): - """WebsocketApi unit test stubs""" - - def setUp(self): - self.api = openapi_client.api.websocket_api.WebsocketApi() # noqa: E501 - - def tearDown(self): - pass - - def test_ws_get(self): - """Test case for ws_get - - Websocket Upgrade # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zarban/wallet/test/test_withdraw_api.py b/src/zarban/wallet/test/test_withdraw_api.py new file mode 100644 index 0000000..3d44604 --- /dev/null +++ b/src/zarban/wallet/test/test_withdraw_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.api.withdraw_api import WithdrawApi # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + + +class TestWithdrawApi(unittest.TestCase): + """WithdrawApi unit test stubs""" + + def setUp(self): + self.api = zarban.wallet.openapi_client.api.withdraw_api.WithdrawApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_user_withdraw_requests(self): + """Test case for get_user_withdraw_requests + + Get user withdraw requests # noqa: E501 + """ + pass + + def test_get_withdrawal_status(self): + """Test case for get_withdrawal_status + + Get withdrawal status # noqa: E501 + """ + pass + + def test_preview_withdrawal(self): + """Test case for preview_withdrawal + + Withdraw request # noqa: E501 + """ + pass + + def test_request_withdrawal(self): + """Test case for request_withdrawal + + Withdraw request # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_withdraw_request.py b/src/zarban/wallet/test/test_withdraw_request.py index 92bc1dd..51c6c79 100644 --- a/src/zarban/wallet/test/test_withdraw_request.py +++ b/src/zarban/wallet/test/test_withdraw_request.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.withdraw_request import WithdrawRequest # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.withdraw_request import WithdrawRequest # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestWithdrawRequest(unittest.TestCase): """WithdrawRequest unit test stubs""" @@ -33,14 +34,14 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.withdraw_request.WithdrawRequest() # noqa: E501 + # model = zarban.wallet.openapi_client.models.withdraw_request.WithdrawRequest() # noqa: E501 if include_optional : return WithdrawRequest( id = 56, - time_created = openapi_client.models.timestamp.Timestamp( + time_created = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'USD', @@ -53,10 +54,10 @@ def make_instance(self, include_optional): else : return WithdrawRequest( id = 56, - time_created = openapi_client.models.timestamp.Timestamp( + time_created = zarban.wallet.openapi_client.models.timestamp.Timestamp( jalaali = '1399-01-01T00:00:00Z', gregorian = '2020-01-01T00:00:00Z', ), - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'USD', diff --git a/src/zarban/wallet/test/test_inline_object8.py b/src/zarban/wallet/test/test_withdraw_request_body.py similarity index 65% rename from src/zarban/wallet/test/test_inline_object8.py rename to src/zarban/wallet/test/test_withdraw_request_body.py index 36ea23f..752e025 100644 --- a/src/zarban/wallet/test/test_inline_object8.py +++ b/src/zarban/wallet/test/test_withdraw_request_body.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object8 import InlineObject8 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.withdraw_request_body import WithdrawRequestBody # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject8(unittest.TestCase): - """InlineObject8 unit test stubs""" +class TestWithdrawRequestBody(unittest.TestCase): + """WithdrawRequestBody unit test stubs""" def setUp(self): pass @@ -29,13 +30,13 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject8 + """Test WithdrawRequestBody include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object8.InlineObject8() # noqa: E501 + # model = zarban.wallet.openapi_client.models.withdraw_request_body.WithdrawRequestBody() # noqa: E501 if include_optional : - return InlineObject8( + return WithdrawRequestBody( network = 'arbitrum', symbol = 'ZAR', amount = '100.00', @@ -43,15 +44,15 @@ def make_instance(self, include_optional): comment = 'Withdrawal request comment' ) else : - return InlineObject8( + return WithdrawRequestBody( network = 'arbitrum', symbol = 'ZAR', amount = '100.00', address = '0x1234567890abcdef', ) - def testInlineObject8(self): - """Test InlineObject8""" + def testWithdrawRequestBody(self): + """Test WithdrawRequestBody""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/zarban/wallet/test/test_withdraw_request_preview.py b/src/zarban/wallet/test/test_withdraw_request_preview.py index 19368a1..f4a65c8 100644 --- a/src/zarban/wallet/test/test_withdraw_request_preview.py +++ b/src/zarban/wallet/test/test_withdraw_request_preview.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,9 +16,9 @@ import unittest import datetime -import openapi_client -from openapi_client.models.withdraw_request_preview import WithdrawRequestPreview # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.withdraw_request_preview import WithdrawRequestPreview # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException class TestWithdrawRequestPreview(unittest.TestCase): """WithdrawRequestPreview unit test stubs""" @@ -33,28 +34,28 @@ def make_instance(self, include_optional): include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.withdraw_request_preview.WithdrawRequestPreview() # noqa: E501 + # model = zarban.wallet.openapi_client.models.withdraw_request_preview.WithdrawRequestPreview() # noqa: E501 if include_optional : return WithdrawRequestPreview( address = '0x1234567890abcdef', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - fee = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - balance_after_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"} + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + fee = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + balance_after_withdraw = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}} ) else : return WithdrawRequestPreview( address = '0x1234567890abcdef', - network = openapi_client.models.network.Network( + network = zarban.wallet.openapi_client.models.network.Network( name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, logo_uri = '0', ), symbol = 'USD', - amount = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - fee = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, - balance_after_withdraw = {"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}, + amount = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + fee = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, + balance_after_withdraw = {"values":{"USD":"1.23","TMN":"45.67","ZAR":"89.01","ETH":"0.02"}}, ) def testWithdrawRequestPreview(self): diff --git a/src/zarban/wallet/test/test_withdraw_request_response.py b/src/zarban/wallet/test/test_withdraw_request_response.py new file mode 100644 index 0000000..d3faceb --- /dev/null +++ b/src/zarban/wallet/test/test_withdraw_request_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Zarban Wallet API + + API for Zarban wallet services. # noqa: E501 + + The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.withdraw_request_response import WithdrawRequestResponse # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException + +class TestWithdrawRequestResponse(unittest.TestCase): + """WithdrawRequestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WithdrawRequestResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = zarban.wallet.openapi_client.models.withdraw_request_response.WithdrawRequestResponse() # noqa: E501 + if include_optional : + return WithdrawRequestResponse( + data = [ + zarban.wallet.openapi_client.models.withdraw_request.WithdrawRequest( + id = 56, + time_created = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + network = zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ), + symbol = 'USD', + amount = '0', + to = '0', + comment = '0', + status = 'Pending', + block_explorer_url = 'https://etherscan.io/tx/0x1234567890abcdef', ) + ] + ) + else : + return WithdrawRequestResponse( + data = [ + zarban.wallet.openapi_client.models.withdraw_request.WithdrawRequest( + id = 56, + time_created = zarban.wallet.openapi_client.models.timestamp.Timestamp( + jalaali = '1399-01-01T00:00:00Z', + gregorian = '2020-01-01T00:00:00Z', ), + network = zarban.wallet.openapi_client.models.network.Network( + name = {"en_US":"Zar Stablecoin","fa_IR":"استیبل کوین زر"}, + logo_uri = '0', ), + symbol = 'USD', + amount = '0', + to = '0', + comment = '0', + status = 'Pending', + block_explorer_url = 'https://etherscan.io/tx/0x1234567890abcdef', ) + ], + ) + + def testWithdrawRequestResponse(self): + """Test WithdrawRequestResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/zarban/wallet/test/test_inline_object1.py b/src/zarban/wallet/test/test_withdraw_response_body.py similarity index 53% rename from src/zarban/wallet/test/test_inline_object1.py rename to src/zarban/wallet/test/test_withdraw_response_body.py index 6a6f58c..0f96f69 100644 --- a/src/zarban/wallet/test/test_inline_object1.py +++ b/src/zarban/wallet/test/test_withdraw_response_body.py @@ -6,6 +6,7 @@ API for Zarban wallet services. # noqa: E501 The version of the OpenAPI document: 2.0.0 + Contact: info@zarban.io Generated by: https://openapi-generator.tech """ @@ -15,12 +16,12 @@ import unittest import datetime -import openapi_client -from openapi_client.models.inline_object1 import InlineObject1 # noqa: E501 -from openapi_client.rest import ApiException +import zarban.wallet.openapi_client +from zarban.wallet.openapi_client.models.withdraw_response_body import WithdrawResponseBody # noqa: E501 +from zarban.wallet.openapi_client.rest import ApiException -class TestInlineObject1(unittest.TestCase): - """InlineObject1 unit test stubs""" +class TestWithdrawResponseBody(unittest.TestCase): + """WithdrawResponseBody unit test stubs""" def setUp(self): pass @@ -29,26 +30,22 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test InlineObject1 + """Test WithdrawResponseBody include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = openapi_client.models.inline_object1.InlineObject1() # noqa: E501 + # model = zarban.wallet.openapi_client.models.withdraw_response_body.WithdrawResponseBody() # noqa: E501 if include_optional : - return InlineObject1( - intent = 'Save', - amount = '100.00', - offer_id = '0' + return WithdrawResponseBody( + id = 1234567890 ) else : - return InlineObject1( - intent = 'Save', - amount = '100.00', - offer_id = '0', + return WithdrawResponseBody( + id = 1234567890, ) - def testInlineObject1(self): - """Test InlineObject1""" + def testWithdrawResponseBody(self): + """Test WithdrawResponseBody""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True)