Skip to content

Commit a7f92aa

Browse files
committed
fix(sdk): resolve Pydantic deserialization failures from WHMCS API
Remove format: date from all date fields to handle WHMCS returning "0000-00-00" for unset dates. Simplify oneOf integer/string unions to type: string to handle WHMCS returning unexpected types. Strip unused fields from ClientDetailsInfo, ClientDetailsStats, and InvoiceInfo down to what athena actually consumes, and add additionalProperties: true throughout to absorb unknown fields without validation errors. Bump version to 1.0.16.
1 parent bf36102 commit a7f92aa

31 files changed

Lines changed: 55 additions & 1473 deletions

.openapi-generator/FILES

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ docs/GetClientsResponseAllOfClients.md
1616
docs/GetCurrenciesResponse.md
1717
docs/GetCurrenciesResponseAllOfCurrencies.md
1818
docs/GetInvoicesResponse.md
19-
docs/InvoiceCollection.md
20-
docs/InvoiceCollectionInvoice.md
2119
docs/InvoiceInfo.md
22-
docs/ProductCollection.md
23-
docs/ProductCollectionProduct.md
2420
docs/ProductInfo.md
2521
docs/UpdateClientResponse.md
2622
docs/WHMCSBaseResponse.md
@@ -33,29 +29,6 @@ setup.cfg
3329
setup.py
3430
test-requirements.txt
3531
test/__init__.py
36-
test/test_add_client_response.py
37-
test/test_add_order_response.py
38-
test/test_client_details_info.py
39-
test/test_client_info.py
40-
test/test_currency_info.py
41-
test/test_default_api.py
42-
test/test_get_clients_details_response.py
43-
test/test_get_clients_products_response.py
44-
test/test_get_clients_response.py
45-
test/test_get_clients_response_all_of_clients.py
46-
test/test_get_currencies_response.py
47-
test/test_get_currencies_response_all_of_currencies.py
48-
test/test_get_invoices_response.py
49-
test/test_invoice_collection.py
50-
test/test_invoice_collection_invoice.py
51-
test/test_invoice_info.py
52-
test/test_product_collection.py
53-
test/test_product_collection_product.py
54-
test/test_product_info.py
55-
test/test_update_client_response.py
56-
test/test_whmcs_base_response.py
57-
test/test_whmcs_error_response.py
58-
test/test_whmcs_success_response.py
5932
tox.ini
6033
whmcs_client/__init__.py
6134
whmcs_client/api/__init__.py
@@ -77,11 +50,7 @@ whmcs_client/models/get_clients_response_all_of_clients.py
7750
whmcs_client/models/get_currencies_response.py
7851
whmcs_client/models/get_currencies_response_all_of_currencies.py
7952
whmcs_client/models/get_invoices_response.py
80-
whmcs_client/models/invoice_collection.py
81-
whmcs_client/models/invoice_collection_invoice.py
8253
whmcs_client/models/invoice_info.py
83-
whmcs_client/models/product_collection.py
84-
whmcs_client/models/product_collection_product.py
8554
whmcs_client/models/product_info.py
8655
whmcs_client/models/update_client_response.py
8756
whmcs_client/models/whmcs_base_response.py

README.md

Lines changed: 1 addition & 5 deletions
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.15
12+
- Package version: 1.0.16
1313
- Generator version: 7.21.0-SNAPSHOT
1414
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1515

@@ -142,11 +142,7 @@ Class | Method | HTTP request | Description
142142
- [GetCurrenciesResponse](docs/GetCurrenciesResponse.md)
143143
- [GetCurrenciesResponseAllOfCurrencies](docs/GetCurrenciesResponseAllOfCurrencies.md)
144144
- [GetInvoicesResponse](docs/GetInvoicesResponse.md)
145-
- [InvoiceCollection](docs/InvoiceCollection.md)
146-
- [InvoiceCollectionInvoice](docs/InvoiceCollectionInvoice.md)
147145
- [InvoiceInfo](docs/InvoiceInfo.md)
148-
- [ProductCollection](docs/ProductCollection.md)
149-
- [ProductCollectionProduct](docs/ProductCollectionProduct.md)
150146
- [ProductInfo](docs/ProductInfo.md)
151147
- [UpdateClientResponse](docs/UpdateClientResponse.md)
152148
- [WHMCSBaseResponse](docs/WHMCSBaseResponse.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.15",
4+
"packageVersion": "1.0.16",
55
"packageUrl": "https://github.com/truehostcloud/whmcs-python-client",
66
"packageCompany": "Truehost",
77
"packageAuthor": "William Mwai",

docs/GetClientsProductsResponse.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | | [optional]
99
**message** | **str** | Response message | [optional]
10-
**clientid** | **str** | The specific client id searched for | [optional]
11-
**serviceid** | **str** | The specific service id searched for | [optional]
12-
**pid** | **str** | The specific product id searched for | [optional]
13-
**domain** | **str** | The specific domain searched for | [optional]
14-
**totalresults** | **str** | The total number of results available | [optional]
15-
**startnumber** | **int** | The starting number for the returned results | [optional]
16-
**numreturned** | **int** | The number of results returned | [optional]
17-
**products** | [**ProductCollection**](ProductCollection.md) | | [optional]
10+
**products** | **object** | The products collection | [optional]
1811

1912
## Example
2013

docs/GetInvoicesResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**totalresults** | **int** | The total number of results available | [optional]
1111
**startnumber** | **int** | The starting number for the returned results | [optional]
1212
**numreturned** | **int** | The number of results returned | [optional]
13-
**invoices** | [**InvoiceCollection**](InvoiceCollection.md) | | [optional]
13+
**invoices** | **object** | The invoices collection | [optional]
1414

1515
## Example
1616

docs/InvoiceCollection.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/InvoiceCollectionInvoice.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

docs/InvoiceInfo.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,13 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**id** | **int** | The invoice ID | [optional]
99
**userid** | **int** | The client ID linked to the invoice | [optional]
10-
**firstname** | **str** | | [optional]
11-
**lastname** | **str** | | [optional]
12-
**companyname** | **str** | | [optional]
13-
**invoicenum** | **str** | | [optional]
14-
**var_date** | **str** | The invoice date (YYYY-MM-DD, may be 0000-00-00) | [optional]
10+
**var_date** | **str** | The invoice date (YYYY-MM-DD) | [optional]
1511
**duedate** | **str** | The invoice due date (YYYY-MM-DD, may be 0000-00-00) | [optional]
16-
**datepaid** | **str** | | [optional]
17-
**last_capture_attempt** | **str** | | [optional]
18-
**date_refunded** | **str** | | [optional]
19-
**date_cancelled** | **str** | | [optional]
20-
**subtotal** | **str** | | [optional]
21-
**credit** | **str** | | [optional]
22-
**tax** | **str** | | [optional]
23-
**tax2** | **str** | | [optional]
24-
**total** | **str** | | [optional]
25-
**taxrate** | **str** | | [optional]
26-
**taxrate2** | **str** | | [optional]
27-
**status** | **str** | | [optional]
28-
**paymentmethod** | **str** | | [optional]
29-
**notes** | **str** | | [optional]
30-
**created_at** | **str** | | [optional]
31-
**updated_at** | **str** | | [optional]
32-
**currencycode** | **str** | | [optional]
33-
**currencyprefix** | **str** | | [optional]
34-
**currencysuffix** | **str** | | [optional]
12+
**var_date** | **str** | Fallback invoice date field | [optional]
13+
**created_at** | **str** | Invoice creation timestamp | [optional]
14+
**total** | **str** | The invoice total amount | [optional]
15+
**status** | **str** | The invoice status | [optional]
16+
**currencycode** | **str** | The invoice currency code | [optional]
3517

3618
## Example
3719

docs/ProductCollection.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/ProductCollectionProduct.md

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)