API Clientinin¶
Note
İstifadəsi göstərilən bütün sorğular sinxrondur. Asinxron versiyalarını istifadə etmək üçün
bu importu edin və eyni-adlı funksiyaları await ilə çağırın:
from integrify.ecustoms import ECustomsAsyncClient
integrify.ecustoms.client.ECustomsClient
module-attribute
¶
ECustomsClient = ECustomsClientClass(sync=True)
integrify.ecustoms.client.ECustomsAsyncClient
module-attribute
¶
ECustomsAsyncClient = ECustomsClientClass(sync=False)
Note
Bunlar artıq hazır yaradılmış klass obyektləridir, birbaşa istifadə üçün nəzərdə tutulub. Əks halda
bütün sorğuları ECustomsClientClass().declare() kimi istifadə etməlisiniz.
integrify.ecustoms.client.ECustomsClientClass
¶
ECustomsClientClass(
name='ECustoms',
base_url=BASE_URL,
default_handler=None,
sync=True,
dry=False,
lang=ECUSTOMS_LANG,
)
Bases: APIClient, Generic[_Mode]
E-Customs (DGK Carriers V4) sorğuları üçün baza class
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Klient adı. Logging üçün istifadə olunur.
DEFAULT:
|
base_url
|
API-nin əsas (kök) url-i.
DEFAULT:
|
default_handler
|
Default API handler.
DEFAULT:
|
sync
|
Sync (True) və ya Async (False) klient seçimi.
DEFAULT:
|
dry
|
Sorğu göndərmək əvəzinə göndəriləcək datanı qaytarmaq üçün.
DEFAULT:
|
lang
|
Cavabların (xüsusilə xəta mesajlarının) dili (
TYPE:
|
ping
¶
ping() -> APIResponse[dict]
ping() -> Coroutine[Any, Any, APIResponse[dict]]
ping(*args, **kwds)
declare
¶
declare(
packages: list[CarriersMainData | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
declare(
packages: list[CarriersMainData | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
declare(*args, **kwds)
update_declared
¶
update_declared(
packages: list[CarriersEditData | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
update_declared(
packages: list[CarriersEditData | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
update_declared(*args, **kwds)
declare_commercial
¶
declare_commercial(
packages: list[
CarriersCommercialPostData | dict[str, Any]
],
) -> APIResponse[BaseResponseSchema]
declare_commercial(
packages: list[
CarriersCommercialPostData | dict[str, Any]
],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
declare_commercial(*args, **kwds)
declare_azerpost
¶
declare_azerpost(
packages: list[CarriersAzerPostData | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
declare_azerpost(
packages: list[CarriersAzerPostData | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
declare_azerpost(*args, **kwds)
remove_declared
¶
remove_declared(
tracking_id: str,
) -> APIResponse[BaseResponseSchema]
remove_declared(
tracking_id: str,
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
remove_declared(*args, **kwds)
get_company_declared
¶
get_company_declared(
offset: int,
limit: int,
date_from: Unset[str] = UNSET,
date_to: Unset[str] = UNSET,
document_number: Unset[str] = UNSET,
tracking_number: Unset[str] = UNSET,
status: Unset[str] = UNSET,
package_type: Unset[PackageType] = UNSET,
) -> APIResponse[list[CarriersFullDataSchema]]
get_company_declared(
offset: int,
limit: int,
date_from: Unset[str] = UNSET,
date_to: Unset[str] = UNSET,
document_number: Unset[str] = UNSET,
tracking_number: Unset[str] = UNSET,
status: Unset[str] = UNSET,
package_type: Unset[PackageType] = UNSET,
) -> Coroutine[
Any, Any, APIResponse[list[CarriersFullDataSchema]]
]
get_company_declared(*args, **kwds)
get_airwaybill_packages
¶
get_airwaybill_packages(
air_waybill: str, depesh_number: Unset[str] = UNSET
) -> APIResponse[list[CarriersDepeshInfoSchema]]
get_airwaybill_packages(
air_waybill: str, depesh_number: Unset[str] = UNSET
) -> Coroutine[
Any, Any, APIResponse[list[CarriersDepeshInfoSchema]]
]
get_airwaybill_packages(*args, **kwds)
get_customs_operations
¶
get_customs_operations(
airwaybill: str,
) -> APIResponse[AirwaybillOperationsSchema]
get_customs_operations(
airwaybill: str,
) -> Coroutine[
Any, Any, APIResponse[AirwaybillOperationsSchema]
]
get_customs_operations(*args, **kwds)
get_user_declared
¶
get_user_declared(*args, **kwds)
get_user_deleted
¶
get_user_deleted(*args, **kwds)
approve_search
¶
approve_search(
declarations: list[DeclarationRef | dict[str, Any]],
*,
data_type: CarriersDataType,
) -> APIResponse[BaseResponseSchema]
approve_search(
declarations: list[DeclarationRef | dict[str, Any]],
*,
data_type: CarriersDataType,
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
approve_search(*args, **kwds)
add_to_box
¶
add_to_box(
parcels: list[CarriersParcelAccept | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
add_to_box(
parcels: list[CarriersParcelAccept | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
add_to_box(*args, **kwds)
cancel_add_to_box
¶
cancel_add_to_box(
parcels: list[CarriersParcel | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
cancel_add_to_box(
parcels: list[CarriersParcel | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
cancel_add_to_box(*args, **kwds)
depesh
¶
depesh(
parcels: list[DepeshParcel | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
depesh(
parcels: list[DepeshParcel | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
depesh(*args, **kwds)
cancel_depesh
¶
cancel_depesh(
parcels: list[CarriersParcel | dict[str, Any]],
) -> APIResponse[BaseResponseSchema]
cancel_depesh(
parcels: list[CarriersParcel | dict[str, Any]],
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
cancel_depesh(*args, **kwds)
goods_group_list
¶
goods_group_list() -> APIResponse[list[GoodsGroupSchema]]
goods_group_list() -> Coroutine[
Any, Any, APIResponse[list[GoodsGroupSchema]]
]
goods_group_list(*args, **kwds)
declare_as_user
¶
declare_as_user(
declaration_number: Unset[str] = UNSET,
receiver: Unset[PersonalInfo | dict[str, Any]] = UNSET,
sender: Unset[Sender | dict[str, Any]] = UNSET,
goods_list: Unset[
list[ECommerceGoods | dict[str, Any]]
] = UNSET,
returned: Unset[Returned | dict[str, Any]] = UNSET,
*,
request_source: Unset[RequestSource] = UNSET,
customs_code: Unset[str] = UNSET,
) -> APIResponse[BaseResponseSchema]
declare_as_user(
declaration_number: Unset[str] = UNSET,
receiver: Unset[PersonalInfo | dict[str, Any]] = UNSET,
sender: Unset[Sender | dict[str, Any]] = UNSET,
goods_list: Unset[
list[ECommerceGoods | dict[str, Any]]
] = UNSET,
returned: Unset[Returned | dict[str, Any]] = UNSET,
*,
request_source: Unset[RequestSource] = UNSET,
customs_code: Unset[str] = UNSET,
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
declare_as_user(*args, **kwds)
undeclare_as_user
¶
undeclare_as_user(
declaration_no: str,
doc_no: str,
*,
request_source: Unset[RequestSource] = UNSET,
customs_code: Unset[str] = UNSET,
) -> APIResponse[BaseResponseSchema]
undeclare_as_user(
declaration_no: str,
doc_no: str,
*,
request_source: Unset[RequestSource] = UNSET,
customs_code: Unset[str] = UNSET,
) -> Coroutine[Any, Any, APIResponse[BaseResponseSchema]]
undeclare_as_user(*args, **kwds)