lingxingapi 1.1.4__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.
Files changed (65) hide show
  1. lingxingapi/__init__.py +7 -0
  2. lingxingapi/ads/__init__.py +0 -0
  3. lingxingapi/ads/api.py +5946 -0
  4. lingxingapi/ads/param.py +192 -0
  5. lingxingapi/ads/route.py +134 -0
  6. lingxingapi/ads/schema.py +2615 -0
  7. lingxingapi/api.py +557 -0
  8. lingxingapi/base/__init__.py +0 -0
  9. lingxingapi/base/api.py +568 -0
  10. lingxingapi/base/param.py +59 -0
  11. lingxingapi/base/route.py +11 -0
  12. lingxingapi/base/schema.py +198 -0
  13. lingxingapi/basic/__init__.py +0 -0
  14. lingxingapi/basic/api.py +466 -0
  15. lingxingapi/basic/param.py +72 -0
  16. lingxingapi/basic/route.py +20 -0
  17. lingxingapi/basic/schema.py +218 -0
  18. lingxingapi/errors.py +152 -0
  19. lingxingapi/fba/__init__.py +0 -0
  20. lingxingapi/fba/api.py +1691 -0
  21. lingxingapi/fba/param.py +250 -0
  22. lingxingapi/fba/route.py +30 -0
  23. lingxingapi/fba/schema.py +987 -0
  24. lingxingapi/fields.py +50 -0
  25. lingxingapi/finance/__init__.py +0 -0
  26. lingxingapi/finance/api.py +3091 -0
  27. lingxingapi/finance/param.py +616 -0
  28. lingxingapi/finance/route.py +44 -0
  29. lingxingapi/finance/schema.py +1243 -0
  30. lingxingapi/product/__init__.py +0 -0
  31. lingxingapi/product/api.py +2643 -0
  32. lingxingapi/product/param.py +934 -0
  33. lingxingapi/product/route.py +49 -0
  34. lingxingapi/product/schema.py +1004 -0
  35. lingxingapi/purchase/__init__.py +0 -0
  36. lingxingapi/purchase/api.py +496 -0
  37. lingxingapi/purchase/param.py +126 -0
  38. lingxingapi/purchase/route.py +11 -0
  39. lingxingapi/purchase/schema.py +215 -0
  40. lingxingapi/sales/__init__.py +0 -0
  41. lingxingapi/sales/api.py +3200 -0
  42. lingxingapi/sales/param.py +723 -0
  43. lingxingapi/sales/route.py +70 -0
  44. lingxingapi/sales/schema.py +1718 -0
  45. lingxingapi/source/__init__.py +0 -0
  46. lingxingapi/source/api.py +1799 -0
  47. lingxingapi/source/param.py +176 -0
  48. lingxingapi/source/route.py +38 -0
  49. lingxingapi/source/schema.py +1011 -0
  50. lingxingapi/tools/__init__.py +0 -0
  51. lingxingapi/tools/api.py +291 -0
  52. lingxingapi/tools/param.py +73 -0
  53. lingxingapi/tools/route.py +8 -0
  54. lingxingapi/tools/schema.py +169 -0
  55. lingxingapi/utils.py +456 -0
  56. lingxingapi/warehourse/__init__.py +0 -0
  57. lingxingapi/warehourse/api.py +1778 -0
  58. lingxingapi/warehourse/param.py +506 -0
  59. lingxingapi/warehourse/route.py +28 -0
  60. lingxingapi/warehourse/schema.py +926 -0
  61. lingxingapi-1.1.4.dist-info/METADATA +73 -0
  62. lingxingapi-1.1.4.dist-info/RECORD +65 -0
  63. lingxingapi-1.1.4.dist-info/WHEEL +5 -0
  64. lingxingapi-1.1.4.dist-info/licenses/LICENSE +22 -0
  65. lingxingapi-1.1.4.dist-info/top_level.txt +1 -0
lingxingapi/api.py ADDED
@@ -0,0 +1,557 @@
1
+ # -*- coding: utf-8 -*-c
2
+ from Crypto.Cipher import AES
3
+ from aiohttp import ClientTimeout
4
+ from lingxingapi import errors
5
+ from lingxingapi.base import schema
6
+ from lingxingapi.base.api import BaseAPI
7
+ from lingxingapi.basic.api import BasicAPI
8
+ from lingxingapi.sales.api import SalesAPI
9
+ from lingxingapi.fba.api import FbaAPI
10
+ from lingxingapi.product.api import ProductAPI
11
+ from lingxingapi.purchase.api import PurchaseAPI
12
+ from lingxingapi.warehourse.api import WarehouseAPI
13
+ from lingxingapi.ads.api import AdsAPI
14
+ from lingxingapi.finance.api import FinanceAPI
15
+ from lingxingapi.tools.api import ToolsAPI
16
+ from lingxingapi.source.api import SourceAPI
17
+
18
+
19
+ # API ------------------------------------------------------------------------------------------------------------------
20
+ class API(BaseAPI):
21
+ """领星 API 客户端, 用于与领星开放平台进行交互
22
+
23
+ ## Docs
24
+ * 授权
25
+ - AccessToken: [获取 access-token和refresh-token](https://apidoc.lingxing.com/#/docs/Authorization/GetToken)
26
+ - RefreshToken: [续约接口令牌](https://apidoc.lingxing.com/#/docs/Authorization/RefreshToken)
27
+ * 基础数据: basic
28
+ * 销售数据: sales
29
+ * 产品数据: product
30
+ """
31
+
32
+ def __init__(
33
+ self,
34
+ app_id: str,
35
+ app_secret: str,
36
+ timeout: int | float = 60,
37
+ ignore_timeout: bool = False,
38
+ ignore_timeout_wait: int | float = 0.2,
39
+ ignore_timeout_retry: int = 10,
40
+ ignore_api_limit: bool = False,
41
+ ignore_api_limit_wait: int | float = 0.2,
42
+ ignore_api_limit_retry: int = 10,
43
+ ignore_internal_server_error: bool = False,
44
+ ignore_internal_server_error_wait: int | float = 0.2,
45
+ ignore_internal_server_error_retry: int = 10,
46
+ ignore_internet_connection: bool = False,
47
+ ignore_internet_connection_wait: int | float = 10,
48
+ ignore_internet_connection_retry: int = 10,
49
+ ) -> None:
50
+ """初始化领星 API 客户端
51
+
52
+ :param app_id `<'str'>`: 应用ID, 用于鉴权
53
+
54
+ :param app_secret `<'str'>`: 应用密钥, 用于鉴权
55
+
56
+ :param timeout `<'int/float'>`: 请求超时 (单位: 秒), 默认为 60
57
+
58
+ :param ignore_timeout `<'bool'>`: 是否忽略请求超时错误, 默认为 `False`,
59
+
60
+ - 如果设置为 `True`, 则在请求超时时不会抛出异常, 而是会等待
61
+ `ignore_timeout_wait` 秒后重试请求, 重试次数不超过 `ignore_timeout_retry`
62
+ - 如果设置为 `False`, 则在请求超时时会抛出 `ApiTimeoutError` 异常
63
+
64
+ :param ignore_timeout_wait `<'int/float'>`: 忽略请求超时时的等待时间 (单位: 秒),
65
+ 默认为 `0.2` 秒, 仅在 `ignore_timeout` 为 `True` 时生效
66
+
67
+ :param ignore_timeout_retry `<'int'>`: 忽略请求超时时的最大重试次数,
68
+ 默认为 `10`, 仅在 `ignore_timeout` 为 `True` 时生效, 若设置为 `-1` 则表示无限重试
69
+
70
+ :param ignore_api_limit `<'bool'>`: 是否忽略 API 限流错误, 默认为 `False`,
71
+
72
+ - 如果设置为 `True`, 则在遇到限流错误时不会抛出异常, 而是会等待
73
+ `ignore_api_limit_wait` 秒后重试请求, 重试次数不超过 `ignore_api_limit_retry`
74
+ - 如果设置为 `False`, 则在遇到限流错误时会抛出 `ApiLimitError` 异常
75
+
76
+ :param ignore_api_limit_wait `<'int/float'>`: 忽略 API 限流错误时的等待时间 (单位: 秒),
77
+ 默认为 `0.2` 秒, 仅在 `ignore_api_limit` 为 `True` 时生效
78
+
79
+ :param ignore_api_limit_retry `<'int'>`: 忽略 API 限流错误时的最大重试次数,
80
+ 默认为 `10`, 仅在 `ignore_api_limit` 为 `True` 时生效, 若设置为 `-1` 则表示无限重试
81
+
82
+ :param ignore_internal_server_error `<'bool'>`: 是否忽略服务器内部错误 (500错误码, 仅限 Internal Server Error 类型), 默认为 `False`,
83
+
84
+ - 如果设置为 `True`, 则在遇到服务器内部错误时不会抛出异常, 而是会等待
85
+ `ignore_internal_server_error_wait` 秒后重试请求, 重试次数不超过 `ignore_internal_server_error_retry`
86
+ - 如果设置为 `False`, 则在遇到服务器内部错误时会抛出 `InternalServerError` 异常
87
+
88
+ :param ignore_internal_server_error_wait `<'int/float'>`: 忽略服务器内部错误时的等待时间 (单位: 秒),
89
+ 默认为 `0.2` 秒, 仅在 `ignore_internal_server_error` 为 `True` 时生效
90
+
91
+ :param ignore_internal_server_error_retry `<'int'>`: 忽略服务器内部错误时的最大重试次数,
92
+ 默认为 `10`, 仅在 `ignore_internal_server_error` 为 `True` 时生效, 若设置为 `-1` 则表示无限重试
93
+
94
+ :param ignore_internet_connection `<'bool'>`: 是否忽略无法链接互联网的错误, 默认为 `False`,
95
+
96
+ - 如果设置为 `True`, 则在无法链接互联网时不会抛出异常, 而是会等待
97
+ `ignore_internet_connection_wait` 秒后重试请求, 重试次数不超过 `ignore_internet_connection_retry`
98
+ - 如果设置为 `False`, 则在无法链接互联网时会抛出 `InternetConnectionError` 异常
99
+
100
+ :param ignore_internet_connection_wait `<'int/float'>`: 忽略无法链接互联网时的等待时间 (单位: 秒),
101
+ 默认为 `10` 秒, 仅在 `ignore_internet_connection` 为 `True` 时生效
102
+
103
+ :param ignore_internet_connection_retry `<'int'>`: 忽略无法链接互联网时的最大重试次数,
104
+ 默认为 `10`, 仅在 `ignore_internet_connection` 为 `True` 时生效, 若设置为 `-1` 则表示无限重试
105
+ """
106
+ # 验证参数
107
+ # . API 凭证
108
+ app_cipher = AES.new(app_id.encode("utf-8"), AES.MODE_ECB)
109
+ # . HTTP 会话
110
+ if not isinstance(timeout, (int, float)) or timeout <= 0:
111
+ raise errors.ApiSettingsError(
112
+ "请求超时必须为正整数或浮点数, 而非 %r" % (timeout,)
113
+ )
114
+ timeout: ClientTimeout = ClientTimeout(total=timeout)
115
+ # 错误处理
116
+ # . 请求超时
117
+ ignore_timeout: bool = bool(ignore_timeout)
118
+ if not isinstance(ignore_timeout_wait, (float, int)) or ignore_timeout_wait < 0:
119
+ raise errors.ApiSettingsError(
120
+ "忽略请求超时时的等待时间必须为非负整数或浮点数, 而非 %r"
121
+ % (ignore_timeout_wait,)
122
+ )
123
+ ignore_timeout_wait: float = float(ignore_timeout_wait)
124
+ if not isinstance(ignore_timeout_retry, int) or ignore_timeout_retry < -1:
125
+ raise errors.ApiSettingsError(
126
+ "忽略请求超时时的最大重试次数必须为正整数或 -1, 而非 %r"
127
+ % (ignore_timeout_retry,)
128
+ )
129
+ ignore_timeout_retry: int = ignore_timeout_retry
130
+ # . API 限流
131
+ ignore_api_limit: bool = bool(ignore_api_limit)
132
+ if (
133
+ not isinstance(ignore_api_limit_wait, (float, int))
134
+ or ignore_api_limit_wait < 0
135
+ ):
136
+ raise errors.ApiSettingsError(
137
+ "忽略 API 限流时的等待时间必须为非负整数或浮点数, 而非 %r"
138
+ % (ignore_api_limit_wait,)
139
+ )
140
+ ignore_api_limit_wait: float = float(ignore_api_limit_wait)
141
+ if not isinstance(ignore_api_limit_retry, int) or ignore_api_limit_retry < -1:
142
+ raise errors.ApiSettingsError(
143
+ "忽略 API 限流时的最大重试次数必须为正整数或 -1, 而非 %r"
144
+ % (ignore_api_limit_retry,)
145
+ )
146
+ ignore_api_limit_retry: int = ignore_api_limit_retry
147
+ # . 服务器内部错误 (500错误码, 仅限 Internal Server Error 类型)
148
+ ignore_internal_server_error: bool = bool(ignore_internal_server_error)
149
+ if (
150
+ not isinstance(ignore_internal_server_error_wait, (float, int))
151
+ or ignore_internal_server_error_wait < 0
152
+ ):
153
+ raise errors.ApiSettingsError(
154
+ "忽略服务器内部错误时的等待时间必须为非负整数或浮点数, 而非 %r"
155
+ % (ignore_internal_server_error_wait,)
156
+ )
157
+ ignore_internal_server_error_wait: float = float(
158
+ ignore_internal_server_error_wait
159
+ )
160
+ if (
161
+ not isinstance(ignore_internal_server_error_retry, int)
162
+ or ignore_internal_server_error_retry < -1
163
+ ):
164
+ raise errors.ApiSettingsError(
165
+ "忽略服务器内部错误时的最大重试次数必须为正整数或 -1, 而非 %r"
166
+ % (ignore_internal_server_error_retry,)
167
+ )
168
+ ignore_internal_server_error_retry: int = ignore_internal_server_error_retry
169
+ # . 无法链接互联网
170
+ ignore_internet_connection: bool = bool(ignore_internet_connection)
171
+ if (
172
+ not isinstance(ignore_internet_connection_wait, (float, int))
173
+ or ignore_internet_connection_wait < 0
174
+ ):
175
+ raise errors.ApiSettingsError(
176
+ "忽略无法链接互联网时的等待时间必须为非负整数或浮点数, 而非 %r"
177
+ % (ignore_internet_connection_wait,)
178
+ )
179
+ ignore_internet_connection_wait: float = float(ignore_internet_connection_wait)
180
+ if (
181
+ not isinstance(ignore_internet_connection_retry, int)
182
+ or ignore_internet_connection_retry < -1
183
+ ):
184
+ raise errors.ApiSettingsError(
185
+ "忽略无法链接互联网时的最大重试次数必须为正整数或 -1, 而非 %r"
186
+ % (ignore_internet_connection_retry,)
187
+ )
188
+ ignore_internet_connection_retry: int = ignore_internet_connection_retry
189
+ # 初始化
190
+ kwargs = {
191
+ "app_id": app_id,
192
+ "app_secret": app_secret,
193
+ "app_cipher": app_cipher,
194
+ "timeout": timeout,
195
+ "ignore_timeout": ignore_timeout,
196
+ "ignore_timeout_wait": ignore_timeout_wait,
197
+ "ignore_timeout_retry": ignore_timeout_retry,
198
+ "ignore_api_limit": ignore_api_limit,
199
+ "ignore_api_limit_wait": ignore_api_limit_wait,
200
+ "ignore_api_limit_retry": ignore_api_limit_retry,
201
+ "ignore_internal_server_error": ignore_internal_server_error,
202
+ "ignore_internal_server_error_wait": ignore_internal_server_error_wait,
203
+ "ignore_internal_server_error_retry": ignore_internal_server_error_retry,
204
+ "ignore_internet_connection": ignore_internet_connection,
205
+ "ignore_internet_connection_wait": ignore_internet_connection_wait,
206
+ "ignore_internet_connection_retry": ignore_internet_connection_retry,
207
+ }
208
+ super().__init__(**kwargs)
209
+ self._basic: BasicAPI = BasicAPI(**kwargs)
210
+ self._sales: SalesAPI = SalesAPI(**kwargs)
211
+ self._fba: FbaAPI = FbaAPI(**kwargs)
212
+ self._product: ProductAPI = ProductAPI(**kwargs)
213
+ self._purchase: PurchaseAPI = PurchaseAPI(**kwargs)
214
+ self._warehouse: WarehouseAPI = WarehouseAPI(**kwargs)
215
+ self._ads: AdsAPI = AdsAPI(**kwargs)
216
+ self._finance: FinanceAPI = FinanceAPI(**kwargs)
217
+ self._tools: ToolsAPI = ToolsAPI(**kwargs)
218
+ self._source: SourceAPI = SourceAPI(**kwargs)
219
+
220
+ # 公共 API --------------------------------------------------------------------------------------
221
+ # . 授权
222
+ async def AccessToken(self) -> schema.Token:
223
+ """获取领星 API 的访问令牌
224
+
225
+ ## Docs
226
+ - 授权: [获取 access-token和refresh-token](https://apidoc.lingxing.com/#/docs/Authorization/GetToken)
227
+
228
+ :returns `<'Token'>`: 返回接口的访问令牌
229
+ ```python
230
+ {
231
+ # 接口的访问令牌
232
+ "access_token": "your_access_token",
233
+ # 用于续约 access_token 的更新令牌
234
+ "refresh_token": "your_refresh_token",
235
+ # 访问令牌的有效时间 (单位: 秒)
236
+ "expires_in": 3600
237
+ }
238
+ ```
239
+ """
240
+ return await self._AccessToken()
241
+
242
+ async def RefreshToken(self, refresh_token: str) -> schema.Token:
243
+ """基于 refresh_token 刷新领星 API 的访问令牌
244
+
245
+ ## Docs
246
+ - 授权: [续约接口令牌](https://apidoc.lingxing.com/#/docs/Authorization/RefreshToken)
247
+
248
+ :param refresh_token `<'str'>`: 用于续约 refresh_token 的令牌
249
+ :returns `<'Token'>`: 返回接口的访问令牌
250
+ ```python
251
+ {
252
+ # 接口的访问令牌
253
+ "access_token": "your_access_token",
254
+ # 用于续约 access_token 的更新令牌
255
+ "refresh_token": "your_refresh_token",
256
+ # 访问令牌的有效时间 (单位: 秒)
257
+ "expires_in": 3600
258
+ }
259
+ ```
260
+ """
261
+ return await self._RefreshToken(refresh_token)
262
+
263
+ # . 基础数据
264
+ @property
265
+ def basic(self) -> BasicAPI:
266
+ """领星API `基础数据` 接口 `<'BasicAPI'>`
267
+
268
+ ## Docs
269
+ * 基础数据
270
+ - Marketplaces: [查询亚马逊市场列表](https://apidoc.lingxing.com/#/docs/BasicData/AllMarketplace)
271
+ - States: [查询亚马逊国家下地区列表](https://apidoc.lingxing.com/#/docs/BasicData/WorldStateLists)
272
+ - Sellers: [查询亚马逊店铺列表](https://apidoc.lingxing.com/#/docs/BasicData/SellerLists)
273
+ - ConceptSellers: [查询亚马逊概念店铺列表](https://apidoc.lingxing.com/#/docs/BasicData/ConceptSellerLists)
274
+ - RenameSellers: [批量修改店铺名称](https://apidoc.lingxing.com/#/docs/BasicData/SellerBatchRename)
275
+ - Accounts: [查询ERP用户信息列表](https://apidoc.lingxing.com/#/docs/BasicData/AccoutLists)
276
+ - ExchangeRates: [查询汇率](https://apidoc.lingxing.com/#/docs/BasicData/Currency)
277
+ - UpdateExchangeRate: [修改我的汇率](https://apidoc.lingxing.com/#/docs/BasicData/ExchangeRateUpdate)
278
+ """
279
+ return self._basic
280
+
281
+ # . 销售数据
282
+ @property
283
+ def sales(self) -> SalesAPI:
284
+ """领星API `销售数据` 接口 `<'SalesAPI'>`
285
+
286
+ ## Docs
287
+ * 销售 - Listing
288
+ - Listings: [查询亚马逊Listing](https://apidoc.lingxing.com/#/docs/Sale/Listing)
289
+ - EditListingOperators: [批量分配Listing负责人](https://apidoc.lingxing.com/#/docs/Sale/UpdatePrincipal)
290
+ - EditListingPrices: [批量修改Listing价格](https://apidoc.lingxing.com/#/docs/Sale/pricingSubmit)
291
+ - PairListingProducts: [批量添加/编辑Listing配对](https://apidoc.lingxing.com/#/docs/Sale/Productlink)
292
+ - UnpairListingProducts: [解除Listing配对](https://apidoc.lingxing.com/#/docs/Sale/UnlinkListing)
293
+ - ListingGlobalTags: [查询Listing标签列表](https://apidoc.lingxing.com/#/docs/Sale/globalTagPageList)
294
+ - CreateListingGlobalTag: [添加Listing标签](https://apidoc.lingxing.com/#/docs/Sale/globalTagAddTag)
295
+ - RemoveListingGlobalTag: [删除Listing标签](https://apidoc.lingxing.com/#/docs/Sale/globalTagRemoveTag)
296
+ - ListingTags: [查询Listing标记标签列表](https://apidoc.lingxing.com/#/docs/Sale/queryListingRelationTagList)
297
+ - SetListingTag: [Listing新增商品标签](https://apidoc.lingxing.com/#/docs/Sale/AddGoodsTag)
298
+ - UnsetListingTag: [Listing删除商品标签](https://apidoc.lingxing.com/#/docs/Sale/DeleteGoodsTag)
299
+ - ListingFbaFees: [批量获取Listing费用](https://apidoc.lingxing.com/#/docs/Sale/GetPrices)
300
+ - EditListingFbms: [修改FBM库存&处理时间](https://apidoc.lingxing.com/#/docs/Sale/UpdateFbmInventory)
301
+ - ListingOperationLogs: [查询Listing操作日志列表](https://apidoc.lingxing.com/#/docs/Sale/listingOperateLogPageList)
302
+
303
+ * 销售 - 平台订单
304
+ - Orders: [查询亚马逊订单列表](https://apidoc.lingxing.com/#/docs/Sale/Orderlists)
305
+ - OrderDetails: [查询亚马逊订单详情](https://apidoc.lingxing.com/#/docs/Sale/OrderDetail)
306
+ - EditOrderNote: [SC订单-设置订单备注](https://apidoc.lingxing.com/#/docs/Sale/ScOrderSetRemark)
307
+ - AfterSalesOrders: [查询售后订单列表](https://apidoc.lingxing.com/#/docs/Sale/afterSaleList)
308
+ - McfOrders: [查询亚马逊多渠道订单列表-v2](https://apidoc.lingxing.com/#/docs/Sale/OrderMCFOrders)
309
+ - McfOrderDetails: [查询亚马逊多渠道订单详情-商品信息](https://apidoc.lingxing.com/#/docs/Sale/ProductInformation)
310
+ - McfOrderLogistics: [查询亚马逊多渠道订单详情-物流信息](https://apidoc.lingxing.com/#/docs/Sale/LogisticsInformation)
311
+ - McfAfterSalesOrders: [查询亚马逊多渠道订单详情-退货换货信息](https://apidoc.lingxing.com/#/docs/Sale/ReturnInfomation)
312
+ - McfOrderTransaction: [多渠道订单-交易明细](https://apidoc.lingxing.com/#/docs/Sale/MutilChannelTransactionDetail)
313
+
314
+ * 销售 - 自发货管理
315
+ - FbmOrders: [查询亚马逊自发货订单列表](https://apidoc.lingxing.com/#/docs/Sale/FBMOrderList)
316
+ - FbmOrderDetail: [查询亚马逊自发货订单详情](https://apidoc.lingxing.com/#/docs/Sale/FBMOrderDetail)
317
+
318
+ * 销售 - 促销管理
319
+ - PromotionCoupons: [查询促销活动列表-优惠券](https://apidoc.lingxing.com/#/docs/Sale/promotionalActivitiesCouponList)
320
+ - PromotionDeals: [查询促销活动列表-秒杀](https://apidoc.lingxing.com/#/docs/Sale/promotionalActivitiesSecKillList)
321
+ - PromotionActivities: [查询促销活动列表-管理促销](https://apidoc.lingxing.com/#/docs/Sale/promotionalActivitiesManageList)
322
+ - PromotionDiscounts: [查询促销活动列表-会员折扣](https://apidoc.lingxing.com/#/docs/Sale/promotionalActivitiesVipDiscountList)
323
+ - PromotionOnListings: [查询商品折扣列表](https://apidoc.lingxing.com/#/docs/Sale/promotionListingList)
324
+ """
325
+ return self._sales
326
+
327
+ # . FBA数据
328
+ @property
329
+ def fba(self) -> FbaAPI:
330
+ """领星API `FBA数据` 接口 `<'FbaAPI'>`
331
+
332
+ ## Docs
333
+ * FBA - FBA货件 (STA)
334
+ - StaPlans: [查询STA任务列表](https://apidoc.lingxing.com/#/docs/FBA/QuerySTATaskList)
335
+ - StaPlanDetail: [查询STA任务详情](https://apidoc.lingxing.com/#/docs/FBA/StaTaskDetail)
336
+ - PackingGroups: [查询包装组](https://apidoc.lingxing.com/#/docs/FBA/ListPackingGroupItems)
337
+ - PackingGroupBoxes: [查询STA任务包装组装箱信息](https://apidoc.lingxing.com/#/docs/FBA/QuerySTATaskBoxInformation)
338
+ - PlacementOptions: [查询货件方案](https://apidoc.lingxing.com/#/docs/FBA/ShipmentPreView)
339
+ - PlacementOptionBoxes: [查询货件方案的装箱信息](https://apidoc.lingxing.com/#/docs/FBA/getInboundPackingBoxInfo)
340
+ - Shipments: [查询货件列表](https://apidoc.lingxing.com/#/docs/FBA/FBAShipmentList)
341
+ - ShipmentDetails: [查询货件详情](https://apidoc.lingxing.com/#/docs/FBA/ShipmentDetailList)
342
+ - ShipmentBoxes: [查询货件装箱信息](https://apidoc.lingxing.com/#/docs/FBA/ListShipmentBoxes)
343
+ - ShipmentTransports: [查询承运方式](https://apidoc.lingxing.com/#/docs/FBA/GetTransportList)
344
+ - ShipmentReceiptRecords: [查询FBA到货接收明细](https://apidoc.lingxing.com/#/docs/FBA/FBAReceivedInventory)
345
+ - ShipmentDeliveryAddress: [地址簿-配送地址详情](https://apidoc.lingxing.com/#/docs/FBA/ShoppingAddress)
346
+ - ShipFromAddresses: [地址簿-发货地址列表](https://apidoc.lingxing.com/#/docs/FBA/ShipFromAddressList)
347
+ """
348
+ return self._fba
349
+
350
+ # . 产品数据
351
+ @property
352
+ def product(self) -> ProductAPI:
353
+ """领星API `产品数据` 接口 `<'ProductAPI'>`
354
+
355
+ ## Docs
356
+ * 产品
357
+ - Products: [查询本地产品列表](https://apidoc.lingxing.com/#/docs/Product/ProductLists)
358
+ - ProductDetails: [批量查询本地产品详情](https://apidoc.lingxing.com/#/docs/Product/batchGetProductInfo)
359
+ - EnableProducts: [产品启用、禁用](https://apidoc.lingxing.com/#/docs/Product/productOperateBatch)
360
+ - DisableProducts: [产品启用、禁用](https://apidoc.lingxing.com/#/docs/Product/productOperateBatch)
361
+ - EditProduct: [添加/编辑本地产品](https://apidoc.lingxing.com/#/docs/Product/SetProduct)
362
+ - SpuProducts: [查询多属性产品列表](https://apidoc.lingxing.com/#/docs/Product/spuList)
363
+ - SpuProductDetail: [查询多属性产品详情](https://apidoc.lingxing.com/#/docs/Product/spuInfo)
364
+ - EditSpuProduct: [添加/编辑多属性产品](https://apidoc.lingxing.com/#/docs/Product/spuSet)
365
+ - BundleProducts: [查询捆绑产品关系列表](https://apidoc.lingxing.com/#/docs/Product/bundledProductList)
366
+ - EditBundleProduct: [添加/编辑捆绑产品](https://apidoc.lingxing.com/#/docs/Product/SetBundled)
367
+ - AuxiliaryMaterials: [查询产品辅料列表](https://apidoc.lingxing.com/#/docs/Product/productAuxList)
368
+ - EditAuxiliaryMaterial: [添加/编辑辅料](https://apidoc.lingxing.com/#/docs/Product/setAux)
369
+ - ProductCodes: [获取UPC编码列表](https://apidoc.lingxing.com/#/docs/Product/UpcList)
370
+ - CreateProductCode: [创建UPC编码](https://apidoc.lingxing.com/#/docs/Product/AddCommodityCode)
371
+ - ProductGlobalTags: [查询产品标签](https://apidoc.lingxing.com/#/docs/Product/GetProductTag)
372
+ - CreateProductGlobalTag: [创建产品标签](https://apidoc.lingxing.com/#/docs/Product/CreateProductTag)
373
+ - SetProductTag: [标记产品标签](https://apidoc.lingxing.com/#/docs/Product/SetProductTag)
374
+ - UnsetProductTag: [删除产品标签](https://apidoc.lingxing.com/#/docs/Product/DelProductTag)
375
+ - ProductGlobalAttributes: [查询产品属性列表](https://apidoc.lingxing.com/#/docs/Product/attributeList)
376
+ - EditProductGlobalAttribute: [添加/编辑产品属性](https://apidoc.lingxing.com/#/docs/Product/attributeSet)
377
+ - ProductBrands: [查询产品品牌列表](https://apidoc.lingxing.com/#/docs/Product/productBrandList)
378
+ - EditProductBrands: [添加/编辑产品品牌](https://apidoc.lingxing.com/#/docs/Product/SetBrand)
379
+ - ProductCategories: [查询产品分类列表](https://apidoc.lingxing.com/#/docs/Product/Category)
380
+ - EditProductCategories: [添加/编辑产品分类](https://apidoc.lingxing.com/#/docs/Product/SetCategory)
381
+ """
382
+ return self._product
383
+
384
+ # . 采购数据
385
+ @property
386
+ def purchase(self) -> PurchaseAPI:
387
+ """领星API `采购数据` 接口 `<'PurchaseAPI'>`
388
+
389
+ ## Docs
390
+ * 采购
391
+ - Suppliers: [查询供应商列表](https://apidoc.lingxing.com/#/docs/Purchase/Supplier)
392
+ - EditSupplier: [添加/修改供应商](https://apidoc.lingxing.com/#/docs/Purchase/SupplierEdit)
393
+ - Purchasers: [查询采购方列表](https://apidoc.lingxing.com/#/docs/Purchase/Purchaser)
394
+ - PurchasePlans: [查询采购计划列表](https://apidoc.lingxing.com/#/docs/Purchase/getPurchasePlans)
395
+ """
396
+ return self._purchase
397
+
398
+ # . 仓库数据
399
+ @property
400
+ def warehouse(self) -> WarehouseAPI:
401
+ """领星API `仓库数据` 接口 `<'WarehouseAPI'>`
402
+
403
+ ## Docs
404
+ * 仓库 - 仓库设置
405
+ - Warehouses: [查询仓库列表](https://apidoc.lingxing.com/#/docs/Warehouse/WarehouseLists)
406
+ - WarehouseBins: [查询本地仓位列表](https://apidoc.lingxing.com/#/docs/Warehouse/warehouseBin)
407
+
408
+ * 仓库 - 库存&流水
409
+ - FbaInventory: [查询FBA库存列表](https://apidoc.lingxing.com/#/docs/Warehouse/FBAStock)
410
+ - FbaInventoryDetails: [查询FBA库存列表-v2](https://apidoc.lingxing.com/#/docs/Warehouse/FBAStockDetail)
411
+ - AwdInventory: [查询AWD库存列表](https://apidoc.lingxing.com/#/docs/Warehouse/AwdWarehouseDetail)
412
+ - SellerInventory: [查询仓库库存明细](https://apidoc.lingxing.com/#/docs/Warehouse/InventoryDetails)
413
+ - SellerInventoryBins: [查询仓位库存明细](https://apidoc.lingxing.com/#/docs/Warehouse/inventoryBinDetails)
414
+ - SellerInventoryBatches: [查询批次明细](https://apidoc.lingxing.com/#/docs/Warehouse/GetBatchDetailList)
415
+ - SellerInventoryRecords: [查询批次流水](https://apidoc.lingxing.com/#/docs/Warehouse/GetBatchStatementList)
416
+ - SellerInventoryOperations: [查询库存流水(新)](https://apidoc.lingxing.com/#/docs/Warehouse/WarehouseStatementNew)
417
+ - SellerInventoryBinRecords: [查询仓位流水](https://apidoc.lingxing.com/#/docs/Warehouse/wareHouseBinStatement)
418
+ """
419
+ return self._warehouse
420
+
421
+ # . 广告数据
422
+ @property
423
+ def ads(self) -> AdsAPI:
424
+ """领星API `广告数据` 接口 `<'AdsAPI'>`
425
+
426
+ ## Docs
427
+ * 新广告 - 基础数据
428
+ - AdProfiles: [查询广告账号列表](https://apidoc.lingxing.com/#/docs/newAd/baseData/dspAccountList)
429
+ - Portfolios: [广告组合](https://apidoc.lingxing.com/#/docs/newAd/baseData/portfolios)
430
+ - SpCampaigns: [SP广告活动](https://apidoc.lingxing.com/#/docs/newAd/baseData/spCampaigns)
431
+ - SpAdGroups: [SP广告组](https://apidoc.lingxing.com/#/docs/newAd/baseData/spAdGroups)
432
+ - SpProducts: [SP广告商品](https://apidoc.lingxing.com/#/docs/newAd/baseData/spProductAds)
433
+ - SpKeywords: [SP关键词](https://apidoc.lingxing.com/#/docs/newAd/baseData/spKeywords)
434
+ - SpTargets: [SP商品定位](https://apidoc.lingxing.com/#/docs/newAd/baseData/spTargets)
435
+ - SpNegativeKeywords: [SP否定投放(keyword)](https://apidoc.lingxing.com/#/docs/newAd/baseData/spNegativeTargetsOrKeywords)
436
+ - SpNegativeTargets: [SP否定投放(target)](https://apidoc.lingxing.com/#/docs/newAd/baseData/spNegativeTargetsOrKeywords)
437
+ - SbCampaigns: [SB广告活动](https://apidoc.lingxing.com/#/docs/newAd/baseData/hsaCampaigns)
438
+ - SbAdGroups: [SB广告组](https://apidoc.lingxing.com/#/docs/newAd/baseData/hsaAdGroups)
439
+ - SbCreatives: [SB广告创意](https://apidoc.lingxing.com/#/docs/newAd/baseData/sbAdHasProductAds)
440
+ - SbKeywords: [SB广告的投放(keyword)](https://apidoc.lingxing.com/#/docs/newAd/baseData/sbTargeting)
441
+ - SbTargets: [SB广告的投放](https://apidoc.lingxing.com/#/docs/newAd/baseData/sbTargeting)
442
+ - SbNegativeKeywords: [SB否定关键词](https://apidoc.lingxing.com/#/docs/newAd/baseData/hsaNegativeKeywords)
443
+ - SbNegativeTargets: [SB否定商品投放](https://apidoc.lingxing.com/#/docs/newAd/baseData/hsaNegativeTargets)
444
+ - SdCampaigns: [SD广告活动](https://apidoc.lingxing.com/#/docs/newAd/baseData/sdCampaigns)
445
+ - SdAdGroups: [SD广告组](https://apidoc.lingxing.com/#/docs/newAd/baseData/sdAdGroups)
446
+ - SdProducts: [SD广告商品](https://apidoc.lingxing.com/#/docs/newAd/baseData/sdProductAds)
447
+ - SdTargets: [SD商品定位](https://apidoc.lingxing.com/#/docs/newAd/baseData/sdTargets)
448
+ - SdNegativeTargets: [SD否定商品定位](https://apidoc.lingxing.com/#/docs/newAd/baseData/sdNegativeTargets)
449
+
450
+ * 新广告 - 报告
451
+ - SpCampaignReports: [SP广告活动报表](https://apidoc.lingxing.com/#/docs/newAd/report/spCampaignReports)
452
+ - SpCampaignHourData: [SP广告活动小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/spCampaignHourData)
453
+ - SpPlacementReports: [SP广告位报告](https://apidoc.lingxing.com/#/docs/newAd/report/campaignPlacementReports)
454
+ - SpPlacementHourData: [SP广告位小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/spAdPlacementHourData)
455
+ - SpAdGroupReports: [SP广告组报表](https://apidoc.lingxing.com/#/docs/newAd/report/spAdGroupReports)
456
+ - SpAdGroupHourData: [SP广告组小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/spAdGroupHourData)
457
+ - SpProductReports: [SP广告商品报表](https://apidoc.lingxing.com/#/docs/newAd/report/spProductAdReports)
458
+ - SpProductHourData: [SP广告小时数据(ad)](https://apidoc.lingxing.com/#/docs/newAd/report/spTargetHourData)
459
+ - SpKeywordReports: [SP关键词报表](https://apidoc.lingxing.com/#/docs/newAd/report/spKeywordReports)
460
+ - SpKeywordHourData: [SP广告小时数据(both_ad_target)](https://apidoc.lingxing.com/#/docs/newAd/report/spTargetHourData)
461
+ - SpTargetReports: [SP商品定位报表](https://apidoc.lingxing.com/#/docs/newAd/report/spTargetReports)
462
+ - SpTargetHourData: [SP投放小时数据(both_ad_target)](https://apidoc.lingxing.com/#/docs/newAd/report/spTargetHourData)
463
+ - SpQueryWordReports: [SP用户搜索词报表](https://apidoc.lingxing.com/#/docs/newAd/report/queryWordReports)
464
+ - SbCampaignReports: [SB广告活动报表](https://apidoc.lingxing.com/#/docs/newAd/report/hsaCampaignReports)
465
+ - SbCampaignHourData: [SB广告活动小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sbCampaignHourData)
466
+ - SbPlacementReports: [SB广告活动-广告位报告](https://apidoc.lingxing.com/#/docs/newAd/report/hsaCampaignPlacementReports)
467
+ - SbPlacementHourData: [SB广告位小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sbAdPlacementHourData)
468
+ - SbAdGroupReports: [SB广告组报表](https://apidoc.lingxing.com/#/docs/newAd/report/hsaAdGroupReports)
469
+ - SbAdGroupHourData: [SB广告组小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sbAdGroupHourData)
470
+ - SbCreativeReports: [SB广告创意报告](https://apidoc.lingxing.com/#/docs/newAd/report/listHsaProductAdReport)
471
+ - SbKeywordReports: [SB广告的投放报告(keyword)](https://apidoc.lingxing.com/#/docs/newAd/report/listHsaTargetingReport)
472
+ - SbTargetReports: [SB广告的投放报告(product)](https://apidoc.lingxing.com/#/docs/newAd/report/listHsaTargetingReport)
473
+ - SbTargetingHourData: [SB投放小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sbTargetHourData)
474
+ - SbQueryWordReports: [SB用户搜索词报表](https://apidoc.lingxing.com/#/docs/newAd/report/hsaQueryWordReports)
475
+ - SbAsinAttributionReports: [SB广告归因于广告的购买报告](https://apidoc.lingxing.com/#/docs/newAd/report/hsaPurchasedAsinReports)
476
+ - SbCostAllocationReports: [SB分摊](https://apidoc.lingxing.com/#/docs/newAd/baseData/newadsbDivideAsinReports)
477
+ - SdCampaignReports: [SD广告活动报表](https://apidoc.lingxing.com/#/docs/newAd/report/sdCampaignReports)
478
+ - SdCampaignHourData: [SD广告活动小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sdCampaignHourData)
479
+ - SdAdGroupReports: [SD广告组报表](https://apidoc.lingxing.com/#/docs/newAd/report/sdAdGroupReports)
480
+ - SdAdGroupHourData: [SD广告组小时数据](https://apidoc.lingxing.com/#/docs/newAd/report/sdAdGroupHourData)
481
+ - SdProductReports: [SD广告商品报表](https://apidoc.lingxing.com/#/docs/newAd/report/sdProductAdReports)
482
+ - SdProductHourData: [SD广告小时数据(ad)](https://apidoc.lingxing.com/#/docs/newAd/report/sdAdvertiseHourData)
483
+ - SdTargetReports: [SD商品定位报表](https://apidoc.lingxing.com/#/docs/newAd/report/sdTargetReports)
484
+ - SdTargetHourData: [SD投放小时数据(both_ad_target)](https://apidoc.lingxing.com/#/docs/newAd/report/sdTargetHourData)
485
+ - SdMatchedTargetReports: [SD匹配的目标报表](https://apidoc.lingxing.com/#/docs/newAd/report/sdMatchTargetReports)
486
+ - DspReports: [查询DSP报告列表-订单](https://apidoc.lingxing.com/#/docs/newAd/report/dspReportOrderList)
487
+
488
+ * 新广告 - 报表下载
489
+ - DownloadAbaReport: [ABA搜索词报告-按周维度](https://apidoc.lingxing.com/#/docs/newAd/reportDownload/abaReport)
490
+
491
+ * 新广告
492
+ - AdsOperationLogs: [操作日志(新)](https://apidoc.lingxing.com/#/docs/newAd/apiLogStandard)
493
+ """
494
+ return self._ads
495
+
496
+ # . 财务数据
497
+ @property
498
+ def finance(self) -> FinanceAPI:
499
+ """领星API `财务数据` 接口 `<'FinanceAPI'>`
500
+
501
+ ## Docs
502
+ * 财务
503
+ - UserFeeTypes: [查询费用类型列表](https://apidoc.lingxing.com/#/docs/Finance/feeManagementType)
504
+ - Transactions: [查询结算中心-交易明细](https://apidoc.lingxing.com/#/docs/Finance/settlementTransactionList)
505
+ - Settlements: [查询结算中心-结算汇总](https://apidoc.lingxing.com/#/docs/Finance/settlementSummaryList)
506
+ - ShipmentSettlements: [查询发货结算报告](https://apidoc.lingxing.com/#/docs/Finance/SettlementReport)
507
+ - Receivables: [应收报告-列表查询](https://apidoc.lingxing.com/#/docs/Finance/receivableReportList)
508
+ - LedgerDetail: [查询库存分类账detail数据](https://apidoc.lingxing.com/#/docs/Finance/centerOdsDetailQuery)
509
+ - LedgerSummary: [查询库存分类账summary数据](https://apidoc.lingxing.com/#/docs/Finance/summaryQuery)
510
+ - LedgerValuation: [查询FBA成本计价流水](https://apidoc.lingxing.com/#/docs/Finance/CostStream)
511
+ - AdsInvoices: [查询广告发票列表](https://apidoc.lingxing.com/#/docs/Finance/InvoiceList)
512
+ - AdsInvoiceDetail: [查询广告发票基本信息](https://apidoc.lingxing.com/#/docs/Finance/InvoiceDetail)
513
+ - AdsCampaignInvoices: [查询广告发票活动列表](https://apidoc.lingxing.com/#/docs/Finance/InvoiceCampaignList)
514
+ - IncomeStatementSellers: [查询利润报表-店铺](https://apidoc.lingxing.com/#/docs/Finance/bdSeller)
515
+ - IncomeStatementAsins: [查询利润报表-ASIN](https://apidoc.lingxing.com/#/docs/Finance/bdASIN)
516
+ - IncomeStatementParentAsins: [查询利润报表-父ASIN](https://apidoc.lingxing.com/#/docs/Finance/bdParentASIN)
517
+ - IncomeStatementMskus: [查询利润报表-MSKU](https://apidoc.lingxing.com/#/docs/Finance/bdMSKU)
518
+ - IncomeStatementLskus: [查询利润报表-SKU](https://apidoc.lingxing.com/#/docs/Finance/bdSKU)
519
+ """
520
+ return self._finance
521
+
522
+ # . 工具数据
523
+ @property
524
+ def tools(self) -> ToolsAPI:
525
+ """领星API `工具数据` 接口 `<'ToolsAPI'>`
526
+
527
+ ## Docs
528
+ * 工具
529
+ - MonitorKeywords: [关键词列表](https://apidoc.lingxing.com/#/docs/Tools/GetKeywordList)
530
+ - MonitorAsins: [查询竞品监控列表](https://apidoc.lingxing.com/#/docs/Tools/CompetitiveMonitorList)
531
+ """
532
+ return self._tools
533
+
534
+ # . 亚马逊源数据
535
+ @property
536
+ def source(self) -> SourceAPI:
537
+ """领星API `亚马逊源数据` 接口 `<'SourceAPI'>`
538
+
539
+ ## Docs
540
+ * 订单数据
541
+ - Orders: [查询亚马逊源报表-所有订单](https://apidoc.lingxing.com/#/docs/SourceData/AllOrders)
542
+ - FbaOrders: [查询亚马逊源报表-FBA订单](https://apidoc.lingxing.com/#/docs/SourceData/FbaOrders)
543
+ - FbaReplacementOrders: [查询亚马逊源报表-FBA换货订单](https://apidoc.lingxing.com/#/docs/SourceData/fbaExchangeOrderList)
544
+ - FbaReturnOrders: [查询亚马逊源报表-FBA退货订单](https://apidoc.lingxing.com/#/docs/SourceData/RefundOrders)
545
+ - FbaShipments: [查询亚马逊源报表—Amazon Fulfilled Shipments](https://apidoc.lingxing.com/#/docs/SourceData/getAmazonFulfilledShipmentsList)
546
+ - FbmReturnOrders: [查询亚马逊源报表-FBM退货订单](https://apidoc.lingxing.com/#/docs/SourceData/fbmReturnOrderList)
547
+ - FbaRemovalOrders: [查询亚马逊源报表-移除订单(新)](https://apidoc.lingxing.com/#/docs/SourceData/RemovalOrderListNew)
548
+ - FbaRemovalShipments: [查询亚马逊源报表-移除货件(新)](https://apidoc.lingxing.com/#/docs/SourceData/RemovalShipmentList)
549
+ - FbaInventory: [查询亚马逊源报表-FBA库存](https://apidoc.lingxing.com/#/docs/SourceData/ManageInventory)
550
+ - FbaReservedInventory: [查询亚马逊源报表-预留库存](https://apidoc.lingxing.com/#/docs/SourceData/ReservedInventory)
551
+ - FbaInventoryHealth: [查询亚马逊源报表—库龄表](https://apidoc.lingxing.com/#/docs/SourceData/getFbaAgeList)
552
+ - FbaInventoryAdjustments: [查询亚马逊源报表-盘存记录](https://apidoc.lingxing.com/#/docs/SourceData/AdjustmentList)
553
+ - ExportReportTask: [报告导出 - 创建导出任务](https://apidoc.lingxing.com/#/docs/Statistics/reportCreateReportExportTask)
554
+ - ExportReportResult: [报告导出-查询导出任务结果](https://apidoc.lingxing.com/#/docs/Statistics/reportQueryReportExportTask)
555
+ - ExportReportRefresh: [报告导出 - 报告下载链接续期](https://apidoc.lingxing.com/#/docs/Statistics/AmazonReportExportTask)
556
+ """
557
+ return self._source
File without changes