Skip to content

Commit 87f3eff

Browse files
committed
fix(sdk): fix type mismatches causing deserialization failures from WHMCS API
WHMCS returns all DB-sourced fields as strings (PHP/MySQL PDO default). Previous spec used strict types and complex schemas that caused Pydantic ValidationError on every invoice/client/product response, silently producing zero profiles. Changes to openapi.yaml: - ClientDetailsInfo: stripped to email + phonenumber only (removed booleans, integers, EmailPreferences ref, customfields, users) - InvoiceInfo: removed paymethodid (returned as int, typed as string), changed duedate/date fields from format:date to type:string to handle WHMCS "0000-00-00" edge case - ProductInfo: all fields typed as string (WHMCS returns IDs as strings) - Removed EmailPreferences, CustomFieldValue, UserCollection, UserInfo schemas entirely — not used by consumers, caused StrictStr rejection - ClientDetailsStats: reduced to bare additionalProperties object Bump packageVersion to 1.0.15. Regenerate all SDK files via Docker.
1 parent 9e61666 commit 87f3eff

File tree

67 files changed

+785
-4212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+785
-4212
lines changed

.openapi-generator/FILES

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,11 @@ README.md
66
docs/AddClientResponse.md
77
docs/AddOrderResponse.md
88
docs/ClientDetailsInfo.md
9-
docs/ClientDetailsInfoAllowSingleSignOn.md
10-
docs/ClientDetailsInfoCustomfields.md
11-
docs/ClientDetailsStats.md
129
docs/ClientInfo.md
1310
docs/CurrencyInfo.md
14-
docs/CustomFieldValue.md
15-
docs/CustomFieldValueId.md
1611
docs/DefaultApi.md
17-
docs/EmailPreferences.md
1812
docs/GetClientsDetailsResponse.md
1913
docs/GetClientsProductsResponse.md
20-
docs/GetClientsProductsResponseAllOfClientid.md
21-
docs/GetClientsProductsResponseAllOfPid.md
22-
docs/GetClientsProductsResponseAllOfServiceid.md
2314
docs/GetClientsResponse.md
2415
docs/GetClientsResponseAllOfClients.md
2516
docs/GetCurrenciesResponse.md
@@ -28,21 +19,10 @@ docs/GetInvoicesResponse.md
2819
docs/InvoiceCollection.md
2920
docs/InvoiceCollectionInvoice.md
3021
docs/InvoiceInfo.md
31-
docs/InvoiceInfoPaymethodid.md
3222
docs/ProductCollection.md
3323
docs/ProductCollectionProduct.md
3424
docs/ProductInfo.md
35-
docs/ProductInfoClientid.md
36-
docs/ProductInfoId.md
37-
docs/ProductInfoOrderid.md
38-
docs/ProductInfoPid.md
39-
docs/ProductInfoPromoid.md
40-
docs/ProductInfoQty.md
41-
docs/ProductInfoServerid.md
4225
docs/UpdateClientResponse.md
43-
docs/UserCollection.md
44-
docs/UserCollectionUser.md
45-
docs/UserInfo.md
4626
docs/WHMCSBaseResponse.md
4727
docs/WHMCSErrorResponse.md
4828
docs/WHMCSSuccessResponse.md
@@ -53,36 +33,6 @@ setup.cfg
5333
setup.py
5434
test-requirements.txt
5535
test/__init__.py
56-
test/test_client_details_info.py
57-
test/test_client_details_info_allow_single_sign_on.py
58-
test/test_client_details_info_customfields.py
59-
test/test_client_details_stats.py
60-
test/test_custom_field_value.py
61-
test/test_custom_field_value_id.py
62-
test/test_email_preferences.py
63-
test/test_get_clients_details_response.py
64-
test/test_get_clients_products_response.py
65-
test/test_get_clients_products_response_all_of_clientid.py
66-
test/test_get_clients_products_response_all_of_pid.py
67-
test/test_get_clients_products_response_all_of_serviceid.py
68-
test/test_get_invoices_response.py
69-
test/test_invoice_collection.py
70-
test/test_invoice_collection_invoice.py
71-
test/test_invoice_info.py
72-
test/test_invoice_info_paymethodid.py
73-
test/test_product_collection.py
74-
test/test_product_collection_product.py
75-
test/test_product_info.py
76-
test/test_product_info_clientid.py
77-
test/test_product_info_id.py
78-
test/test_product_info_orderid.py
79-
test/test_product_info_pid.py
80-
test/test_product_info_promoid.py
81-
test/test_product_info_qty.py
82-
test/test_product_info_serverid.py
83-
test/test_user_collection.py
84-
test/test_user_collection_user.py
85-
test/test_user_info.py
8636
tox.ini
8737
whmcs_client/__init__.py
8838
whmcs_client/api/__init__.py
@@ -95,19 +45,10 @@ whmcs_client/models/__init__.py
9545
whmcs_client/models/add_client_response.py
9646
whmcs_client/models/add_order_response.py
9747
whmcs_client/models/client_details_info.py
98-
whmcs_client/models/client_details_info_allow_single_sign_on.py
99-
whmcs_client/models/client_details_info_customfields.py
100-
whmcs_client/models/client_details_stats.py
10148
whmcs_client/models/client_info.py
10249
whmcs_client/models/currency_info.py
103-
whmcs_client/models/custom_field_value.py
104-
whmcs_client/models/custom_field_value_id.py
105-
whmcs_client/models/email_preferences.py
10650
whmcs_client/models/get_clients_details_response.py
10751
whmcs_client/models/get_clients_products_response.py
108-
whmcs_client/models/get_clients_products_response_all_of_clientid.py
109-
whmcs_client/models/get_clients_products_response_all_of_pid.py
110-
whmcs_client/models/get_clients_products_response_all_of_serviceid.py
11152
whmcs_client/models/get_clients_response.py
11253
whmcs_client/models/get_clients_response_all_of_clients.py
11354
whmcs_client/models/get_currencies_response.py
@@ -116,21 +57,10 @@ whmcs_client/models/get_invoices_response.py
11657
whmcs_client/models/invoice_collection.py
11758
whmcs_client/models/invoice_collection_invoice.py
11859
whmcs_client/models/invoice_info.py
119-
whmcs_client/models/invoice_info_paymethodid.py
12060
whmcs_client/models/product_collection.py
12161
whmcs_client/models/product_collection_product.py
12262
whmcs_client/models/product_info.py
123-
whmcs_client/models/product_info_clientid.py
124-
whmcs_client/models/product_info_id.py
125-
whmcs_client/models/product_info_orderid.py
126-
whmcs_client/models/product_info_pid.py
127-
whmcs_client/models/product_info_promoid.py
128-
whmcs_client/models/product_info_qty.py
129-
whmcs_client/models/product_info_serverid.py
13063
whmcs_client/models/update_client_response.py
131-
whmcs_client/models/user_collection.py
132-
whmcs_client/models/user_collection_user.py
133-
whmcs_client/models/user_info.py
13464
whmcs_client/models/whmcs_base_response.py
13565
whmcs_client/models/whmcs_error_response.py
13666
whmcs_client/models/whmcs_success_response.py

README.md

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

@@ -133,19 +133,10 @@ Class | Method | HTTP request | Description
133133
- [AddClientResponse](docs/AddClientResponse.md)
134134
- [AddOrderResponse](docs/AddOrderResponse.md)
135135
- [ClientDetailsInfo](docs/ClientDetailsInfo.md)
136-
- [ClientDetailsInfoAllowSingleSignOn](docs/ClientDetailsInfoAllowSingleSignOn.md)
137-
- [ClientDetailsInfoCustomfields](docs/ClientDetailsInfoCustomfields.md)
138-
- [ClientDetailsStats](docs/ClientDetailsStats.md)
139136
- [ClientInfo](docs/ClientInfo.md)
140137
- [CurrencyInfo](docs/CurrencyInfo.md)
141-
- [CustomFieldValue](docs/CustomFieldValue.md)
142-
- [CustomFieldValueId](docs/CustomFieldValueId.md)
143-
- [EmailPreferences](docs/EmailPreferences.md)
144138
- [GetClientsDetailsResponse](docs/GetClientsDetailsResponse.md)
145139
- [GetClientsProductsResponse](docs/GetClientsProductsResponse.md)
146-
- [GetClientsProductsResponseAllOfClientid](docs/GetClientsProductsResponseAllOfClientid.md)
147-
- [GetClientsProductsResponseAllOfPid](docs/GetClientsProductsResponseAllOfPid.md)
148-
- [GetClientsProductsResponseAllOfServiceid](docs/GetClientsProductsResponseAllOfServiceid.md)
149140
- [GetClientsResponse](docs/GetClientsResponse.md)
150141
- [GetClientsResponseAllOfClients](docs/GetClientsResponseAllOfClients.md)
151142
- [GetCurrenciesResponse](docs/GetCurrenciesResponse.md)
@@ -154,21 +145,10 @@ Class | Method | HTTP request | Description
154145
- [InvoiceCollection](docs/InvoiceCollection.md)
155146
- [InvoiceCollectionInvoice](docs/InvoiceCollectionInvoice.md)
156147
- [InvoiceInfo](docs/InvoiceInfo.md)
157-
- [InvoiceInfoPaymethodid](docs/InvoiceInfoPaymethodid.md)
158148
- [ProductCollection](docs/ProductCollection.md)
159149
- [ProductCollectionProduct](docs/ProductCollectionProduct.md)
160150
- [ProductInfo](docs/ProductInfo.md)
161-
- [ProductInfoClientid](docs/ProductInfoClientid.md)
162-
- [ProductInfoId](docs/ProductInfoId.md)
163-
- [ProductInfoOrderid](docs/ProductInfoOrderid.md)
164-
- [ProductInfoPid](docs/ProductInfoPid.md)
165-
- [ProductInfoPromoid](docs/ProductInfoPromoid.md)
166-
- [ProductInfoQty](docs/ProductInfoQty.md)
167-
- [ProductInfoServerid](docs/ProductInfoServerid.md)
168151
- [UpdateClientResponse](docs/UpdateClientResponse.md)
169-
- [UserCollection](docs/UserCollection.md)
170-
- [UserCollectionUser](docs/UserCollectionUser.md)
171-
- [UserInfo](docs/UserInfo.md)
172152
- [WHMCSBaseResponse](docs/WHMCSBaseResponse.md)
173153
- [WHMCSErrorResponse](docs/WHMCSErrorResponse.md)
174154
- [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.14",
4+
"packageVersion": "1.0.15",
55
"packageUrl": "https://github.com/truehostcloud/whmcs-python-client",
66
"packageCompany": "Truehost",
77
"packageAuthor": "William Mwai",

docs/ClientDetailsInfo.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,8 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**client_id** | **int** | The client ID | [optional]
9-
**owner_user_id** | **int** | The owning user ID | [optional]
10-
**userid** | **int** | The client ID alias | [optional]
11-
**id** | **int** | The client ID | [optional]
12-
**uuid** | **str** | The client UUID | [optional]
13-
**firstname** | **str** | The client first name | [optional]
14-
**lastname** | **str** | The client last name | [optional]
15-
**fullname** | **str** | The client full name | [optional]
16-
**companyname** | **str** | The client company name | [optional]
178
**email** | **str** | The client email address | [optional]
18-
**address1** | **str** | Address line 1 | [optional]
19-
**address2** | **str** | Address line 2 | [optional]
20-
**city** | **str** | City | [optional]
21-
**fullstate** | **str** | Full state name | [optional]
22-
**state** | **str** | State code or value | [optional]
23-
**postcode** | **str** | Post code | [optional]
24-
**countrycode** | **str** | Country code | [optional]
25-
**country** | **str** | Country | [optional]
269
**phonenumber** | **str** | Phone number | [optional]
27-
**tax_id** | **str** | Tax ID | [optional]
28-
**email_preferences** | [**EmailPreferences**](EmailPreferences.md) | | [optional]
29-
**statecode** | **str** | State code | [optional]
30-
**countryname** | **str** | Country name | [optional]
31-
**phonecc** | **str** | Phone country code | [optional]
32-
**phonenumberformatted** | **str** | Formatted phone number | [optional]
33-
**telephone_number** | **str** | Alternate formatted phone number | [optional]
34-
**billingcid** | **int** | Billing contact ID | [optional]
35-
**notes** | **str** | Admin notes | [optional]
36-
**currency** | **int** | Currency ID | [optional]
37-
**defaultgateway** | **str** | Default gateway | [optional]
38-
**groupid** | **int** | Group ID | [optional]
39-
**status** | **str** | Client status | [optional]
40-
**credit** | **str** | Credit balance | [optional]
41-
**taxexempt** | **bool** | Whether the client is tax exempt | [optional]
42-
**latefeeoveride** | **bool** | Whether late fees are overridden | [optional]
43-
**overideduenotices** | **bool** | Whether due notices are overridden | [optional]
44-
**separateinvoices** | **bool** | Whether invoices are separated | [optional]
45-
**disableautocc** | **bool** | Whether auto credit card processing is disabled | [optional]
46-
**emailoptout** | **bool** | Whether the client has opted out of emails | [optional]
47-
**marketing_emails_opt_in** | **bool** | Whether the client has opted in to marketing emails | [optional]
48-
**overrideautoclose** | **bool** | Whether auto close is overridden | [optional]
49-
**allow_single_sign_on** | [**ClientDetailsInfoAllowSingleSignOn**](ClientDetailsInfoAllowSingleSignOn.md) | | [optional]
50-
**email_verified** | **bool** | Whether the email is verified | [optional]
51-
**language** | **str** | Preferred language | [optional]
52-
**is_opted_in_to_marketing_emails** | **bool** | Alternate marketing opt-in flag | [optional]
53-
**lastlogin** | **str** | Last login summary | [optional]
54-
**currency_code** | **str** | Currency code | [optional]
55-
**customfields** | [**ClientDetailsInfoCustomfields**](ClientDetailsInfoCustomfields.md) | | [optional]
56-
**users** | [**UserCollection**](UserCollection.md) | | [optional]
5710

5811
## Example
5912

docs/ClientInfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**lastname** | **str** | The client's last name | [optional]
1111
**companyname** | **str** | The client's company name | [optional]
1212
**email** | **str** | The client's email address | [optional]
13-
**datecreated** | **date** | The date the client was created | [optional]
13+
**datecreated** | **str** | The date the client was created (YYYY-MM-DD, may be 0000-00-00) | [optional]
1414
**groupid** | **int** | The client's group ID | [optional]
1515
**status** | **str** | The client's status (Active, Inactive, Closed) | [optional]
1616

docs/CustomFieldValue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**id** | [**CustomFieldValueId**](CustomFieldValueId.md) | | [optional]
8+
**id** | **int** | Custom field ID | [optional]
99
**value** | **str** | Custom field value | [optional]
1010

1111
## Example

docs/EmailPreferences.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**general** | **str** | | [optional]
9-
**invoice** | **str** | | [optional]
10-
**support** | **str** | | [optional]
11-
**product** | **str** | | [optional]
12-
**domain** | **str** | | [optional]
13-
**affiliate** | **str** | | [optional]
8+
**general** | **int** | General email preference flag (0 or 1) | [optional]
9+
**invoice** | **int** | Invoice email preference flag (0 or 1) | [optional]
10+
**support** | **int** | Support email preference flag (0 or 1) | [optional]
11+
**product** | **int** | Product email preference flag (0 or 1) | [optional]
12+
**domain** | **int** | Domain email preference flag (0 or 1) | [optional]
13+
**affiliate** | **int** | Affiliate email preference flag (0 or 1) | [optional]
1414

1515
## Example
1616

docs/EmailPreferencesAffiliate.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EmailPreferencesAffiliate
2+
3+
Affiliate email preference flag (WHMCS may return 0/1 integers)
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.email_preferences_affiliate import EmailPreferencesAffiliate
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of EmailPreferencesAffiliate from a JSON string
18+
email_preferences_affiliate_instance = EmailPreferencesAffiliate.from_json(json)
19+
# print the JSON string representation of the object
20+
print(EmailPreferencesAffiliate.to_json())
21+
22+
# convert the object into a dict
23+
email_preferences_affiliate_dict = email_preferences_affiliate_instance.to_dict()
24+
# create an instance of EmailPreferencesAffiliate from a dict
25+
email_preferences_affiliate_from_dict = EmailPreferencesAffiliate.from_dict(email_preferences_affiliate_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/EmailPreferencesDomain.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EmailPreferencesDomain
2+
3+
Domain email preference flag (WHMCS may return 0/1 integers)
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.email_preferences_domain import EmailPreferencesDomain
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of EmailPreferencesDomain from a JSON string
18+
email_preferences_domain_instance = EmailPreferencesDomain.from_json(json)
19+
# print the JSON string representation of the object
20+
print(EmailPreferencesDomain.to_json())
21+
22+
# convert the object into a dict
23+
email_preferences_domain_dict = email_preferences_domain_instance.to_dict()
24+
# create an instance of EmailPreferencesDomain from a dict
25+
email_preferences_domain_from_dict = EmailPreferencesDomain.from_dict(email_preferences_domain_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/EmailPreferencesGeneral.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EmailPreferencesGeneral
2+
3+
General email preference flag (WHMCS may return 0/1 integers)
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from whmcs_client.models.email_preferences_general import EmailPreferencesGeneral
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of EmailPreferencesGeneral from a JSON string
18+
email_preferences_general_instance = EmailPreferencesGeneral.from_json(json)
19+
# print the JSON string representation of the object
20+
print(EmailPreferencesGeneral.to_json())
21+
22+
# convert the object into a dict
23+
email_preferences_general_dict = email_preferences_general_instance.to_dict()
24+
# create an instance of EmailPreferencesGeneral from a dict
25+
email_preferences_general_from_dict = EmailPreferencesGeneral.from_dict(email_preferences_general_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)