producteca 1.0.14__py3-none-any.whl → 2.0.57__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.
- producteca/__init__.py +3 -0
- producteca/abstract/abstract_dataclass.py +20 -18
- producteca/client.py +8 -21
- producteca/config/__init__.py +0 -1
- producteca/payments/payments.py +4 -16
- producteca/payments/tests/test_payments.py +21 -5
- producteca/products/__init__.py +0 -1
- producteca/products/products.py +237 -81
- producteca/products/search_products.py +136 -0
- producteca/products/tests/test_products.py +111 -38
- producteca/{search/tests/test_search.py → products/tests/test_search_products.py} +15 -86
- producteca/sales_orders/__init__.py +0 -1
- producteca/sales_orders/sales_orders.py +292 -118
- producteca/sales_orders/search_sale_orders.py +152 -0
- producteca/sales_orders/tests/search.json +137 -0
- producteca/sales_orders/tests/test_sales_orders.py +55 -26
- producteca/sales_orders/tests/test_search_so.py +46 -0
- producteca/shipments/shipment.py +0 -14
- producteca/shipments/tests/test_shipment.py +28 -23
- producteca/utils.py +50 -0
- producteca-2.0.57.dist-info/LICENSE +661 -0
- {producteca-1.0.14.dist-info → producteca-2.0.57.dist-info}/METADATA +33 -2
- producteca-2.0.57.dist-info/RECORD +33 -0
- producteca/search/__init__.py +0 -0
- producteca/search/search.py +0 -149
- producteca/search/search_sale_orders.py +0 -170
- producteca/search/tests/__init__.py +0 -0
- producteca-1.0.14.dist-info/RECORD +0 -31
- {producteca-1.0.14.dist-info → producteca-2.0.57.dist-info}/WHEEL +0 -0
- {producteca-1.0.14.dist-info → producteca-2.0.57.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: producteca
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.57
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Chroma Agency, Matias Rivera
|
|
6
6
|
Author-email: mrivera@chroma.agency
|
|
@@ -12,8 +12,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Requires-Dist: coverage (>=7.2.0,<8.0.0)
|
|
15
|
-
Requires-Dist: pydantic (>=2.
|
|
15
|
+
Requires-Dist: pydantic (>=2.7.4,<3.0.0)
|
|
16
16
|
Requires-Dist: requests (>=2.32.4,<3.0.0)
|
|
17
|
+
Requires-Dist: typing_extensions (>=4.10.0,<5.0.0)
|
|
17
18
|
Description-Content-Type: text/markdown
|
|
18
19
|
|
|
19
20
|
[](https://qlty.sh/gh/ChromaAgency/projects/producteca_python)
|
|
@@ -38,10 +39,40 @@ To use the Producteca client, first instantiate `ProductecaClient` with your cre
|
|
|
38
39
|
from producteca.client import ProductecaClient
|
|
39
40
|
|
|
40
41
|
client = ProductecaClient(token='your_token', api_key='your_api_key')
|
|
42
|
+
|
|
43
|
+
# Usage examples for SalesOrderService
|
|
44
|
+
sale_order_service = client.SalesOrder
|
|
45
|
+
# Get from api
|
|
46
|
+
sale_order = sale_order_service.get(123)
|
|
47
|
+
# or construct from db
|
|
48
|
+
sale_order = client.SalesOrder(...argswithid)
|
|
49
|
+
labels = sale_order.get_shipping_labels()
|
|
50
|
+
close_response = sale_order.close()
|
|
51
|
+
cancel_response = sale_order.cancel()
|
|
52
|
+
synchronized_order = sale_order.synchronize()
|
|
53
|
+
invoice_response = sale_order.invoice_integration(sale_order)
|
|
54
|
+
search_results = sale_order_service.search(params)
|
|
55
|
+
payment = sale_order.add_payment(payment_payload)
|
|
56
|
+
updated_payment = sale_order.update_payment(payment_id, payment_payload)
|
|
57
|
+
shipment = sale_order.add_shipment(shipment_payload)
|
|
58
|
+
updated_shipment = sale_order.update_shipment(shipment_id, shipment_payload)
|
|
59
|
+
|
|
60
|
+
# Usage examples for ProductService
|
|
61
|
+
product_service = client.Products
|
|
62
|
+
# Get from api
|
|
63
|
+
product = product_service.get(456)
|
|
64
|
+
bundle = product_service.get_bundle(456)
|
|
65
|
+
ml_integration = product_service.get_ml_integration(456)
|
|
66
|
+
search_results = product_service.search(search_params)
|
|
67
|
+
# Or construct from db
|
|
68
|
+
product = client.Products(...args)
|
|
69
|
+
created_product = product.create()
|
|
70
|
+
updated_product = product.update()
|
|
41
71
|
```
|
|
42
72
|
|
|
43
73
|
then with the client you should use every other module, like SalesOrder, Products, Payments, Shipments and Search
|
|
44
74
|
|
|
75
|
+
|
|
45
76
|
## Contributing
|
|
46
77
|
|
|
47
78
|
We welcome contributions to improve this project! Here's how you can help:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
producteca/__init__.py,sha256=ML-Y_hCd8HOgNOVGiqGpbLqWAtvPXqQQaBQmj-A5Lvc,52
|
|
2
|
+
producteca/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
producteca/abstract/abstract_dataclass.py,sha256=Axsf4ewa7Qua5aosvEXksR-fXoGF01_EUlOl1oKdkIk,597
|
|
4
|
+
producteca/client.py,sha256=4T4vLh_Zz56mG2S0P9Il1NEJ4Rj0g2mgXYA7KJjY72U,789
|
|
5
|
+
producteca/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
producteca/config/config.py,sha256=uTRaHLI9L7P_LPuFmuYgV50Aedz9MfDbXOZVZPFkOuI,658
|
|
7
|
+
producteca/payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
producteca/payments/payments.py,sha256=zhbv6zWb1i04wGdqiyQJ8Dqp435xNHEOsjnps-pAT58,893
|
|
9
|
+
producteca/payments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
producteca/payments/tests/test_payments.py,sha256=wutk5zK2xRChTvKyTmi54Y_92PzNtUKZF6xWF298sFY,3032
|
|
11
|
+
producteca/products/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
producteca/products/products.py,sha256=G5ApUxeipHKRCQZnGdCYLxNE-m--6dOsYiQB_sMI_Dw,13835
|
|
13
|
+
producteca/products/search_products.py,sha256=wPrnChvzPKzVermtKbi-V7wBmILJhJToyoNtpOOeXc4,6172
|
|
14
|
+
producteca/products/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
producteca/products/tests/test_products.py,sha256=JMsWq9DDJZn8If1dz42WSJ93-akOm7flFQPm6WYeJus,5377
|
|
16
|
+
producteca/products/tests/test_search_products.py,sha256=ISkDClYaYnwo23a7_O4OlgPfc4dAZCMinLAi07yecEI,4941
|
|
17
|
+
producteca/sales_orders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
+
producteca/sales_orders/sales_orders.py,sha256=js7OoCcSn6P-eHa9IwJDym7kYa5EUteTwI8563VVxEo,18027
|
|
19
|
+
producteca/sales_orders/search_sale_orders.py,sha256=rvbPqVqYjRpM45QXUZp_6uCk1j7CRyfN5hKsinvj6Kc,5179
|
|
20
|
+
producteca/sales_orders/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
producteca/sales_orders/tests/search.json,sha256=v6LkTvQyeBdqxRc3iWwXH5Ugs7EYJAEOiuPuuj_rHYk,3508
|
|
22
|
+
producteca/sales_orders/tests/test_sales_orders.py,sha256=hPtUqp4GUpp9iBr3AMGsS7nxHQ5JHJy-DLuTxf9Eufs,4245
|
|
23
|
+
producteca/sales_orders/tests/test_search_so.py,sha256=xXl1Lg_7nZioLqgWXl5vb4kH2JAdGZLX_VGWtH9iAHM,1637
|
|
24
|
+
producteca/shipments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
producteca/shipments/shipment.py,sha256=YokJRBX1ZbUtZVc4AOAB188rbHFO0_MH5hFv5U9Qpjw,844
|
|
26
|
+
producteca/shipments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
producteca/shipments/tests/test_shipment.py,sha256=0edX3WM-t4nbp53r_Lvhtk_Suc2QCnIUQ27I90qSUfE,2512
|
|
28
|
+
producteca/utils.py,sha256=krCUtr5cwu1787v24wSagSltPjY1ERe3E1whhT-SZKU,1961
|
|
29
|
+
producteca-2.0.57.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
30
|
+
producteca-2.0.57.dist-info/METADATA,sha256=hfixRYOulnUNZD58c7LEytb-rke71V8z1bSoQP6m5hQ,3809
|
|
31
|
+
producteca-2.0.57.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
32
|
+
producteca-2.0.57.dist-info/entry_points.txt,sha256=BFSDFLbB70p8YVZPiU7HDJdj2VyyLdMVa4ekLQAUAVc,125
|
|
33
|
+
producteca-2.0.57.dist-info/RECORD,,
|
producteca/search/__init__.py
DELETED
|
File without changes
|
producteca/search/search.py
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
from pydantic import BaseModel, Field
|
|
3
|
-
import requests
|
|
4
|
-
from ..config.config import ConfigProducteca
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class FacetValue(BaseModel):
|
|
8
|
-
count: int
|
|
9
|
-
value: str
|
|
10
|
-
label: str
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Facet(BaseModel):
|
|
14
|
-
key: str
|
|
15
|
-
value: List[FacetValue]
|
|
16
|
-
is_collection: bool
|
|
17
|
-
translate: bool
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class SearchStocks(BaseModel):
|
|
21
|
-
warehouse: str
|
|
22
|
-
quantity: int
|
|
23
|
-
reserved: int
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class SearchPrices(BaseModel):
|
|
27
|
-
price_list_id: int
|
|
28
|
-
price_list: str
|
|
29
|
-
amount: float
|
|
30
|
-
currency: str
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class SearchIntegration(BaseModel):
|
|
34
|
-
app: Optional[int]
|
|
35
|
-
integration_id: Optional[str]
|
|
36
|
-
permalink: Optional[str]
|
|
37
|
-
status: Optional[str]
|
|
38
|
-
listing_type: Optional[str]
|
|
39
|
-
safety_stock: Optional[int]
|
|
40
|
-
synchronize_stock: Optional[bool]
|
|
41
|
-
is_active: Optional[bool]
|
|
42
|
-
is_active_or_paused: Optional[bool]
|
|
43
|
-
id: Optional[int]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class SearchDeals(BaseModel):
|
|
47
|
-
campaign: str
|
|
48
|
-
product: int
|
|
49
|
-
variation: str
|
|
50
|
-
deal_price: float
|
|
51
|
-
discount: float
|
|
52
|
-
regular_price: float
|
|
53
|
-
enabled: bool
|
|
54
|
-
currency: str
|
|
55
|
-
id: str
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class SearchResultItem(BaseModel):
|
|
59
|
-
search_score: float = Field(..., alias='@search.score')
|
|
60
|
-
id: int
|
|
61
|
-
product_id: int
|
|
62
|
-
company_id: int
|
|
63
|
-
name: str
|
|
64
|
-
code: str
|
|
65
|
-
skus: List[str]
|
|
66
|
-
brand: str
|
|
67
|
-
category: str
|
|
68
|
-
thumbnail: str
|
|
69
|
-
stocks: List[SearchStocks]
|
|
70
|
-
warehouses_with_stock: List[str]
|
|
71
|
-
total_stock: int
|
|
72
|
-
has_pictures: bool
|
|
73
|
-
buying_price: float
|
|
74
|
-
prices: List[SearchPrices]
|
|
75
|
-
integration_ids: List[str]
|
|
76
|
-
integration_apps: List[str]
|
|
77
|
-
integrations: List[SearchIntegration]
|
|
78
|
-
campaigns: List[str]
|
|
79
|
-
app: Optional[int]
|
|
80
|
-
status: Optional[str]
|
|
81
|
-
synchronize_stock: Optional[bool]
|
|
82
|
-
listing_type: Optional[str]
|
|
83
|
-
price_amount: Optional[float]
|
|
84
|
-
price_currency: Optional[str]
|
|
85
|
-
category_id: Optional[str]
|
|
86
|
-
category_base_id: Optional[str]
|
|
87
|
-
category_l1: Optional[str]
|
|
88
|
-
category_l2: Optional[str]
|
|
89
|
-
category_l3: Optional[str]
|
|
90
|
-
category_l4: Optional[str]
|
|
91
|
-
category_l5: Optional[str]
|
|
92
|
-
category_l6: Optional[str]
|
|
93
|
-
has_category: Optional[bool]
|
|
94
|
-
category_fixed: Optional[bool]
|
|
95
|
-
accepts_mercadoenvios: Optional[bool]
|
|
96
|
-
shipping_mode: Optional[str]
|
|
97
|
-
local_pickup: Optional[bool]
|
|
98
|
-
mandatory_free_shipping: Optional[bool]
|
|
99
|
-
free_shipping: Optional[bool]
|
|
100
|
-
free_shipping_cost: Optional[float]
|
|
101
|
-
template: Optional[str]
|
|
102
|
-
youtube_id: Optional[str]
|
|
103
|
-
warranty: Optional[str]
|
|
104
|
-
permalink: Optional[str]
|
|
105
|
-
domain: Optional[str]
|
|
106
|
-
attribute_completion_status: Optional[str]
|
|
107
|
-
attribute_completion_count: Optional[int]
|
|
108
|
-
attribute_completion_total: Optional[int]
|
|
109
|
-
deals: Optional[SearchDeals]
|
|
110
|
-
campaign_status: Optional[List[str]]
|
|
111
|
-
size_chart: Optional[str]
|
|
112
|
-
channel_status: Optional[List[str]]
|
|
113
|
-
channel_category_l1: Optional[List[str]]
|
|
114
|
-
channel_category_l2: Optional[List[str]]
|
|
115
|
-
channel_category_l3: Optional[List[str]]
|
|
116
|
-
channel_category_id: Optional[List[str]]
|
|
117
|
-
channel_synchronizes_stock: Optional[List[str]]
|
|
118
|
-
channel_has_category: Optional[List[str]]
|
|
119
|
-
catalog_products_status: Optional[List[str]]
|
|
120
|
-
metadata: Optional[List[str]]
|
|
121
|
-
integration_tags: Optional[List[str]]
|
|
122
|
-
variations_integration_ids: Optional[List[str]]
|
|
123
|
-
channel_pictures_templates: Optional[List[str]]
|
|
124
|
-
channel_pictures_templates_apps: Optional[List[str]]
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class SearchProductResponse(BaseModel):
|
|
128
|
-
count: int
|
|
129
|
-
facets: List[Facet]
|
|
130
|
-
results: List[SearchResultItem]
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
class SearchProductParams(BaseModel):
|
|
134
|
-
top: Optional[int]
|
|
135
|
-
skip: Optional[int]
|
|
136
|
-
filter: Optional[str] = Field(default=None, alias='$filter')
|
|
137
|
-
search: Optional[str]
|
|
138
|
-
sales_channel: Optional[str] = Field(default='2', alias='salesChannel')
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class SearchProduct:
|
|
142
|
-
endpoint: str = 'search/products'
|
|
143
|
-
|
|
144
|
-
@classmethod
|
|
145
|
-
def search_product(cls, config: ConfigProducteca, params: SearchProductParams) -> SearchProductResponse:
|
|
146
|
-
headers = config.headers
|
|
147
|
-
url = config.get_endpoint(cls.endpoint)
|
|
148
|
-
response = requests.get(url, headers=headers, params=params.model_dump(by_alias=True, exclude_none=True))
|
|
149
|
-
return SearchProductResponse(**response.json())
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
from pydantic import BaseModel, Field
|
|
3
|
-
import requests
|
|
4
|
-
from producteca.config.config import ConfigProducteca
|
|
5
|
-
import logging
|
|
6
|
-
|
|
7
|
-
_logger = logging.getLogger(__name__)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class SalesOrderProduct(BaseModel):
|
|
11
|
-
id: int
|
|
12
|
-
name: str
|
|
13
|
-
code: str
|
|
14
|
-
brand: str
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class SalesOrderVariationAttribute(BaseModel):
|
|
18
|
-
key: str
|
|
19
|
-
value: str
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class SalesOrderVariation(BaseModel):
|
|
23
|
-
id: int
|
|
24
|
-
attributes: List[SalesOrderVariationAttribute]
|
|
25
|
-
sku: str
|
|
26
|
-
thumbnail: str
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class SalesOrderLine(BaseModel):
|
|
30
|
-
product: SalesOrderProduct
|
|
31
|
-
variation: SalesOrderVariation
|
|
32
|
-
quantity: int
|
|
33
|
-
price: float
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class SalesOrderCard(BaseModel):
|
|
37
|
-
payment_network: str
|
|
38
|
-
first_six_digits: int
|
|
39
|
-
last_four_digits: int
|
|
40
|
-
cardholder_identification_number: str
|
|
41
|
-
cardholder_identification_type: str
|
|
42
|
-
cardholder_name: str
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class SalesOrderPaymentIntegration(BaseModel):
|
|
46
|
-
integration_id: str
|
|
47
|
-
app: int
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class SalesOrderPayment(BaseModel):
|
|
51
|
-
date: str
|
|
52
|
-
amount: float
|
|
53
|
-
coupon_amount: float
|
|
54
|
-
status: str
|
|
55
|
-
method: str
|
|
56
|
-
integration: SalesOrderPaymentIntegration
|
|
57
|
-
transaction_fee: float
|
|
58
|
-
installments: int
|
|
59
|
-
card: SalesOrderCard
|
|
60
|
-
notes: str
|
|
61
|
-
has_cancelable_status: bool
|
|
62
|
-
id: int
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class SalesOrderIntegration(BaseModel):
|
|
66
|
-
alternate_id: str
|
|
67
|
-
integration_id: int
|
|
68
|
-
app: int
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class SalesOrderShipmentProduct(BaseModel):
|
|
72
|
-
product: int
|
|
73
|
-
variation: int
|
|
74
|
-
quantity: int
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class SalesOrderShipmentMethod(BaseModel):
|
|
78
|
-
tracking_number: str
|
|
79
|
-
tracking_url: str
|
|
80
|
-
courier: str
|
|
81
|
-
mode: str
|
|
82
|
-
cost: float
|
|
83
|
-
type: str
|
|
84
|
-
eta: str
|
|
85
|
-
status: str
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class SalesOrderShipmentIntegration(BaseModel):
|
|
89
|
-
id: int
|
|
90
|
-
integration_id: str
|
|
91
|
-
app: int
|
|
92
|
-
status: str
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class SalesOrderShipment(BaseModel):
|
|
96
|
-
date: str
|
|
97
|
-
products: List[SalesOrderShipmentProduct]
|
|
98
|
-
method: SalesOrderShipmentMethod
|
|
99
|
-
integration: SalesOrderShipmentIntegration
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class SalesOrderResultItem(BaseModel):
|
|
103
|
-
codes: List[str]
|
|
104
|
-
contact_id: int
|
|
105
|
-
currency: str
|
|
106
|
-
date: str
|
|
107
|
-
delivery_method: str
|
|
108
|
-
delivery_status: str
|
|
109
|
-
id: str
|
|
110
|
-
integration_ids: List[str]
|
|
111
|
-
integrations: List[SalesOrderIntegration]
|
|
112
|
-
invoice_integration_app: int
|
|
113
|
-
invoice_integration_id: str
|
|
114
|
-
lines: List[SalesOrderLine]
|
|
115
|
-
payments: List[SalesOrderPayment]
|
|
116
|
-
payment_status: str
|
|
117
|
-
payment_term: str
|
|
118
|
-
product_names: List[str]
|
|
119
|
-
reserving_product_ids: str
|
|
120
|
-
sales_channel: int
|
|
121
|
-
shipments: List[SalesOrderShipment]
|
|
122
|
-
tracking_number: str
|
|
123
|
-
skus: List[str]
|
|
124
|
-
status: str
|
|
125
|
-
tags: List[str]
|
|
126
|
-
warehouse: str
|
|
127
|
-
company_id: int
|
|
128
|
-
shipping_cost: float
|
|
129
|
-
contact_phone: str
|
|
130
|
-
brands: List[str]
|
|
131
|
-
courier: str
|
|
132
|
-
order_id: int
|
|
133
|
-
updated_at: str
|
|
134
|
-
invoice_integration_created_at: str
|
|
135
|
-
invoice_integration_document_url: str
|
|
136
|
-
has_document_url: bool
|
|
137
|
-
integration_alternate_ids: str
|
|
138
|
-
cart_id: str
|
|
139
|
-
amount: float
|
|
140
|
-
has_any_shipments: bool
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class SearchSalesOrderResponse(BaseModel):
|
|
144
|
-
count: int
|
|
145
|
-
results: List[SalesOrderResultItem]
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
class SearchSalesOrderParams(BaseModel):
|
|
149
|
-
top: Optional[int]
|
|
150
|
-
skip: Optional[int]
|
|
151
|
-
filter: Optional[str] = Field(default=None, alias="$filter")
|
|
152
|
-
class Config:
|
|
153
|
-
validate_by_name = True
|
|
154
|
-
|
|
155
|
-
class SearchSalesOrder:
|
|
156
|
-
endpoint: str = "search/salesorders"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
@classmethod
|
|
160
|
-
def search_saleorder(cls, config: ConfigProducteca, params: SearchSalesOrderParams):
|
|
161
|
-
headers = config.headers
|
|
162
|
-
url = config.get_endpoint(cls.endpoint)
|
|
163
|
-
new_url = f"{url}?$filter={params.filter}&top={params.top}&skip={params.skip}"
|
|
164
|
-
response = requests.get(
|
|
165
|
-
new_url,
|
|
166
|
-
headers=headers,
|
|
167
|
-
)
|
|
168
|
-
return response.json(), response.status_code
|
|
169
|
-
|
|
170
|
-
|
|
File without changes
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
producteca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
producteca/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
producteca/abstract/abstract_dataclass.py,sha256=Q9BaVb34_2MBLWaOOeGuzd1diOePHxxFWBEr8Jw8t40,617
|
|
4
|
-
producteca/client.py,sha256=oeNeLAlhjXC82oTLRN6HmWilmZqrqrs_Bwr3-u17EuI,1260
|
|
5
|
-
producteca/config/__init__.py,sha256=ZELnRKNOj0erqtCLRtZURqUhttVbFfqUrHrgg6M5p-M,36
|
|
6
|
-
producteca/config/config.py,sha256=uTRaHLI9L7P_LPuFmuYgV50Aedz9MfDbXOZVZPFkOuI,658
|
|
7
|
-
producteca/payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
producteca/payments/payments.py,sha256=bc9556954GRsvm4XAsTbbdP4-rS275MWGfhuF4MYVsY,1594
|
|
9
|
-
producteca/payments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
producteca/payments/tests/test_payments.py,sha256=5xUQlBT_E7arJLJAHncJz3Rme2b_JEoJ5_DzsExW4SI,2343
|
|
11
|
-
producteca/products/__init__.py,sha256=kIkYF7_BcLUzkGvuRnUBPAELyG9QxUb5D6UiRg4XQCg,22
|
|
12
|
-
producteca/products/products.py,sha256=IagCPEvQBUuUaw9yBQwBu7eJw3HtdAjxiWHEnpLDXwM,8046
|
|
13
|
-
producteca/products/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
producteca/products/tests/test_products.py,sha256=AN2khGNtS7meUe4EAdgKvGadwvg9GYhP7vfI9fC1PBc,3392
|
|
15
|
-
producteca/sales_orders/__init__.py,sha256=9NbTrJhvhtGYX2DFd7CCZvYVKXx6jJCV2L70XPma5_c,26
|
|
16
|
-
producteca/sales_orders/sales_orders.py,sha256=1VzFSou2wOEmZ-uhehVcsj9Q4Gk5Iam4YEIu-l-xEgc,8792
|
|
17
|
-
producteca/sales_orders/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
producteca/sales_orders/tests/test_sales_orders.py,sha256=TngA2sOuFDobqe_rWPyho8WutnzZkAKn_eYsNqh3k_A,3372
|
|
19
|
-
producteca/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
producteca/search/search.py,sha256=6Xmxgs0cTK81uDTQAqAeFoWGu5pRZX-lS15tEBkRKrc,4143
|
|
21
|
-
producteca/search/search_sale_orders.py,sha256=cTLI47HyDfPalKT-ApizK6GrVcqfMJVnyLqpJcNjm1c,3733
|
|
22
|
-
producteca/search/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
producteca/search/tests/test_search.py,sha256=rD9hNyKscIrZHVR2rvpVGeNXX89sj2IgoH2lwYIHW2U,7454
|
|
24
|
-
producteca/shipments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
producteca/shipments/shipment.py,sha256=IELAYWVNT862CBvDHOTotqLMXrm6sFECic2E7RTSI-A,1625
|
|
26
|
-
producteca/shipments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
producteca/shipments/tests/test_shipment.py,sha256=D42IM5OQOXy9Af9_p8-k_mSFnfX5fUeEWQBPEispOXw,2301
|
|
28
|
-
producteca-1.0.14.dist-info/METADATA,sha256=m3z5ZNc0rKCGeWaC0dSi7wQ192wWSpEONKGsoLXP3yI,2624
|
|
29
|
-
producteca-1.0.14.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
30
|
-
producteca-1.0.14.dist-info/entry_points.txt,sha256=BFSDFLbB70p8YVZPiU7HDJdj2VyyLdMVa4ekLQAUAVc,125
|
|
31
|
-
producteca-1.0.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|