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 sellerscatalog circular type reference.

class ab.api.models.sellers.SellerDto(*, id, name=None, customerDisplayId=None, isActive=None, displayId=None, **extra_data)[source]

Bases: ResponseModel

Seller summary — returned by POST /Seller, PUT /Seller/{id}, and embedded in CatalogWithSellersDto.sellers.

Parameters:
  • id (int)

  • name (str | None)

  • customerDisplayId (int | None)

  • isActive (bool | None)

  • displayId (str | None)

  • extra_data (Any)

id: int
name: str | None
customer_display_id: int | None
is_active: bool | None
display_id: str | None
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: SellerDto

Seller with embedded catalog associations — returned by GET /Seller/{id}.

Parameters:
catalogs: List['CatalogDto'] | None
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: RequestModel

Body for POST /Seller.

Parameters:
  • name (str | None)

  • customerDisplayId (int)

  • isActive (bool)

name: str | None
customer_display_id: int
is_active: bool
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: AddSellerRequest

Body for PUT /Seller/{id}. Same shape as AddSellerRequest.

Parameters:
  • name (str | None)

  • customerDisplayId (int)

  • isActive (bool)

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: RequestModel

Query parameters for GET /Seller.

Parameters:
  • Id (int | None)

  • Name (str | None)

  • CustomerDisplayId (int | None)

  • IsActive (bool | None)

  • PageSize (int | None)

  • PageNumber (int | None)

id: int | None
name: str | None
customer_display_id: int | None
is_active: bool | None
page_size: int | None
page_number: int | None
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].