Skip to content

Commit 4aff786

Browse files
committed
Add client and order request models with client ID handling
- Implemented `AddClientResponseAllOfClientid` model to encapsulate the client ID of newly created clients. - Created `AddOrderRequestClientid` model to handle client ID for order requests. - Developed `UpdateClientRequestClientid` and `UpdateClientResponseAllOfClientid` models for updating client information. - Updated existing models to integrate new client ID models where necessary. - Added unit tests for new models to ensure functionality and correctness. - Bumped version to 1.0.10 to reflect new features and changes.
1 parent 7600622 commit 4aff786

28 files changed

Lines changed: 967 additions & 42 deletions

.openapi-generator/FILES

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.travis.yml
55
README.md
66
docs/AddClientResponse.md
7+
docs/AddClientResponseAllOfClientid.md
8+
docs/AddOrderRequestClientid.md
79
docs/AddOrderResponse.md
810
docs/ClientInfo.md
911
docs/CurrencyInfo.md
@@ -12,7 +14,9 @@ docs/GetClientsResponse.md
1214
docs/GetClientsResponseAllOfClients.md
1315
docs/GetCurrenciesResponse.md
1416
docs/GetCurrenciesResponseAllOfCurrencies.md
17+
docs/UpdateClientRequestClientid.md
1518
docs/UpdateClientResponse.md
19+
docs/UpdateClientResponseAllOfClientid.md
1620
docs/WHMCSBaseResponse.md
1721
docs/WHMCSErrorResponse.md
1822
docs/WHMCSSuccessResponse.md
@@ -23,9 +27,6 @@ setup.cfg
2327
setup.py
2428
test-requirements.txt
2529
test/__init__.py
26-
test/test_currency_info.py
27-
test/test_get_currencies_response.py
28-
test/test_get_currencies_response_all_of_currencies.py
2930
tox.ini
3031
whmcs_client/__init__.py
3132
whmcs_client/api/__init__.py
@@ -36,14 +37,18 @@ whmcs_client/configuration.py
3637
whmcs_client/exceptions.py
3738
whmcs_client/models/__init__.py
3839
whmcs_client/models/add_client_response.py
40+
whmcs_client/models/add_client_response_all_of_clientid.py
41+
whmcs_client/models/add_order_request_clientid.py
3942
whmcs_client/models/add_order_response.py
4043
whmcs_client/models/client_info.py
4144
whmcs_client/models/currency_info.py
4245
whmcs_client/models/get_clients_response.py
4346
whmcs_client/models/get_clients_response_all_of_clients.py
4447
whmcs_client/models/get_currencies_response.py
4548
whmcs_client/models/get_currencies_response_all_of_currencies.py
49+
whmcs_client/models/update_client_request_clientid.py
4650
whmcs_client/models/update_client_response.py
51+
whmcs_client/models/update_client_response_all_of_clientid.py
4752
whmcs_client/models/whmcs_base_response.py
4853
whmcs_client/models/whmcs_error_response.py
4954
whmcs_client/models/whmcs_success_response.py

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ each action as an independent path while routing all requests to the /api.php en
99
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1010

1111
- API version: 1.0.0
12-
- Package version: 1.0.9
12+
- Package version: 1.0.10
1313
- Generator version: 7.13.0
1414
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1515

@@ -128,14 +128,18 @@ Class | Method | HTTP request | Description
128128
## Documentation For Models
129129

130130
- [AddClientResponse](docs/AddClientResponse.md)
131+
- [AddClientResponseAllOfClientid](docs/AddClientResponseAllOfClientid.md)
132+
- [AddOrderRequestClientid](docs/AddOrderRequestClientid.md)
131133
- [AddOrderResponse](docs/AddOrderResponse.md)
132134
- [ClientInfo](docs/ClientInfo.md)
133135
- [CurrencyInfo](docs/CurrencyInfo.md)
134136
- [GetClientsResponse](docs/GetClientsResponse.md)
135137
- [GetClientsResponseAllOfClients](docs/GetClientsResponseAllOfClients.md)
136138
- [GetCurrenciesResponse](docs/GetCurrenciesResponse.md)
137139
- [GetCurrenciesResponseAllOfCurrencies](docs/GetCurrenciesResponseAllOfCurrencies.md)
140+
- [UpdateClientRequestClientid](docs/UpdateClientRequestClientid.md)
138141
- [UpdateClientResponse](docs/UpdateClientResponse.md)
142+
- [UpdateClientResponseAllOfClientid](docs/UpdateClientResponseAllOfClientid.md)
139143
- [WHMCSBaseResponse](docs/WHMCSBaseResponse.md)
140144
- [WHMCSErrorResponse](docs/WHMCSErrorResponse.md)
141145
- [WHMCSSuccessResponse](docs/WHMCSSuccessResponse.md)

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"packageName": "whmcs_client",
33
"projectName": "whmcs-api-client",
4-
"packageVersion": "1.0.9",
4+
"packageVersion": "1.0.10",
55
"packageUrl": "https://github.com/truehostcloud/whmcs-python-client",
66
"packageCompany": "Truehost",
77
"packageAuthor": "William Mwai",

docs/AddClientResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | | [optional]
99
**message** | **str** | Response message | [optional]
10-
**clientid** | **str** | The ID of the newly created client | [optional]
10+
**clientid** | [**AddClientResponseAllOfClientid**](AddClientResponseAllOfClientid.md) | | [optional]
1111
**owner_user_id** | **int** | The ID of the user that owns the client | [optional]
1212

1313
## Example
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AddClientResponseAllOfClientid
2+
3+
The ID of the newly created client
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.add_client_response_all_of_clientid import AddClientResponseAllOfClientid
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of AddClientResponseAllOfClientid from a JSON string
18+
add_client_response_all_of_clientid_instance = AddClientResponseAllOfClientid.from_json(json)
19+
# print the JSON string representation of the object
20+
print(AddClientResponseAllOfClientid.to_json())
21+
22+
# convert the object into a dict
23+
add_client_response_all_of_clientid_dict = add_client_response_all_of_clientid_instance.to_dict()
24+
# create an instance of AddClientResponseAllOfClientid from a dict
25+
add_client_response_all_of_clientid_from_dict = AddClientResponseAllOfClientid.from_dict(add_client_response_all_of_clientid_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

docs/AddOrderRequestClientid.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AddOrderRequestClientid
2+
3+
The ID of the client to add the order for
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.add_order_request_clientid import AddOrderRequestClientid
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of AddOrderRequestClientid from a JSON string
18+
add_order_request_clientid_instance = AddOrderRequestClientid.from_json(json)
19+
# print the JSON string representation of the object
20+
print(AddOrderRequestClientid.to_json())
21+
22+
# convert the object into a dict
23+
add_order_request_clientid_dict = add_order_request_clientid_instance.to_dict()
24+
# create an instance of AddOrderRequestClientid from a dict
25+
add_order_request_clientid_from_dict = AddOrderRequestClientid.from_dict(add_order_request_clientid_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

docs/DefaultApi.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Places a new order for products/services
148148

149149
```python
150150
import whmcs_client
151+
from whmcs_client.models.add_order_request_clientid import AddOrderRequestClientid
151152
from whmcs_client.models.add_order_response import AddOrderResponse
152153
from whmcs_client.rest import ApiException
153154
from pprint import pprint
@@ -165,7 +166,7 @@ with whmcs_client.ApiClient(configuration) as api_client:
165166
api_instance = whmcs_client.DefaultApi(api_client)
166167
username = 'username_example' # str | Admin username/API identifier
167168
password = 'password_example' # str | Admin password/API secret
168-
clientid = 56 # int | The ID of the client to add the order for
169+
clientid = whmcs_client.AddOrderRequestClientid() # AddOrderRequestClientid |
169170
paymentmethod = 'paymentmethod_example' # str | The payment method for the order in the system format (e.g., paypal, mailin)
170171
accesskey = 'accesskey_example' # str | Optional API access key (optional)
171172
responsetype = json # str | Response format (optional) (default to json)
@@ -231,7 +232,7 @@ Name | Type | Description | Notes
231232
------------- | ------------- | ------------- | -------------
232233
**username** | **str**| Admin username/API identifier |
233234
**password** | **str**| Admin password/API secret |
234-
**clientid** | **int**| The ID of the client to add the order for |
235+
**clientid** | [**AddOrderRequestClientid**](AddOrderRequestClientid.md)| |
235236
**paymentmethod** | **str**| The payment method for the order in the system format (e.g., paypal, mailin) |
236237
**accesskey** | **str**| Optional API access key | [optional]
237238
**responsetype** | **str**| Response format | [optional] [default to json]
@@ -475,6 +476,7 @@ Modifies an existing client's information
475476

476477
```python
477478
import whmcs_client
479+
from whmcs_client.models.update_client_request_clientid import UpdateClientRequestClientid
478480
from whmcs_client.models.update_client_response import UpdateClientResponse
479481
from whmcs_client.rest import ApiException
480482
from pprint import pprint
@@ -492,7 +494,7 @@ with whmcs_client.ApiClient(configuration) as api_client:
492494
api_instance = whmcs_client.DefaultApi(api_client)
493495
username = 'username_example' # str | Admin username/API identifier
494496
password = 'password_example' # str | Admin password/API secret
495-
clientid = 56 # int | The ID of the client to update
497+
clientid = whmcs_client.UpdateClientRequestClientid() # UpdateClientRequestClientid |
496498
accesskey = 'accesskey_example' # str | Optional API access key (optional)
497499
responsetype = json # str | Response format (optional) (default to json)
498500
clientemail = 'clientemail_example' # str | The email address of the client to update (optional)
@@ -551,7 +553,7 @@ Name | Type | Description | Notes
551553
------------- | ------------- | ------------- | -------------
552554
**username** | **str**| Admin username/API identifier |
553555
**password** | **str**| Admin password/API secret |
554-
**clientid** | **int**| The ID of the client to update |
556+
**clientid** | [**UpdateClientRequestClientid**](UpdateClientRequestClientid.md)| |
555557
**accesskey** | **str**| Optional API access key | [optional]
556558
**responsetype** | **str**| Response format | [optional] [default to json]
557559
**clientemail** | **str**| The email address of the client to update | [optional]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# UpdateClientRequestClientid
2+
3+
The ID of the client to update
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.update_client_request_clientid import UpdateClientRequestClientid
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of UpdateClientRequestClientid from a JSON string
18+
update_client_request_clientid_instance = UpdateClientRequestClientid.from_json(json)
19+
# print the JSON string representation of the object
20+
print(UpdateClientRequestClientid.to_json())
21+
22+
# convert the object into a dict
23+
update_client_request_clientid_dict = update_client_request_clientid_instance.to_dict()
24+
# create an instance of UpdateClientRequestClientid from a dict
25+
update_client_request_clientid_from_dict = UpdateClientRequestClientid.from_dict(update_client_request_clientid_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

docs/UpdateClientResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | | [optional]
99
**message** | **str** | Response message | [optional]
10-
**clientid** | **str** | The ID of the updated client | [optional]
10+
**clientid** | [**UpdateClientResponseAllOfClientid**](UpdateClientResponseAllOfClientid.md) | | [optional]
1111

1212
## Example
1313

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# UpdateClientResponseAllOfClientid
2+
3+
The ID of the updated client
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.update_client_response_all_of_clientid import UpdateClientResponseAllOfClientid
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of UpdateClientResponseAllOfClientid from a JSON string
18+
update_client_response_all_of_clientid_instance = UpdateClientResponseAllOfClientid.from_json(json)
19+
# print the JSON string representation of the object
20+
print(UpdateClientResponseAllOfClientid.to_json())
21+
22+
# convert the object into a dict
23+
update_client_response_all_of_clientid_dict = update_client_response_all_of_clientid_instance.to_dict()
24+
# create an instance of UpdateClientResponseAllOfClientid from a dict
25+
update_client_response_all_of_clientid_from_dict = UpdateClientResponseAllOfClientid.from_dict(update_client_response_all_of_clientid_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

0 commit comments

Comments
 (0)