Skip to content

Commit 6dd19dd

Browse files
committed
Refactor API endpoints to use standardized URL format and remove redundant action parameters
1 parent 8720d6e commit 6dd19dd

5 files changed

Lines changed: 43 additions & 104 deletions

File tree

.openapi-generator/FILES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.github/workflows/python.yml
22
.gitignore
33
.gitlab-ci.yml
4+
.openapi-generator-ignore
45
.travis.yml
56
README.md
67
docs/AddClientResponse.md
@@ -17,6 +18,13 @@ setup.cfg
1718
setup.py
1819
test-requirements.txt
1920
test/__init__.py
21+
test/test_add_client_response.py
22+
test/test_add_order_response.py
23+
test/test_default_api.py
24+
test/test_update_client_response.py
25+
test/test_whmcs_base_response.py
26+
test/test_whmcs_error_response.py
27+
test/test_whmcs_success_response.py
2028
tox.ini
2129
whmcs_client/__init__.py
2230
whmcs_client/api/__init__.py

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ with whmcs_client.ApiClient(configuration) as api_client:
7474
api_instance = whmcs_client.DefaultApi(api_client)
7575
username = 'username_example' # str | Admin username/API identifier
7676
password = 'password_example' # str | Admin password/API secret
77-
action = AddClient # str | Must be 'AddClient' (default to AddClient)
7877
firstname = 'firstname_example' # str | First name of the client
7978
lastname = 'lastname_example' # str | Last name of the client
8079
email = 'email_example' # str | Email address of the client
@@ -105,7 +104,7 @@ with whmcs_client.ApiClient(configuration) as api_client:
105104

106105
try:
107106
# Add a new client
108-
api_response = api_instance.add_client(username, password, action, firstname, lastname, email, address1, city, state, postcode, country, phonenumber, accesskey=accesskey, responsetype=responsetype, owner_user_id=owner_user_id, companyname=companyname, address2=address2, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, marketingoptin=marketingoptin, noemail=noemail, skipvalidation=skipvalidation)
107+
api_response = api_instance.add_client(username, password, firstname, lastname, email, address1, city, state, postcode, country, phonenumber, accesskey=accesskey, responsetype=responsetype, owner_user_id=owner_user_id, companyname=companyname, address2=address2, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, marketingoptin=marketingoptin, noemail=noemail, skipvalidation=skipvalidation)
109108
print("The response of DefaultApi->add_client:\n")
110109
pprint(api_response)
111110
except ApiException as e:
@@ -119,9 +118,9 @@ All URIs are relative to *https://your-whmcs-instance.com/includes*
119118

120119
Class | Method | HTTP request | Description
121120
------------ | ------------- | ------------- | -------------
122-
*DefaultApi* | [**add_client**](docs/DefaultApi.md#add_client) | **POST** /AddClient | Add a new client
123-
*DefaultApi* | [**add_order**](docs/DefaultApi.md#add_order) | **POST** /AddOrder | Create a new order
124-
*DefaultApi* | [**update_client**](docs/DefaultApi.md#update_client) | **POST** /UpdateClient | Update client details
121+
*DefaultApi* | [**add_client**](docs/DefaultApi.md#add_client) | **POST** /api.php?action=AddClient | Add a new client
122+
*DefaultApi* | [**add_order**](docs/DefaultApi.md#add_order) | **POST** /api.php?action=AddOrder | Create a new order
123+
*DefaultApi* | [**update_client**](docs/DefaultApi.md#update_client) | **POST** /api.php?action=UpdateClient | Update client details
125124

126125

127126
## Documentation For Models

0 commit comments

Comments
 (0)