Seller Models
Seller models for the Catalog API.
Field shapes ported against ab/api/schemas/catalog.json (swagger,
Tier 3) with ABConnectTools/ABConnect/api/models/catalog.py as
secondary reference. The prior placeholder had an invented
display_id field; swagger defines SellerDto as
{id, name, customerDisplayId, isActive}. Captured
SellerExpandedDto fixtures show the real API also returns an
always-null displayId key not declared in swagger — kept as an
optional field on the response models to absorb the drift without
failing assert_no_extra_fields.
SellerExpandedDto.catalogs is typed against
CatalogDto via a deferred
TYPE_CHECKING import plus _rebuild_seller_models() — mirrors
the pattern used in catalog.py to resolve the
sellers ↔ catalog circular type reference.
- class ab.api.models.sellers.SellerDto(*, id, name=None, customerDisplayId=None, isActive=None, displayId=None, **extra_data)[source]
Bases:
ResponseModelSeller summary — returned by
POST /Seller,PUT /Seller/{id}, and embedded inCatalogWithSellersDto.sellers.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.sellers.SellerExpandedDto(*, id, name=None, customerDisplayId=None, isActive=None, displayId=None, catalogs=None, **extra_data)[source]
Bases:
SellerDtoSeller with embedded catalog associations — returned by
GET /Seller/{id}.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.sellers.AddSellerRequest(*, name=None, customerDisplayId, isActive)[source]
Bases:
RequestModelBody for
POST /Seller.- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.sellers.UpdateSellerRequest(*, name=None, customerDisplayId, isActive)[source]
Bases:
AddSellerRequestBody for
PUT /Seller/{id}. Same shape asAddSellerRequest.- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.sellers.SellerListParams(*, Id=None, Name=None, CustomerDisplayId=None, IsActive=None, PageSize=None, PageNumber=None)[source]
Bases:
RequestModelQuery parameters for
GET /Seller.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].