cdek.apps.intake package

class cdek.apps.intake.IntakeApp(client: CdekClient)[исходный код]

Базовые классы: App

Класс для работы с заявками на вызов курьера

create(intake: IntakeRequest) EntityResponse[исходный код]

Создание заявки на вызов курьера

Args:

intake (IntakeRequest): объект с информацией о заявке на вызов курьера

Returns:

EntityResponse: объект с информацией о созданной заявке

Raises:

ValueError: если intake не является объектом IntakeRequest

delete(uuid: str) EntityResponse[исходный код]

Удаление заявки на вызов курьера

Args:

uuid (str): идентификатор заявки на вызов курьера

Returns:

EntityResponse: объект с информацией о удаленной заявке

get(uuid: str) IntakeEntityResponse[исходный код]

Информация о заявке на вызов курьера

Args:

uuid (str): идентификатор заявки на вызов курьера

Returns:

IntakeEntityResponse: объект с информацией о заявке на вызов курьера

get_call_dates(date_request: IntakeDateFilter) IntakeDateResponse[исходный код]

Получить доступные даты вызова курьера

Args:
date_request (IntakeDateFilter): фильтр для получения

доступных дат вызова курьера

Returns:

IntakeDateResponse: объект с информацией о доступных датах вызова курьера

Raises:

ValueError: если date_request не является объектом IntakeDateFilter

update(intake: IntakeFilter) EntityResponse[исходный код]

Изменить параметры существующей заявки

Args:

intake (IntakeFilter): фильтр для изменения параметров существующей заявки

Returns:

EntityResponse: объект с информацией о измененной заявке

Raises:

ValueError: если intake не является объектом IntakeFilter

class cdek.apps.intake.IntakeDateFilter(*, from_location: IntakeLocation, date: date)[исходный код]

Базовые классы: BaseModel

date: Date
from_location: IntakeLocation
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

serialize_date(date: date) str[исходный код]

Представить дату фильтра в формате YYYY-MM-DD

class cdek.apps.intake.IntakeDateResponse(*, date: list[date], all_days: bool | None = None, errors: list[Error] | None = None, warnings: list[WarningModel] | None = None)[исходный код]

Базовые классы: BaseModel

all_days: bool | None
date: list[Date]
errors: list[Error] | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

warnings: list[WarningModel] | None
class cdek.apps.intake.IntakeEntityResponse(*, entity: IntakesEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]

Базовые классы: EntityResponse

entity: IntakesEntity | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cdek.apps.intake.IntakeFilter(*, uuid: UUID, status: IntakeStatus)[исходный код]

Базовые классы: BaseModel

Фильтр для заявок на вызов курьера

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: IntakeStatus
uuid: UUID
class cdek.apps.intake.IntakeLocation(*, postal_code: str | None = None, longitude: float | None = None, latitude: float | None = None, region: str | None = None, region_code: int | None = None, kladr_region_code: str | None = None, sub_region: str | None = None, code: int | None = None, city: str | None = None, fias_guid: UUID | None = None, address: str | None = None, city_uuid: str | None = None)[исходный код]

Базовые классы: Region, Coordinates, Zip

address: str | None
city: str | None
city_uuid: str | None
code: int | None
fias_guid: UUID | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

region: str | None
class cdek.apps.intake.IntakePackage(*, package_id: UUID | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None)[исходный код]

Базовые классы: BaseModel

height: int | None
length: int | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

package_id: UUID | None
weight: int | None
width: int | None
class cdek.apps.intake.IntakeRequest(*, cdek_number: str | None = None, order_uuid: UUID | None = None, intake_date: date, intake_time_from: str, intake_time_to: str, lunch_time_from: str | None = None, lunch_time_to: str | None = None, name: str | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None, comment: str | None = None, courier_power_of_attorney: bool | None = None, courier_identity_card: bool | None = None, sender: Contact | None = None, from_location: IntakeLocation | None = None, need_call: bool = False)[исходный код]

Базовые классы: Intakes

lunch_time_from: str | None
lunch_time_to: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cdek.apps.intake.IntakeStatus(*, code: str, add_status: str)[исходный код]

Базовые классы: BaseModel

add_status: str
code: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cdek.apps.intake.IntakesEntity(*, uuid: UUID, intake_number: Annotated[str | None, MaxLen(max_length=255)] = None, to_location: IntakeLocation | None = None, statuses: list[Status] | None = None, packages: list[IntakePackage] | None = None, contragent_uuid: UUID | None = None)[исходный код]

Базовые классы: BaseModel

contragent_uuid: UUID | None
intake_number: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

order_uuid: UUID
packages: list[IntakePackage] | None
statuses: list[Status] | None
to_location: IntakeLocation | None
class cdek.apps.intake.IntakesResponse(*, cdek_number: str | None = None, order_uuid: UUID | None = None, intake_date: date, intake_time_from: str, intake_time_to: str, lunch_time_from: str, lunch_time_to: str, name: str | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None, comment: str | None = None, courier_power_of_attorney: bool | None = None, courier_identity_card: bool | None = None, sender: Contact | None = None, from_location: IntakeLocation | None = None, need_call: bool = False)[исходный код]

Базовые классы: Intakes

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Submodules

cdek.apps.intake.filters module

class cdek.apps.intake.filters.IntakeDateFilter(*, from_location: IntakeLocation, date: date)[исходный код]

Базовые классы: BaseModel

date: Date
from_location: IntakeLocation
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

serialize_date(date: date) str[исходный код]

Представить дату фильтра в формате YYYY-MM-DD

class cdek.apps.intake.filters.IntakeFilter(*, uuid: UUID, status: IntakeStatus)[исходный код]

Базовые классы: BaseModel

Фильтр для заявок на вызов курьера

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: IntakeStatus
uuid: UUID
class cdek.apps.intake.filters.IntakeLocation(*, postal_code: str | None = None, longitude: float | None = None, latitude: float | None = None, region: str | None = None, region_code: int | None = None, kladr_region_code: str | None = None, sub_region: str | None = None, code: int | None = None, city: str | None = None, fias_guid: UUID | None = None, address: str | None = None, city_uuid: str | None = None)[исходный код]

Базовые классы: Region, Coordinates, Zip

address: str | None
city: str | None
city_uuid: str | None
code: int | None
fias_guid: UUID | None
kladr_region_code: str | None
latitude: float | None
longitude: float | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postal_code: str | None
region: str | None
region_code: int | None
sub_region: str | None
class cdek.apps.intake.filters.IntakeStatus(*, code: str, add_status: str)[исходный код]

Базовые классы: BaseModel

add_status: str
code: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

cdek.apps.intake.intake module

class cdek.apps.intake.intake.IntakeApp(client: CdekClient)[исходный код]

Базовые классы: App

Класс для работы с заявками на вызов курьера

create(intake: IntakeRequest) EntityResponse[исходный код]

Создание заявки на вызов курьера

Args:

intake (IntakeRequest): объект с информацией о заявке на вызов курьера

Returns:

EntityResponse: объект с информацией о созданной заявке

Raises:

ValueError: если intake не является объектом IntakeRequest

delete(uuid: str) EntityResponse[исходный код]

Удаление заявки на вызов курьера

Args:

uuid (str): идентификатор заявки на вызов курьера

Returns:

EntityResponse: объект с информацией о удаленной заявке

get(uuid: str) IntakeEntityResponse[исходный код]

Информация о заявке на вызов курьера

Args:

uuid (str): идентификатор заявки на вызов курьера

Returns:

IntakeEntityResponse: объект с информацией о заявке на вызов курьера

get_call_dates(date_request: IntakeDateFilter) IntakeDateResponse[исходный код]

Получить доступные даты вызова курьера

Args:
date_request (IntakeDateFilter): фильтр для получения

доступных дат вызова курьера

Returns:

IntakeDateResponse: объект с информацией о доступных датах вызова курьера

Raises:

ValueError: если date_request не является объектом IntakeDateFilter

update(intake: IntakeFilter) EntityResponse[исходный код]

Изменить параметры существующей заявки

Args:

intake (IntakeFilter): фильтр для изменения параметров существующей заявки

Returns:

EntityResponse: объект с информацией о измененной заявке

Raises:

ValueError: если intake не является объектом IntakeFilter

cdek.apps.intake.requests module

class cdek.apps.intake.requests.IntakeRequest(*, cdek_number: str | None = None, order_uuid: UUID | None = None, intake_date: date, intake_time_from: str, intake_time_to: str, lunch_time_from: str | None = None, lunch_time_to: str | None = None, name: str | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None, comment: str | None = None, courier_power_of_attorney: bool | None = None, courier_identity_card: bool | None = None, sender: Contact | None = None, from_location: IntakeLocation | None = None, need_call: bool = False)[исходный код]

Базовые классы: Intakes

cdek_number: str | None
comment: str | None
courier_identity_card: bool | None
courier_power_of_attorney: bool | None
from_location: IntakeLocation | None
height: int | None
intake_date: Date
intake_time_from: str
intake_time_to: str
length: int | None
lunch_time_from: str | None
lunch_time_to: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
need_call: bool
order_uuid: UUID | None
sender: Contact | None
weight: int | None
width: int | None

cdek.apps.intake.responses module

class cdek.apps.intake.responses.IntakeDateResponse(*, date: list[date], all_days: bool | None = None, errors: list[Error] | None = None, warnings: list[WarningModel] | None = None)[исходный код]

Базовые классы: BaseModel

all_days: bool | None
date: list[Date]
errors: list[Error] | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

warnings: list[WarningModel] | None
class cdek.apps.intake.responses.IntakeEntityResponse(*, entity: IntakesEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]

Базовые классы: EntityResponse

entity: IntakesEntity | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

related_entities: list[RelatedEntity] | None
requests: list[Request] | None
class cdek.apps.intake.responses.IntakePackage(*, package_id: UUID | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None)[исходный код]

Базовые классы: BaseModel

height: int | None
length: int | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

package_id: UUID | None
weight: int | None
width: int | None
class cdek.apps.intake.responses.IntakesEntity(*, uuid: UUID, intake_number: Annotated[str | None, MaxLen(max_length=255)] = None, to_location: IntakeLocation | None = None, statuses: list[Status] | None = None, packages: list[IntakePackage] | None = None, contragent_uuid: UUID | None = None)[исходный код]

Базовые классы: BaseModel

contragent_uuid: UUID | None
intake_number: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

order_uuid: UUID
packages: list[IntakePackage] | None
statuses: list[Status] | None
to_location: IntakeLocation | None
class cdek.apps.intake.responses.IntakesResponse(*, cdek_number: str | None = None, order_uuid: UUID | None = None, intake_date: date, intake_time_from: str, intake_time_to: str, lunch_time_from: str, lunch_time_to: str, name: str | None = None, weight: int | None = None, length: int | None = None, width: int | None = None, height: int | None = None, comment: str | None = None, courier_power_of_attorney: bool | None = None, courier_identity_card: bool | None = None, sender: Contact | None = None, from_location: IntakeLocation | None = None, need_call: bool = False)[исходный код]

Базовые классы: Intakes

cdek_number: str | None
comment: str | None
courier_identity_card: bool | None
courier_power_of_attorney: bool | None
from_location: IntakeLocation | None
height: int | None
intake_date: Date
intake_time_from: str
intake_time_to: str
length: int | None
lunch_time_from: str
lunch_time_to: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
need_call: bool
order_uuid: UUID | None
sender: Contact | None
weight: int | None
width: int | None