wildberries-sdk 0.1.9__py3-none-any.whl → 0.1.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wildberries_sdk/analytics/__init__.py +3 -1
- wildberries_sdk/analytics/api_client.py +1 -1
- wildberries_sdk/analytics/configuration.py +1 -1
- wildberries_sdk/analytics/models/__init__.py +1 -0
- wildberries_sdk/analytics/models/main_request.py +3 -3
- wildberries_sdk/analytics/models/nm_report_get_reports_response_data_inner.py +2 -2
- wildberries_sdk/analytics/models/order_by.py +1 -1
- wildberries_sdk/analytics/models/order_by_main_and_details.py +103 -0
- wildberries_sdk/analytics/models/table_details_request.py +3 -3
- wildberries_sdk/analytics/models/table_group_field.py +1 -1
- wildberries_sdk/communications/__init__.py +5 -1
- wildberries_sdk/communications/api/api.py +8 -1
- wildberries_sdk/communications/api_client.py +1 -1
- wildberries_sdk/communications/configuration.py +1 -1
- wildberries_sdk/communications/models/__init__.py +2 -0
- wildberries_sdk/communications/models/api_v1_claims_get200_response_claims_inner.py +1 -1
- wildberries_sdk/communications/models/api_v1_seller_download_id_get202_response.py +89 -0
- wildberries_sdk/communications/models/api_v1_seller_download_id_get451_response.py +95 -0
- wildberries_sdk/finances/__init__.py +1 -1
- wildberries_sdk/finances/api_client.py +1 -1
- wildberries_sdk/finances/configuration.py +1 -1
- wildberries_sdk/finances/models/detail_report_item.py +9 -5
- wildberries_sdk/general/__init__.py +1 -1
- wildberries_sdk/general/api_client.py +1 -1
- wildberries_sdk/general/configuration.py +1 -1
- wildberries_sdk/in_store_pickup/__init__.py +1 -1
- wildberries_sdk/in_store_pickup/api_client.py +1 -1
- wildberries_sdk/in_store_pickup/configuration.py +1 -1
- wildberries_sdk/in_store_pickup/models/api_new_order.py +2 -2
- wildberries_sdk/in_store_pickup/models/api_order.py +2 -2
- wildberries_sdk/orders_dbs/__init__.py +1 -1
- wildberries_sdk/orders_dbs/api_client.py +1 -1
- wildberries_sdk/orders_dbs/configuration.py +1 -1
- wildberries_sdk/orders_dbs/models/order_dbs.py +2 -2
- wildberries_sdk/orders_dbs/models/order_new_dbs.py +2 -2
- wildberries_sdk/orders_dbw/__init__.py +1 -1
- wildberries_sdk/orders_dbw/api_client.py +1 -1
- wildberries_sdk/orders_dbw/configuration.py +1 -1
- wildberries_sdk/orders_fbs/__init__.py +1 -3
- wildberries_sdk/orders_fbs/api/fbs_api.py +21 -21
- wildberries_sdk/orders_fbs/api_client.py +1 -1
- wildberries_sdk/orders_fbs/configuration.py +1 -1
- wildberries_sdk/orders_fbs/models/__init__.py +0 -1
- wildberries_sdk/orders_fbs/models/api_v3_orders_stickers_cross_border_post200_response_stickers_inner.py +1 -1
- wildberries_sdk/orders_fbs/models/order_new.py +2 -2
- wildberries_sdk/orders_fbw/__init__.py +1 -1
- wildberries_sdk/orders_fbw/api/api.py +3 -3
- wildberries_sdk/orders_fbw/api_client.py +1 -1
- wildberries_sdk/orders_fbw/configuration.py +1 -1
- wildberries_sdk/products/__init__.py +3 -1
- wildberries_sdk/products/api_client.py +1 -1
- wildberries_sdk/products/configuration.py +1 -1
- wildberries_sdk/products/models/__init__.py +1 -0
- wildberries_sdk/products/models/content_v2_cards_update_post_request_inner.py +1 -1
- wildberries_sdk/products/models/content_v2_cards_upload_add_post_request_cards_to_add_inner.py +4 -4
- wildberries_sdk/products/models/content_v2_cards_upload_add_post_request_cards_to_add_inner_sizes_inner.py +93 -0
- wildberries_sdk/products/models/content_v2_cards_upload_post_request_inner_variants_inner.py +1 -1
- wildberries_sdk/products/models/content_v2_cards_upload_post_request_inner_variants_inner_sizes_inner.py +1 -1
- wildberries_sdk/promotion/__init__.py +1 -1
- wildberries_sdk/promotion/api_client.py +1 -1
- wildberries_sdk/promotion/configuration.py +1 -1
- wildberries_sdk/promotion/models/adv_v1_advert_get200_response_items_inner.py +1 -1
- wildberries_sdk/reports/__init__.py +13 -1
- wildberries_sdk/reports/api_client.py +1 -1
- wildberries_sdk/reports/configuration.py +1 -1
- wildberries_sdk/reports/models/__init__.py +6 -0
- wildberries_sdk/reports/models/incomes_item.py +4 -5
- wildberries_sdk/reports/models/measurement_penalties.py +91 -0
- wildberries_sdk/reports/models/measurement_penalties_data.py +97 -0
- wildberries_sdk/reports/models/measurement_penalties_data_reports_inner.py +122 -0
- wildberries_sdk/reports/models/orders_item.py +3 -4
- wildberries_sdk/reports/models/sales_item.py +2 -3
- wildberries_sdk/reports/models/stocks_item.py +2 -3
- wildberries_sdk/{orders_fbs/models/api_v3_orders_order_id_meta_get200_response.py → reports/models/whm.py} +15 -15
- wildberries_sdk/reports/models/whm_data.py +97 -0
- wildberries_sdk/reports/models/whm_data_reports_inner.py +104 -0
- wildberries_sdk/tariffs/__init__.py +1 -1
- wildberries_sdk/tariffs/api_client.py +1 -1
- wildberries_sdk/tariffs/configuration.py +1 -1
- wildberries_sdk/tariffs/models/commission_uzbekistan_report_inner.py +7 -3
- wildberries_sdk/wbd/__init__.py +1 -1
- wildberries_sdk/wbd/api/default_api.py +3 -3
- wildberries_sdk/wbd/api_client.py +1 -1
- wildberries_sdk/wbd/configuration.py +1 -1
- wildberries_sdk-0.1.11.dist-info/METADATA +190 -0
- {wildberries_sdk-0.1.9.dist-info → wildberries_sdk-0.1.11.dist-info}/RECORD +89 -80
- wildberries_sdk-0.1.9.dist-info/METADATA +0 -63
- {wildberries_sdk-0.1.9.dist-info → wildberries_sdk-0.1.11.dist-info}/LICENSE +0 -0
- {wildberries_sdk-0.1.9.dist-info → wildberries_sdk-0.1.11.dist-info}/WHEEL +0 -0
- {wildberries_sdk-0.1.9.dist-info → wildberries_sdk-0.1.11.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "0.1.11"
|
|
18
18
|
|
|
19
19
|
# Define package exports
|
|
20
20
|
__all__ = [
|
|
@@ -73,6 +73,7 @@ __all__ = [
|
|
|
73
73
|
"NmReportRetryReportResponse",
|
|
74
74
|
"OrderBy",
|
|
75
75
|
"OrderByGrTe",
|
|
76
|
+
"OrderByMainAndDetails",
|
|
76
77
|
"OrderByMode",
|
|
77
78
|
"PastPeriod",
|
|
78
79
|
"Period",
|
|
@@ -247,6 +248,7 @@ from wildberries_sdk.analytics.models.nm_report_retry_report_request import NmRe
|
|
|
247
248
|
from wildberries_sdk.analytics.models.nm_report_retry_report_response import NmReportRetryReportResponse as NmReportRetryReportResponse
|
|
248
249
|
from wildberries_sdk.analytics.models.order_by import OrderBy as OrderBy
|
|
249
250
|
from wildberries_sdk.analytics.models.order_by_gr_te import OrderByGrTe as OrderByGrTe
|
|
251
|
+
from wildberries_sdk.analytics.models.order_by_main_and_details import OrderByMainAndDetails as OrderByMainAndDetails
|
|
250
252
|
from wildberries_sdk.analytics.models.order_by_mode import OrderByMode as OrderByMode
|
|
251
253
|
from wildberries_sdk.analytics.models.past_period import PastPeriod as PastPeriod
|
|
252
254
|
from wildberries_sdk.analytics.models.period import Period as Period
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/0.1.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/0.1.11/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -536,7 +536,7 @@ conf = wildberries_sdk.analytics.Configuration(
|
|
|
536
536
|
"OS: {env}\n"\
|
|
537
537
|
"Python Version: {pyversion}\n"\
|
|
538
538
|
"Version of the API: analytics\n"\
|
|
539
|
-
"SDK Package Version: 0.1.
|
|
539
|
+
"SDK Package Version: 0.1.11".\
|
|
540
540
|
format(env=sys.platform, pyversion=sys.version)
|
|
541
541
|
|
|
542
542
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -56,6 +56,7 @@ from wildberries_sdk.analytics.models.nm_report_retry_report_request import NmRe
|
|
|
56
56
|
from wildberries_sdk.analytics.models.nm_report_retry_report_response import NmReportRetryReportResponse
|
|
57
57
|
from wildberries_sdk.analytics.models.order_by import OrderBy
|
|
58
58
|
from wildberries_sdk.analytics.models.order_by_gr_te import OrderByGrTe
|
|
59
|
+
from wildberries_sdk.analytics.models.order_by_main_and_details import OrderByMainAndDetails
|
|
59
60
|
from wildberries_sdk.analytics.models.order_by_mode import OrderByMode
|
|
60
61
|
from wildberries_sdk.analytics.models.past_period import PastPeriod
|
|
61
62
|
from wildberries_sdk.analytics.models.period import Period
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
|
-
from wildberries_sdk.analytics.models.
|
|
23
|
+
from wildberries_sdk.analytics.models.order_by_main_and_details import OrderByMainAndDetails
|
|
24
24
|
from wildberries_sdk.analytics.models.past_period import PastPeriod
|
|
25
25
|
from wildberries_sdk.analytics.models.period import Period
|
|
26
26
|
from wildberries_sdk.analytics.models.position_cluster import PositionCluster
|
|
@@ -38,7 +38,7 @@ class MainRequest(BaseModel):
|
|
|
38
38
|
brand_names: Optional[List[StrictStr]] = Field(default=None, description="Список брендов для фильтрации", alias="brandNames")
|
|
39
39
|
tag_ids: Optional[List[StrictInt]] = Field(default=None, description="Список ID ярлыков для фильтрации", alias="tagIds")
|
|
40
40
|
position_cluster: PositionCluster = Field(alias="positionCluster")
|
|
41
|
-
order_by:
|
|
41
|
+
order_by: OrderByMainAndDetails = Field(alias="orderBy")
|
|
42
42
|
include_substituted_skus: Optional[StrictBool] = Field(default=True, description="Показать данные по прямым запросам с [подменным артикулом](https://seller.wildberries.ru/help-center/article/A-524)", alias="includeSubstitutedSKUs")
|
|
43
43
|
include_search_texts: Optional[StrictBool] = Field(default=True, description="Показать данные по поисковым запросам без учёта подменного артикула", alias="includeSearchTexts")
|
|
44
44
|
limit: Annotated[int, Field(le=1000, strict=True)] = Field(description="Количество групп товаров в ответе")
|
|
@@ -112,7 +112,7 @@ class MainRequest(BaseModel):
|
|
|
112
112
|
"brandNames": obj.get("brandNames"),
|
|
113
113
|
"tagIds": obj.get("tagIds"),
|
|
114
114
|
"positionCluster": obj.get("positionCluster"),
|
|
115
|
-
"orderBy":
|
|
115
|
+
"orderBy": OrderByMainAndDetails.from_dict(obj["orderBy"]) if obj.get("orderBy") is not None else None,
|
|
116
116
|
"includeSubstitutedSKUs": obj.get("includeSubstitutedSKUs") if obj.get("includeSubstitutedSKUs") is not None else True,
|
|
117
117
|
"includeSearchTexts": obj.get("includeSearchTexts") if obj.get("includeSearchTexts") is not None else True,
|
|
118
118
|
"limit": obj.get("limit"),
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from datetime import date
|
|
20
|
+
from datetime import date
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from uuid import UUID
|
|
@@ -29,7 +29,7 @@ class NmReportGetReportsResponseDataInner(BaseModel):
|
|
|
29
29
|
NmReportGetReportsResponseDataInner
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
id: UUID = Field(description="ID отчёта")
|
|
32
|
-
created_at:
|
|
32
|
+
created_at: StrictStr = Field(description="Дата и время завершения генерации", alias="createdAt")
|
|
33
33
|
status: StrictStr = Field(description="Статус отчёта: * `WAITING` — в очереди на обработку * `PROCESSING` — генерируется * `SUCCESS —` готов * `RETRY` — ожидает повторной обработки * `FAILED` — не получилось сгенерировать, сгенерируйте повторно ")
|
|
34
34
|
name: StrictStr = Field(description="Название отчёта")
|
|
35
35
|
size: StrictInt = Field(description="Размер отчёта, Б")
|
|
@@ -26,7 +26,7 @@ class OrderBy(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
Параметры сортировки
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
var_field: StrictStr = Field(description="Поле для сортировки: - `openCard` — Перешли в карточку - `addToCart` — Положили в корзину - `orderCount` — Заказали товаров, шт - `orderSum` — Заказали на сумму - `buyoutCount` — Выкупили товаров, шт - `buyoutSum` — Выкупили на сумму - `cancelCount` — Отменили товаров, шт - `cancelSum` — Отменили на сумму - `avgPrice` — Средняя цена - `stockMpQty` — Остатки на складах продавца, шт - `stockWbQty` — Остатки на складах WB, шт - `shareOrderPercent` — Доля в выручке - `addToWishlist` — Добавили в **Отложенные** - `timeToReady` —
|
|
29
|
+
var_field: StrictStr = Field(description="Поле для сортировки: - `openCard` — Перешли в карточку - `addToCart` — Положили в корзину - `orderCount` — Заказали товаров, шт - `orderSum` — Заказали на сумму - `buyoutCount` — Выкупили товаров, шт - `buyoutSum` — Выкупили на сумму - `cancelCount` — Отменили товаров, шт - `cancelSum` — Отменили на сумму - `avgPrice` — Средняя цена - `stockMpQty` — Остатки на складах продавца, шт - `stockWbQty` — Остатки на складах WB, шт - `shareOrderPercent` — Доля в выручке - `addToWishlist` — Добавили в **Отложенные** - `timeToReady` — Среднее время доставки - `localizationPercent` — Локальные заказы в рамках одного региона - `wbClub.orderCount` — Заказали товаров с WB Клубом, шт - `wbClub.orderSum` — Заказали на сумму с WB Клубом - `wbClub.buyoutSum` — Выкупили товаров с WB Клубом, шт - `wbClub.buyoutCount` — Процент выкупа с WB Клубом - `wbClub.cancelSum` — Отменили товаров с WB Клубом, шт - `wbClub.avgPrice` — Средняя цена с WB Клубом - `wbClub.buyoutPercent` — Процент выкупа с WB Клубом - `wbClub.avgOrderCountPerDay` — Среднее количество заказов в день с WB Клубом, шт - `wbClub.cancelCount` — Отменили товаров с WB Клубом, шт ", alias="field")
|
|
30
30
|
mode: StrictStr = Field(description="Порядок сортировки: - `asc` — по возрастанию - `desc` — по убыванию ")
|
|
31
31
|
__properties: ClassVar[List[str]] = ["field", "mode"]
|
|
32
32
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Аналитика и данные
|
|
5
|
+
|
|
6
|
+
<div class=\"description_important\"> Узнать больше об аналитике и данных можно в <a href=\"https://seller.wildberries.ru/instructions/ru/ru/subcategory/seller-analytics\">справочном центре</a> </div> В разделе описаны методы получения: 1. [Воронки продаж](/openapi/analytics#tag/Voronka-prodazh) 2. [Поисковых запросов по вашим товарам](/openapi/analytics#tag/Poiskovye-zaprosy-po-vashim-tovaram) 3. [Истории остатков](/openapi/analytics#tag/Istoriya-ostatkov) 4. [Аналитики продавца в формате CSV](/openapi/analytics#tag/Analitika-prodavca-CSV)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: analytics
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class OrderByMainAndDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Параметры сортировки
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
var_field: StrictStr = Field(description="Поле для сортировки: - `avgPosition` — по средней позиции - `addToCart` — по добавлениям в корзину - `openCard` — по открытию карточки (переход на страницу товара) - `orders` — по количеству заказов - `cartToOrder` — по конверсии в заказ из поиска - `openToCart` — по конверсии в корзину из поиска - `visibility` — по видимости товара - `minPrice` — по минимальной цене - `maxPrice` — по максимальной цене ", alias="field")
|
|
30
|
+
mode: StrictStr = Field(description="Порядок сортировки: - `asc` — по возрастанию - `desc` — по убыванию ")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["field", "mode"]
|
|
32
|
+
|
|
33
|
+
@field_validator('var_field')
|
|
34
|
+
def var_field_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in set(['avgPosition', 'openCard', 'addToCart', 'openToCart', 'orders', 'cartToOrder', 'visibility', 'minPrice', 'maxPrice']):
|
|
37
|
+
raise ValueError("must be one of enum values ('avgPosition', 'openCard', 'addToCart', 'openToCart', 'orders', 'cartToOrder', 'visibility', 'minPrice', 'maxPrice')")
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
@field_validator('mode')
|
|
41
|
+
def mode_validate_enum(cls, value):
|
|
42
|
+
"""Validates the enum"""
|
|
43
|
+
if value not in set(['asc', 'desc']):
|
|
44
|
+
raise ValueError("must be one of enum values ('asc', 'desc')")
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
+
"""Create an instance of OrderByMainAndDetails from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
"""
|
|
78
|
+
excluded_fields: Set[str] = set([
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
_dict = self.model_dump(
|
|
82
|
+
by_alias=True,
|
|
83
|
+
exclude=excluded_fields,
|
|
84
|
+
exclude_none=True,
|
|
85
|
+
)
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of OrderByMainAndDetails from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"field": obj.get("field"),
|
|
99
|
+
"mode": obj.get("mode")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
|
-
from wildberries_sdk.analytics.models.
|
|
23
|
+
from wildberries_sdk.analytics.models.order_by_main_and_details import OrderByMainAndDetails
|
|
24
24
|
from wildberries_sdk.analytics.models.past_period import PastPeriod
|
|
25
25
|
from wildberries_sdk.analytics.models.period import Period
|
|
26
26
|
from typing import Optional, Set
|
|
@@ -36,7 +36,7 @@ class TableDetailsRequest(BaseModel):
|
|
|
36
36
|
brand_name: Optional[StrictStr] = Field(default=None, description="Название товара", alias="brandName")
|
|
37
37
|
tag_id: Optional[StrictInt] = Field(default=None, description="ID ярлыка", alias="tagId")
|
|
38
38
|
nm_ids: Optional[Annotated[List[StrictInt], Field(max_length=50)]] = Field(default=None, description="Список артикулов WB", alias="nmIds")
|
|
39
|
-
order_by:
|
|
39
|
+
order_by: OrderByMainAndDetails = Field(alias="orderBy")
|
|
40
40
|
position_cluster: StrictStr = Field(description="Товары с какой средней позицией в поиске показывать в отчёте: - `all` — все - `firstHundred` — от 1 до 100 - `secondHundred` — от 101 до 200 - `below` — от 201 и ниже ", alias="positionCluster")
|
|
41
41
|
include_substituted_skus: Optional[StrictBool] = Field(default=True, description="Показать данные по прямым запросам с [подменным артикулом](https://seller.wildberries.ru/help-center/article/A-524)", alias="includeSubstitutedSKUs")
|
|
42
42
|
include_search_texts: Optional[StrictBool] = Field(default=True, description="Показать данные по поисковым запросам без учёта подменного артикула", alias="includeSearchTexts")
|
|
@@ -117,7 +117,7 @@ class TableDetailsRequest(BaseModel):
|
|
|
117
117
|
"brandName": obj.get("brandName"),
|
|
118
118
|
"tagId": obj.get("tagId"),
|
|
119
119
|
"nmIds": obj.get("nmIds"),
|
|
120
|
-
"orderBy":
|
|
120
|
+
"orderBy": OrderByMainAndDetails.from_dict(obj["orderBy"]) if obj.get("orderBy") is not None else None,
|
|
121
121
|
"positionCluster": obj.get("positionCluster"),
|
|
122
122
|
"includeSubstitutedSKUs": obj.get("includeSubstitutedSKUs") if obj.get("includeSubstitutedSKUs") is not None else True,
|
|
123
123
|
"includeSearchTexts": obj.get("includeSearchTexts") if obj.get("includeSearchTexts") is not None else True,
|
|
@@ -20,7 +20,7 @@ from typing_extensions import Self
|
|
|
20
20
|
|
|
21
21
|
class TableGroupField(str, Enum):
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
Сортировка по полю: - `ordersCount` — Заказы, шт. - `ordersSum` — Заказы, сумма - `avgOrders` — Среднее количество заказов в день - `buyoutCount` — Выкупы, шт. - `buyoutSum` — Выкупы, сумма - `buyoutPercent` — Процент выкупа - `stockCount` — Остатки на текущий день, шт. - `stockSum` — Стоимость остатков на текущий день - `saleRate` — Оборачиваемость текущих остатков - `avgStockTurnover` — Оборачиваемость средних остатков - `toClientCount` — В пути к клиенту, шт. - `fromClientCount` — В пути от клиента, шт. - `minPrice` — Минимальная цена продавца со скидкой продавца (без учёта скидки WB Клуба) - `maxPrice` — Максимальная цена продавца со скидкой продавца (без учёта скидки WB Клуба) - `officeMissingTime` — Время отсутствия товара на складе - `lostOrdersCount` — Упущенные заказы, шт. - `lostOrdersSum` — Упущенные заказы, сумма - `lostBuyoutsCount` — Упущенные выкупы, шт. - `lostBuyoutsSum` — Упущенные выкупы, сумма
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
"""
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "0.1.11"
|
|
18
18
|
|
|
19
19
|
# Define package exports
|
|
20
20
|
__all__ = [
|
|
@@ -76,6 +76,8 @@ __all__ = [
|
|
|
76
76
|
"ApiV1QuestionsPatchRequestOneOf",
|
|
77
77
|
"ApiV1QuestionsPatchRequestOneOf1",
|
|
78
78
|
"ApiV1QuestionsPatchRequestOneOf1Answer",
|
|
79
|
+
"ApiV1SellerDownloadIdGet202Response",
|
|
80
|
+
"ApiV1SellerDownloadIdGet451Response",
|
|
79
81
|
"ApiV1SellerEventsGet400Response",
|
|
80
82
|
"Chat",
|
|
81
83
|
"ChatsResponse",
|
|
@@ -176,6 +178,8 @@ from wildberries_sdk.communications.models.api_v1_questions_patch_request import
|
|
|
176
178
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of import ApiV1QuestionsPatchRequestOneOf as ApiV1QuestionsPatchRequestOneOf
|
|
177
179
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of1 import ApiV1QuestionsPatchRequestOneOf1 as ApiV1QuestionsPatchRequestOneOf1
|
|
178
180
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of1_answer import ApiV1QuestionsPatchRequestOneOf1Answer as ApiV1QuestionsPatchRequestOneOf1Answer
|
|
181
|
+
from wildberries_sdk.communications.models.api_v1_seller_download_id_get202_response import ApiV1SellerDownloadIdGet202Response as ApiV1SellerDownloadIdGet202Response
|
|
182
|
+
from wildberries_sdk.communications.models.api_v1_seller_download_id_get451_response import ApiV1SellerDownloadIdGet451Response as ApiV1SellerDownloadIdGet451Response
|
|
179
183
|
from wildberries_sdk.communications.models.api_v1_seller_events_get400_response import ApiV1SellerEventsGet400Response as ApiV1SellerEventsGet400Response
|
|
180
184
|
from wildberries_sdk.communications.models.chat import Chat as Chat
|
|
181
185
|
from wildberries_sdk.communications.models.chats_response import ChatsResponse as ChatsResponse
|
|
@@ -351,7 +351,9 @@ class Api:
|
|
|
351
351
|
|
|
352
352
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
353
353
|
'200': "bytearray",
|
|
354
|
+
'202': "ApiV1SellerDownloadIdGet202Response",
|
|
354
355
|
'400': "ApiV1SellerEventsGet400Response",
|
|
356
|
+
'451': "ApiV1SellerDownloadIdGet451Response",
|
|
355
357
|
}
|
|
356
358
|
response_data = self.api_client.call_api(
|
|
357
359
|
*_param,
|
|
@@ -419,7 +421,9 @@ class Api:
|
|
|
419
421
|
|
|
420
422
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
421
423
|
'200': "bytearray",
|
|
424
|
+
'202': "ApiV1SellerDownloadIdGet202Response",
|
|
422
425
|
'400': "ApiV1SellerEventsGet400Response",
|
|
426
|
+
'451': "ApiV1SellerDownloadIdGet451Response",
|
|
423
427
|
}
|
|
424
428
|
response_data = self.api_client.call_api(
|
|
425
429
|
*_param,
|
|
@@ -487,7 +491,9 @@ class Api:
|
|
|
487
491
|
|
|
488
492
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
489
493
|
'200': "bytearray",
|
|
494
|
+
'202': "ApiV1SellerDownloadIdGet202Response",
|
|
490
495
|
'400': "ApiV1SellerEventsGet400Response",
|
|
496
|
+
'451': "ApiV1SellerDownloadIdGet451Response",
|
|
491
497
|
}
|
|
492
498
|
response_data = self.api_client.call_api(
|
|
493
499
|
*_param,
|
|
@@ -538,7 +544,8 @@ class Api:
|
|
|
538
544
|
'application/pdf',
|
|
539
545
|
'image/jpeg',
|
|
540
546
|
'image/png',
|
|
541
|
-
'application/json'
|
|
547
|
+
'application/json',
|
|
548
|
+
'application/problem+json'
|
|
542
549
|
]
|
|
543
550
|
)
|
|
544
551
|
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/0.1.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/0.1.11/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -536,7 +536,7 @@ conf = wildberries_sdk.communications.Configuration(
|
|
|
536
536
|
"OS: {env}\n"\
|
|
537
537
|
"Python Version: {pyversion}\n"\
|
|
538
538
|
"Version of the API: communication\n"\
|
|
539
|
-
"SDK Package Version: 0.1.
|
|
539
|
+
"SDK Package Version: 0.1.11".\
|
|
540
540
|
format(env=sys.platform, pyversion=sys.version)
|
|
541
541
|
|
|
542
542
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -59,6 +59,8 @@ from wildberries_sdk.communications.models.api_v1_questions_patch_request import
|
|
|
59
59
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of import ApiV1QuestionsPatchRequestOneOf
|
|
60
60
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of1 import ApiV1QuestionsPatchRequestOneOf1
|
|
61
61
|
from wildberries_sdk.communications.models.api_v1_questions_patch_request_one_of1_answer import ApiV1QuestionsPatchRequestOneOf1Answer
|
|
62
|
+
from wildberries_sdk.communications.models.api_v1_seller_download_id_get202_response import ApiV1SellerDownloadIdGet202Response
|
|
63
|
+
from wildberries_sdk.communications.models.api_v1_seller_download_id_get451_response import ApiV1SellerDownloadIdGet451Response
|
|
62
64
|
from wildberries_sdk.communications.models.api_v1_seller_events_get400_response import ApiV1SellerEventsGet400Response
|
|
63
65
|
from wildberries_sdk.communications.models.chat import Chat
|
|
64
66
|
from wildberries_sdk.communications.models.chats_response import ChatsResponse
|
|
@@ -41,7 +41,7 @@ class ApiV1ClaimsGet200ResponseClaimsInner(BaseModel):
|
|
|
41
41
|
dt_update: Optional[datetime] = Field(default=None, description="Дата и время рассмотрения заявки. Для нерассмотренной заявки — дата и время оформления")
|
|
42
42
|
photos: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=10)]] = Field(default=None, description="Фотографии из заявки покупателя")
|
|
43
43
|
video_paths: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1)]] = Field(default=None, description="Видео из заявки покупателя")
|
|
44
|
-
actions: Optional[List[StrictStr]] = Field(default=None, description="Варианты [ответа продавца на заявку](./user-communication#tag/Vozvraty-pokupatelyami/paths/~1api~1v1~1claim/patch).<br>Отклонённые заявки можно пересмотреть. Если массив пуст, с заявкой работать нельзя. * `approve1` — одобрить с проверкой брака.<br>Деньги вернутся покупателю после возврата товара. Товар будет проверен на складе. При подтверждении брака/ошибки вложения товар будет отправлен продавцу. Если брак/ошибка вложения не подтвердятся, товар будет возвращён в продажу.<br>Неприменимо при модели <strong>[Самовывоз](./in-store-pickup)</strong>. * `approve2` — одобрить и забрать товар.<br> Деньги вернутся покупателю после возврата товара. Товар будет отправлен продавцу.<br>Неприменимо при модели <strong>[Самовывоз](./in-store-pickup)</strong>. * `autorefund1` — одобрить без возврата товара.<br> Товар останется у покупателя. Деньги за него будут возвращены покупателю без возврата товара. * `reject1` — отклонить с шаблоном ответа: <details><summary><strong>Брак не обнаружен</strong></summary>Пришлось отклонить заявку — подтвердить производственный брак не получилось. Можете отнести товар на независимую экспертизу или в сервисный центр. Если брак
|
|
44
|
+
actions: Optional[List[StrictStr]] = Field(default=None, description="Варианты [ответа продавца на заявку](./user-communication#tag/Vozvraty-pokupatelyami/paths/~1api~1v1~1claim/patch).<br>Отклонённые заявки можно пересмотреть. Если массив пуст, с заявкой работать нельзя. * `approve1` — одобрить с проверкой брака.<br>Деньги вернутся покупателю после возврата товара. Товар будет проверен на складе. При подтверждении брака/ошибки вложения товар будет отправлен продавцу. Если брак/ошибка вложения не подтвердятся, товар будет возвращён в продажу.<br>Неприменимо при модели <strong>[Самовывоз](./in-store-pickup)</strong>. * `approve2` — одобрить и забрать товар.<br> Деньги вернутся покупателю после возврата товара. Товар будет отправлен продавцу.<br>Неприменимо при модели <strong>[Самовывоз](./in-store-pickup)</strong>. * `autorefund1` — одобрить без возврата товара.<br> Товар останется у покупателя. Деньги за него будут возвращены покупателю без возврата товара. * `reject1` — отклонить с шаблоном ответа: <details><summary><strong>Брак не обнаружен</strong></summary>Пришлось отклонить заявку — подтвердить производственный брак не получилось. Можете отнести товар на независимую экспертизу или в сервисный центр. Если брак подтвердится, создайте новую заявку с такой же причиной, ещё раз опишите проблему и добавьте фото заключения. А если остались вопросы, задайте их в чате: нажмите кнопку «Написать продавцу».</details> * `reject2` — отклонить с шаблоном ответа: <details><summary><strong>Добавить фото/видео</strong></summary>Пришлось отклонить заявку — нужно чуть больше информации. Создайте новую заявку с такой же причиной возврата, подробно опишите проблему и добавьте фото, на которых хорошо видно: сам товар целиком, брак, бирку или этикетку, упаковку со штрихкодом Wildberries, если она осталась. Желательно добавить видео — это поможет разобраться.</details> * `reject3` — отклонить с шаблоном ответа: <details><summary><strong>Направить в сервисный центр</strong></summary>Пришлось отклонить заявку — подтвердить производственный брак не получилось. Вы можете отнести товар в сервисный центр: адрес есть на сайте производителя или в гарантийном талоне. Там всё проверят и выдадут заключение. Если производственный брак подтвердится, создайте новую заявку с такой же причиной, ещё раз опишите проблему и добавьте фото заключения.</details> * `rejectcustom` — отклонить с комментарием.<br>Комментарий передаётся в параметре `comment`. * `approvecc1` — одобрить заявку с возвратом товара в магазин продавца.<br>Можно передать комментарий (например, телефон для связи или время работы своего отдела возвратов) в параметре `comment`. По итогу возврата необходимо ответить на заявку с `\"action\":\"confirmreturngoodcc1\"` или `\"action\":\"rejectcustom\"`.<br>Применимо только при модели <strong>[Самовывоз](./in-store-pickup)</strong>. * `confirmreturngoodcc1` — подтвердить приёмку товара от покупателя.<br>Применимо только при модели <strong>[Самовывоз](./in-store-pickup)</strong>. ")
|
|
45
45
|
price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Фактическая цена с учетом всех скидок. Взимается с покупателя")
|
|
46
46
|
currency_code: Optional[StrictStr] = Field(default=None, description="Код валюты цены")
|
|
47
47
|
srid: Optional[StrictStr] = Field(default=None, description="Уникальный ID заказа, по товару которого создана заявка")
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Общение с покупателями
|
|
5
|
+
|
|
6
|
+
<div class=\"description_important\"> Узнать больше об общении с покупателями можно в <a href=\"https://seller.wildberries.ru/instructions/category/f7f6c465-dd12-422d-80a0-a6d9562115d5?goBackOption=prevRoute&categoryId=30817062-14cc-4a82-bc78-3600c2b0685b\">справочном центре</a> </div> С помощью методов общения с покупателями вы можете работать с: 1. [Вопросами](/openapi/user-communication#tag/Voprosy) и [отзывами](/openapi/user-communication#tag/Otzyvy) покупателей 2. [Закреплёнными отзывами](/openapi/user-communication#tag/Zakreplyonnye-otzyvy) 3. [Чатами с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami) 4. [Заявками покупателей на возврат](/openapi/user-communication#tag/Vozvraty-pokupatelyami)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: communication
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApiV1SellerDownloadIdGet202Response(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApiV1SellerDownloadIdGet202Response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
moderation_state: StrictStr = Field(description="Статус модерации", alias="moderationState")
|
|
30
|
+
retry_seconds: StrictInt = Field(description="Секунд до следующей попытки запроса файла", alias="retrySeconds")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["moderationState", "retrySeconds"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ApiV1SellerDownloadIdGet202Response from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of ApiV1SellerDownloadIdGet202Response from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"moderationState": obj.get("moderationState"),
|
|
85
|
+
"retrySeconds": obj.get("retrySeconds")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Общение с покупателями
|
|
5
|
+
|
|
6
|
+
<div class=\"description_important\"> Узнать больше об общении с покупателями можно в <a href=\"https://seller.wildberries.ru/instructions/category/f7f6c465-dd12-422d-80a0-a6d9562115d5?goBackOption=prevRoute&categoryId=30817062-14cc-4a82-bc78-3600c2b0685b\">справочном центре</a> </div> С помощью методов общения с покупателями вы можете работать с: 1. [Вопросами](/openapi/user-communication#tag/Voprosy) и [отзывами](/openapi/user-communication#tag/Otzyvy) покупателей 2. [Закреплёнными отзывами](/openapi/user-communication#tag/Zakreplyonnye-otzyvy) 3. [Чатами с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami) 4. [Заявками покупателей на возврат](/openapi/user-communication#tag/Vozvraty-pokupatelyami)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: communication
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApiV1SellerDownloadIdGet451Response(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApiV1SellerDownloadIdGet451Response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
status: Optional[StrictInt] = Field(default=None, description="HTTP статус-код")
|
|
30
|
+
title: Optional[StrictStr] = Field(default=None, description="Заголовок ошибки")
|
|
31
|
+
origin: Optional[StrictStr] = Field(default=None, description="ID внутреннего сервиса WB")
|
|
32
|
+
detail: Optional[StrictStr] = Field(default=None, description="Детали ошибки")
|
|
33
|
+
request_id: Optional[StrictStr] = Field(default=None, description="ID запроса", alias="requestId")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["status", "title", "origin", "detail", "requestId"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of ApiV1SellerDownloadIdGet451Response from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of ApiV1SellerDownloadIdGet451Response from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"status": obj.get("status"),
|
|
88
|
+
"title": obj.get("title"),
|
|
89
|
+
"origin": obj.get("origin"),
|
|
90
|
+
"detail": obj.get("detail"),
|
|
91
|
+
"requestId": obj.get("requestId")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/0.1.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/0.1.11/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -536,7 +536,7 @@ conf = wildberries_sdk.finances.Configuration(
|
|
|
536
536
|
"OS: {env}\n"\
|
|
537
537
|
"Python Version: {pyversion}\n"\
|
|
538
538
|
"Version of the API: finances\n"\
|
|
539
|
-
"SDK Package Version: 0.1.
|
|
539
|
+
"SDK Package Version: 0.1.11".\
|
|
540
540
|
format(env=sys.platform, pyversion=sys.version)
|
|
541
541
|
|
|
542
542
|
def get_host_settings(self) -> List[HostSetting]:
|