cdek.apps.webhook package¶
- class cdek.apps.webhook.WebhookApp(client: CdekClient)[исходный код]¶
Базовые классы:
AppКласс для работы с webhook
- all() list[WebhookResponse][исходный код]¶
Информация о слушателях webhook
- delete(uuid: str) WebhookDeleteEntityResponse[исходный код]¶
Удаление слушателя webhook
- Args:
uuid: идентификатор слушателя webhook
- Returns:
- WebhookDeleteEntityResponse: объект с информацией о удаленном
слушателе webhook
- get(uuid: str) WebhookUUIDEntityResponse[исходный код]¶
Информация о слушателе webhook
- Args:
uuid: идентификатор слушателя webhook
- Returns:
WebhookUUIDEntityResponse: объект с информацией о слушателе webhook
- set(webhook: WebhookRequest) WebookSetEntityResponse[исходный код]¶
Добавление нового слушателя webhook
- Args:
webhook: объект WebhookRequest с параметрами запроса
- Returns:
WebookSetEntityResponse: объект с информацией о добавленном слушателе webhook
- Raises:
ValueError: если webhook не является объектом WebhookRequest
- class cdek.apps.webhook.WebhookDeleteEntityResponse(*, entity: RootEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на удаление подписки на webhook
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cdek.apps.webhook.WebhookRequest(*, type: WebhookType, url: str)[исходный код]¶
Базовые классы:
BaseModelМодель запроса на добавление подписки на webhook
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: WebhookType¶
- url: str¶
- class cdek.apps.webhook.WebhookResponse(*, uuid: UUID, type: WebhookType, url: str)[исходный код]¶
Базовые классы:
BaseModelМодель ответа о списке webhooks.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: WebhookType¶
- url: str¶
- uuid: UUID¶
- class cdek.apps.webhook.WebhookType(*values)[исходный код]¶
Базовые классы:
str,EnumТипы вебхуков.
- ACCOMPANYING_WAYBILL = 'ACCOMPANYING_WAYBILL'¶
- DELIV_AGREEMENT = 'DELIV_AGREEMENT'¶
- DELIV_PROBLEM = 'DELIV_PROBLEM'¶
- DOWNLOAD_PHOTO = 'DOWNLOAD_PHOTO'¶
- OFFICE_AVAILABILITY = 'OFFICE_AVAILABILITY'¶
- ORDER_MODIFIED = 'ORDER_MODIFIED'¶
- ORDER_STATUS = 'ORDER_STATUS'¶
- PREALERT_CLOSED = 'PREALERT_CLOSED'¶
- PRINT_FORM = 'PRINT_FORM'¶
- RECEIPT = 'RECEIPT'¶
- class cdek.apps.webhook.WebhookUUIDEntityResponse(*, entity: WebhookResponse | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на получение информации о подписке по UUID
- entity: WebhookResponse | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cdek.apps.webhook.WebookSetEntityResponse(*, entity: RootEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на добавление подписки на webhook
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Submodules¶
cdek.apps.webhook.enums module¶
- class cdek.apps.webhook.enums.WebhookType(*values)[исходный код]¶
Базовые классы:
str,EnumТипы вебхуков.
- ACCOMPANYING_WAYBILL = 'ACCOMPANYING_WAYBILL'¶
- DELIV_AGREEMENT = 'DELIV_AGREEMENT'¶
- DELIV_PROBLEM = 'DELIV_PROBLEM'¶
- DOWNLOAD_PHOTO = 'DOWNLOAD_PHOTO'¶
- OFFICE_AVAILABILITY = 'OFFICE_AVAILABILITY'¶
- ORDER_MODIFIED = 'ORDER_MODIFIED'¶
- ORDER_STATUS = 'ORDER_STATUS'¶
- PREALERT_CLOSED = 'PREALERT_CLOSED'¶
- PRINT_FORM = 'PRINT_FORM'¶
- RECEIPT = 'RECEIPT'¶
cdek.apps.webhook.requests module¶
- class cdek.apps.webhook.requests.WebhookRequest(*, type: WebhookType, url: str)[исходный код]¶
Базовые классы:
BaseModelМодель запроса на добавление подписки на webhook
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: WebhookType¶
- url: str¶
cdek.apps.webhook.responses module¶
- class cdek.apps.webhook.responses.WebhookDeleteEntityResponse(*, entity: RootEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на удаление подписки на webhook
- entity: RootEntity | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cdek.apps.webhook.responses.WebhookResponse(*, uuid: UUID, type: WebhookType, url: str)[исходный код]¶
Базовые классы:
BaseModelМодель ответа о списке webhooks.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: WebhookType¶
- url: str¶
- uuid: UUID¶
- class cdek.apps.webhook.responses.WebhookUUIDEntityResponse(*, entity: WebhookResponse | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на получение информации о подписке по UUID
- entity: WebhookResponse | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cdek.apps.webhook.responses.WebookSetEntityResponse(*, entity: RootEntity | None = None, requests: list[Request] | None = None, related_entities: list[RelatedEntity] | None = None)[исходный код]¶
Базовые классы:
EntityResponseОтвет на добавление подписки на webhook
- entity: RootEntity | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
cdek.apps.webhook.webhook module¶
- class cdek.apps.webhook.webhook.WebhookApp(client: CdekClient)[исходный код]¶
Базовые классы:
AppКласс для работы с webhook
- all() list[WebhookResponse][исходный код]¶
Информация о слушателях webhook
- delete(uuid: str) WebhookDeleteEntityResponse[исходный код]¶
Удаление слушателя webhook
- Args:
uuid: идентификатор слушателя webhook
- Returns:
- WebhookDeleteEntityResponse: объект с информацией о удаленном
слушателе webhook
- get(uuid: str) WebhookUUIDEntityResponse[исходный код]¶
Информация о слушателе webhook
- Args:
uuid: идентификатор слушателя webhook
- Returns:
WebhookUUIDEntityResponse: объект с информацией о слушателе webhook
- set(webhook: WebhookRequest) WebookSetEntityResponse[исходный код]¶
Добавление нового слушателя webhook
- Args:
webhook: объект WebhookRequest с параметрами запроса
- Returns:
WebookSetEntityResponse: объект с информацией о добавленном слушателе webhook
- Raises:
ValueError: если webhook не является объектом WebhookRequest