Skip to content

Commit e0fa061

Browse files
committed
Update python SDK from OpenAPI Generator
1 parent ace6d59 commit e0fa061

File tree

7 files changed

+276
-134
lines changed

7 files changed

+276
-134
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.13.0
1+
7.14.0

docs/HelloAssoApiV5ModelsFormsFormQuickCreateRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Name | Type | Description | Notes
4242
**project_target_country** | **str** | 3 letter country code | [optional]
4343
**allow_organism_payer** | **bool** | Whether users are allowed to contribute to this form through an organism (only for donation and crowdfunding). | [optional]
4444
**allow_individual_payer** | **bool** | Whether user are allowed to personally contribute to this form (only for donation and crowdfunding). | [optional]
45+
**display_version** | **int** | The form display version (only for donation). | [optional]
4546
**max_entries** | **int** | Indicates the maximum available entries for the whole form. Null means unlimited entries. | [optional]
4647

4748
## Example

helloasso_python/__init__.py

Lines changed: 244 additions & 120 deletions
Large diffs are not rendered by default.

helloasso_python/api_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ def sanitize_for_serialization(self, obj):
382382
else:
383383
obj_dict = obj.__dict__
384384

385+
if isinstance(obj_dict, list):
386+
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
387+
return self.sanitize_for_serialization(obj_dict)
388+
385389
return {
386390
key: self.sanitize_for_serialization(val)
387391
for key, val in obj_dict.items()

helloasso_python/models/hello_asso_api_v5_models_forms_form_quick_create_request.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ class HelloAssoApiV5ModelsFormsFormQuickCreateRequest(BaseModel):
6969
project_target_country: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=3)]] = Field(default=None, description="3 letter country code", alias="projectTargetCountry")
7070
allow_organism_payer: Optional[StrictBool] = Field(default=None, description="Whether users are allowed to contribute to this form through an organism (only for donation and crowdfunding).", alias="allowOrganismPayer")
7171
allow_individual_payer: Optional[StrictBool] = Field(default=None, description="Whether user are allowed to personally contribute to this form (only for donation and crowdfunding).", alias="allowIndividualPayer")
72+
display_version: Optional[StrictInt] = Field(default=None, description="The form display version (only for donation).", alias="displayVersion")
7273
max_entries: Optional[StrictInt] = Field(default=None, description="Indicates the maximum available entries for the whole form. Null means unlimited entries.", alias="maxEntries")
73-
__properties: ClassVar[List[str]] = ["tierList", "banner", "description", "endDate", "logo", "privateTitle", "startDate", "title", "activityTypeId", "place", "saleEndDate", "saleStartDate", "validityType", "acceptOpenDonation", "acceptOpenMonthlyDonation", "allowComment", "amountVisible", "color", "widgetButtonText", "contact", "displayContributorName", "displayParticipantsCount", "displayRemainingEntries", "financialGoal", "generateMembershipCards", "generateTickets", "invertDescriptions", "labelConditionsAndTermsFile", "longDescription", "openDonationPresetAmounts", "personalizedMessage", "projectBeneficiaries", "projectExpensesDetails", "projectOwners", "projectTargetCountry", "allowOrganismPayer", "allowIndividualPayer", "maxEntries"]
74+
__properties: ClassVar[List[str]] = ["tierList", "banner", "description", "endDate", "logo", "privateTitle", "startDate", "title", "activityTypeId", "place", "saleEndDate", "saleStartDate", "validityType", "acceptOpenDonation", "acceptOpenMonthlyDonation", "allowComment", "amountVisible", "color", "widgetButtonText", "contact", "displayContributorName", "displayParticipantsCount", "displayRemainingEntries", "financialGoal", "generateMembershipCards", "generateTickets", "invertDescriptions", "labelConditionsAndTermsFile", "longDescription", "openDonationPresetAmounts", "personalizedMessage", "projectBeneficiaries", "projectExpensesDetails", "projectOwners", "projectTargetCountry", "allowOrganismPayer", "allowIndividualPayer", "displayVersion", "maxEntries"]
7475

7576
model_config = ConfigDict(
7677
populate_by_name=True,
@@ -229,6 +230,11 @@ def to_dict(self) -> Dict[str, Any]:
229230
if self.project_target_country is None and "project_target_country" in self.model_fields_set:
230231
_dict['projectTargetCountry'] = None
231232

233+
# set to None if display_version (nullable) is None
234+
# and model_fields_set contains the field
235+
if self.display_version is None and "display_version" in self.model_fields_set:
236+
_dict['displayVersion'] = None
237+
232238
# set to None if max_entries (nullable) is None
233239
# and model_fields_set contains the field
234240
if self.max_entries is None and "max_entries" in self.model_fields_set:
@@ -283,6 +289,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
283289
"projectTargetCountry": obj.get("projectTargetCountry"),
284290
"allowOrganismPayer": obj.get("allowOrganismPayer"),
285291
"allowIndividualPayer": obj.get("allowIndividualPayer"),
292+
"displayVersion": obj.get("displayVersion"),
286293
"maxEntries": obj.get("maxEntries")
287294
})
288295
return _obj

pyproject.toml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1-
[tool.poetry]
1+
[project]
22
name = "helloasso_python"
33
version = "1.0.0"
44
description = "HelloAsso API"
5-
authors = ["OpenAPI Generator Community <[email protected]>"]
5+
authors = [
6+
{name = "OpenAPI Generator Community",email = "[email protected]"},
7+
]
68
license = "NoLicense"
79
readme = "README.md"
8-
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
910
keywords = ["OpenAPI", "OpenAPI-Generator", "HelloAsso API"]
10-
include = ["helloasso_python/py.typed"]
11+
requires-python = ">=3.9"
1112

12-
[tool.poetry.dependencies]
13-
python = "^3.9"
13+
dependencies = [
14+
"urllib3 (>=2.1.0,<3.0.0)",
15+
"python-dateutil (>=2.8.2)",
16+
"pydantic (>=2)",
17+
"typing-extensions (>=4.7.1)"
18+
]
1419

15-
urllib3 = ">= 2.1.0, < 3.0.0"
16-
python-dateutil = ">= 2.8.2"
17-
pydantic = ">= 2"
18-
typing-extensions = ">= 4.7.1"
20+
[project.urls]
21+
Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
22+
23+
[tool.poetry]
24+
requires-poetry = ">=2.0"
1925

20-
[tool.poetry.dev-dependencies]
26+
[tool.poetry.group.dev.dependencies]
2127
pytest = ">= 7.2.1"
2228
pytest-cov = ">= 2.8.1"
2329
tox = ">= 3.9.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "helloasso-python"
24-
VERSION = "v1.0.7"
24+
VERSION = "v1.0.8"
2525
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
2727
"urllib3 >= 2.1.0, < 3.0.0",

0 commit comments

Comments
 (0)