Skip to content

Commit 0f21d3e

Browse files
authored
feat(webhosting): add created at field in hosting summary (#777)
1 parent 41a912d commit 0f21d3e

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

scaleway-async/scaleway_async/webhosting/v1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,12 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary:
430430
if field is not None:
431431
args["region"] = field
432432

433+
field = data.get("created_at", None)
434+
if field is not None:
435+
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field
436+
else:
437+
args["created_at"] = None
438+
433439
field = data.get("updated_at", None)
434440
if field is not None:
435441
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field

scaleway-async/scaleway_async/webhosting/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ class HostingSummary:
315315
Region where the Web Hosting plan is hosted.
316316
"""
317317

318+
created_at: Optional[datetime]
319+
"""
320+
Date on which the Web Hosting plan was created.
321+
"""
322+
318323
updated_at: Optional[datetime]
319324
"""
320325
Date on which the Web Hosting plan was last updated.

scaleway/scaleway/webhosting/v1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,12 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary:
430430
if field is not None:
431431
args["region"] = field
432432

433+
field = data.get("created_at", None)
434+
if field is not None:
435+
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field
436+
else:
437+
args["created_at"] = None
438+
433439
field = data.get("updated_at", None)
434440
if field is not None:
435441
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field

scaleway/scaleway/webhosting/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ class HostingSummary:
315315
Region where the Web Hosting plan is hosted.
316316
"""
317317

318+
created_at: Optional[datetime]
319+
"""
320+
Date on which the Web Hosting plan was created.
321+
"""
322+
318323
updated_at: Optional[datetime]
319324
"""
320325
Date on which the Web Hosting plan was last updated.

0 commit comments

Comments
 (0)