ssactivewear_sdk.models._base¶
Internal types.
Attributes¶
An integer that may also arrive as a numeric string or an integral float ( |
|
A |
|
A boolean that may also arrive as the string |
|
A string identifier that may also arrive as a number. |
|
A timestamp in ISO 8601 or |
Classes¶
Custom base model for global settings. |
Functions¶
|
Treat an empty string as a missing value. |
|
Accept a number where a string identifier is expected. |
|
Accept ISO 8601 or |
Module Contents¶
- class ssactivewear_sdk.models._base.SSActivewearBaseModel(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelCustom base model for global settings.
Unknown fields are ignored rather than rejected: S&S adds fields to its payloads over time, and a new field must not break parsing of everything else.
- ssactivewear_sdk.models._base._blank_to_none(value: object) object[source]¶
Treat an empty string as a missing value.
- ssactivewear_sdk.models._base._number_to_str(value: object) object[source]¶
Accept a number where a string identifier is expected.
- ssactivewear_sdk.models._base._parse_timestamp(value: object) object[source]¶
Accept ISO 8601 or
MM/DD/YYYY, and a blank string as missing.A value that matches neither format is passed through unchanged so that validation reports it.
- type ssactivewear_sdk.models._base.FlexibleInt = Annotated[int, Strict(strict=False)][source]¶
An integer that may also arrive as a numeric string or an integral float (
-20.00).
- type ssactivewear_sdk.models._base.OptionalFlexibleInt = Annotated[FlexibleInt | None, BeforeValidator(_blank_to_none)][source]¶
A
FlexibleIntthat may also be missing,null, or an empty string.
- type ssactivewear_sdk.models._base.FlexibleBool = Annotated[bool, Strict(strict=False)][source]¶
A boolean that may also arrive as the string
"true"or"false".