Skip to content

Commit ab53df4

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 ab53df4

30 files changed

Lines changed: 54 additions & 1472 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: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

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.

docs/ProductInfo.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,11 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**id** | **str** | The service ID | [optional]
9-
**qty** | **str** | The service quantity | [optional]
10-
**clientid** | **str** | The client ID | [optional]
11-
**orderid** | **str** | The order ID | [optional]
12-
**ordernumber** | **str** | The order number | [optional]
13-
**pid** | **str** | The product ID | [optional]
14-
**regdate** | **str** | The registration date (YYYY-MM-DD, may be 0000-00-00) | [optional]
158
**name** | **str** | The product name | [optional]
16-
**translated_name** | **str** | The translated product name | [optional]
17-
**groupname** | **str** | The product group name | [optional]
18-
**translated_groupname** | **str** | The translated product group name | [optional]
19-
**domain** | **str** | The associated domain name | [optional]
20-
**dedicatedip** | **str** | The dedicated IP address | [optional]
21-
**serverid** | **str** | The server ID | [optional]
22-
**servername** | **str** | The server name | [optional]
23-
**serverip** | **str** | The server IP | [optional]
24-
**serverhostname** | **str** | The server hostname | [optional]
25-
**suspensionreason** | **str** | Suspension reason | [optional]
26-
**firstpaymentamount** | **str** | The first payment amount | [optional]
279
**recurringamount** | **str** | The recurring amount | [optional]
28-
**paymentmethod** | **str** | The payment method | [optional]
29-
**paymentmethodname** | **str** | The human-readable payment method name | [optional]
3010
**billingcycle** | **str** | The billing cycle | [optional]
3111
**nextduedate** | **str** | The next due date (YYYY-MM-DD, may be 0000-00-00) | [optional]
3212
**status** | **str** | The service status | [optional]
33-
**username** | **str** | The service username | [optional]
34-
**password** | **str** | The service password placeholder | [optional]
35-
**subscriptionid** | **str** | The subscription ID | [optional]
36-
**promoid** | **str** | The promotion ID | [optional]
37-
**overideautosuspend** | **str** | Whether autosuspend is overridden | [optional]
38-
**overidesuspenduntil** | **str** | Suspend override until date | [optional]
39-
**ns1** | **str** | Nameserver 1 | [optional]
40-
**ns2** | **str** | Nameserver 2 | [optional]
41-
**assignedips** | **str** | Assigned IPs | [optional]
42-
**notes** | **str** | Product notes | [optional]
43-
**diskusage** | **str** | Disk usage | [optional]
44-
**disklimit** | **str** | Disk limit | [optional]
45-
**bwusage** | **str** | Bandwidth usage | [optional]
46-
**bwlimit** | **str** | Bandwidth limit | [optional]
47-
**lastupdate** | **str** | Last update timestamp | [optional]
48-
**customfields** | **Dict[str, object]** | Custom field values for the product | [optional]
49-
**configoptions** | **Dict[str, object]** | Configurable option values for the product | [optional]
5013

5114
## Example
5215

0 commit comments

Comments
 (0)