vtexpy 0.0.0b16__py3-none-any.whl → 0.0.0b17__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.
Potentially problematic release.
This version of vtexpy might be problematic. Click here for more details.
- vtex/__init__.py +2 -0
- vtex/_api/base.py +62 -39
- vtex/_api/catalog.py +26 -14
- vtex/_api/checkout.py +5 -6
- vtex/_api/custom.py +23 -14
- vtex/_api/license_manager.py +1 -1
- vtex/_api/logistics.py +14 -15
- vtex/_api/master_data.py +5 -5
- vtex/_api/orders.py +9 -9
- vtex/_api/payments_gateway.py +16 -17
- vtex/_api/promotions_and_taxes.py +8 -9
- vtex/_api/types/catalog.py +21 -0
- vtex/_api/types/generic.py +4 -4
- vtex/_api/types/license_manager.py +13 -7
- vtex/_config.py +251 -391
- vtex/_constants.py +18 -6
- vtex/_dto.py +22 -17
- vtex/_logging.py +28 -6
- vtex/_types.py +18 -3
- vtex/_utils.py +16 -20
- vtex/_vtex.py +4 -30
- {vtexpy-0.0.0b16.dist-info → vtexpy-0.0.0b17.dist-info}/METADATA +29 -25
- vtexpy-0.0.0b17.dist-info/RECORD +31 -0
- vtexpy-0.0.0b17.dist-info/entry_points.txt +3 -0
- vtexpy-0.0.0b16.dist-info/RECORD +0 -29
- {vtexpy-0.0.0b16.dist-info → vtexpy-0.0.0b17.dist-info}/LICENSE +0 -0
- {vtexpy-0.0.0b16.dist-info → vtexpy-0.0.0b17.dist-info}/WHEEL +0 -0
vtex/_api/payments_gateway.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
3
|
from .._dto import VTEXDataResponse, VTEXItemsResponse
|
|
4
|
-
from .._types import DictType
|
|
5
4
|
from .base import BaseAPI
|
|
6
5
|
|
|
7
6
|
|
|
@@ -17,39 +16,39 @@ class PaymentsGatewayAPI(BaseAPI):
|
|
|
17
16
|
self,
|
|
18
17
|
transaction_id: str,
|
|
19
18
|
**kwargs: Any,
|
|
20
|
-
) -> VTEXDataResponse[
|
|
19
|
+
) -> VTEXDataResponse[Any]:
|
|
21
20
|
return self._request(
|
|
22
21
|
method="GET",
|
|
23
22
|
environment=self.ENVIRONMENT,
|
|
24
23
|
endpoint=f"/api/pvt/transactions/{transaction_id}",
|
|
25
24
|
config=self.client.config.with_overrides(**kwargs),
|
|
26
|
-
response_class=VTEXDataResponse[
|
|
25
|
+
response_class=VTEXDataResponse[Any],
|
|
27
26
|
)
|
|
28
27
|
|
|
29
28
|
def list_transaction_interactions(
|
|
30
29
|
self,
|
|
31
30
|
transaction_id: str,
|
|
32
31
|
**kwargs: Any,
|
|
33
|
-
) -> VTEXItemsResponse[
|
|
32
|
+
) -> VTEXItemsResponse[Any, Any]:
|
|
34
33
|
return self._request(
|
|
35
34
|
method="GET",
|
|
36
35
|
environment=self.ENVIRONMENT,
|
|
37
36
|
endpoint=f"/api/pvt/transactions/{transaction_id}/interactions",
|
|
38
37
|
config=self.client.config.with_overrides(**kwargs),
|
|
39
|
-
response_class=VTEXItemsResponse[
|
|
38
|
+
response_class=VTEXItemsResponse[Any, Any],
|
|
40
39
|
)
|
|
41
40
|
|
|
42
41
|
def list_transaction_payments(
|
|
43
42
|
self,
|
|
44
43
|
transaction_id: str,
|
|
45
44
|
**kwargs: Any,
|
|
46
|
-
) -> VTEXItemsResponse[
|
|
45
|
+
) -> VTEXItemsResponse[Any, Any]:
|
|
47
46
|
return self._request(
|
|
48
47
|
method="GET",
|
|
49
48
|
environment=self.ENVIRONMENT,
|
|
50
49
|
endpoint=f"/api/pvt/transactions/{transaction_id}/payments",
|
|
51
50
|
config=self.client.config.with_overrides(**kwargs),
|
|
52
|
-
response_class=VTEXItemsResponse[
|
|
51
|
+
response_class=VTEXItemsResponse[Any, Any],
|
|
53
52
|
)
|
|
54
53
|
|
|
55
54
|
def get_transaction_payment(
|
|
@@ -57,63 +56,63 @@ class PaymentsGatewayAPI(BaseAPI):
|
|
|
57
56
|
transaction_id: str,
|
|
58
57
|
payment_id: str,
|
|
59
58
|
**kwargs: Any,
|
|
60
|
-
) -> VTEXDataResponse[
|
|
59
|
+
) -> VTEXDataResponse[Any]:
|
|
61
60
|
return self._request(
|
|
62
61
|
method="GET",
|
|
63
62
|
environment=self.ENVIRONMENT,
|
|
64
63
|
endpoint=f"/api/pvt/transactions/{transaction_id}/payments/{payment_id}",
|
|
65
64
|
config=self.client.config.with_overrides(**kwargs),
|
|
66
|
-
response_class=VTEXDataResponse[
|
|
65
|
+
response_class=VTEXDataResponse[Any],
|
|
67
66
|
)
|
|
68
67
|
|
|
69
68
|
def get_transaction_capabilities(
|
|
70
69
|
self,
|
|
71
70
|
transaction_id: str,
|
|
72
71
|
**kwargs: Any,
|
|
73
|
-
) -> VTEXDataResponse[
|
|
72
|
+
) -> VTEXDataResponse[Any]:
|
|
74
73
|
return self._request(
|
|
75
74
|
method="GET",
|
|
76
75
|
environment=self.ENVIRONMENT,
|
|
77
76
|
endpoint=f"/api/pvt/transactions/{transaction_id}/capabilities",
|
|
78
77
|
config=self.client.config.with_overrides(**kwargs),
|
|
79
|
-
response_class=VTEXDataResponse[
|
|
78
|
+
response_class=VTEXDataResponse[Any],
|
|
80
79
|
)
|
|
81
80
|
|
|
82
81
|
def get_transaction_cancellations(
|
|
83
82
|
self,
|
|
84
83
|
transaction_id: str,
|
|
85
84
|
**kwargs: Any,
|
|
86
|
-
) -> VTEXDataResponse[
|
|
85
|
+
) -> VTEXDataResponse[Any]:
|
|
87
86
|
return self._request(
|
|
88
87
|
method="GET",
|
|
89
88
|
environment=self.ENVIRONMENT,
|
|
90
89
|
endpoint=f"/api/pvt/transactions/{transaction_id}/cancellations",
|
|
91
90
|
config=self.client.config.with_overrides(**kwargs),
|
|
92
|
-
response_class=VTEXDataResponse[
|
|
91
|
+
response_class=VTEXDataResponse[Any],
|
|
93
92
|
)
|
|
94
93
|
|
|
95
94
|
def get_transaction_refunds(
|
|
96
95
|
self,
|
|
97
96
|
transaction_id: str,
|
|
98
97
|
**kwargs: Any,
|
|
99
|
-
) -> VTEXDataResponse[
|
|
98
|
+
) -> VTEXDataResponse[Any]:
|
|
100
99
|
return self._request(
|
|
101
100
|
method="GET",
|
|
102
101
|
environment=self.ENVIRONMENT,
|
|
103
102
|
endpoint=f"/api/pvt/transactions/{transaction_id}/refunds",
|
|
104
103
|
config=self.client.config.with_overrides(**kwargs),
|
|
105
|
-
response_class=VTEXDataResponse[
|
|
104
|
+
response_class=VTEXDataResponse[Any],
|
|
106
105
|
)
|
|
107
106
|
|
|
108
107
|
def get_transaction_settlements(
|
|
109
108
|
self,
|
|
110
109
|
transaction_id: str,
|
|
111
110
|
**kwargs: Any,
|
|
112
|
-
) -> VTEXDataResponse[
|
|
111
|
+
) -> VTEXDataResponse[Any]:
|
|
113
112
|
return self._request(
|
|
114
113
|
method="GET",
|
|
115
114
|
environment=self.ENVIRONMENT,
|
|
116
115
|
endpoint=f"/api/pvt/transactions/{transaction_id}/settlements",
|
|
117
116
|
config=self.client.config.with_overrides(**kwargs),
|
|
118
|
-
response_class=VTEXDataResponse[
|
|
117
|
+
response_class=VTEXDataResponse[Any],
|
|
119
118
|
)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
3
|
from .._dto import VTEXDataResponse, VTEXItemsResponse
|
|
4
|
-
from .._types import DictType
|
|
5
4
|
from .base import BaseAPI
|
|
6
5
|
|
|
7
6
|
|
|
@@ -16,42 +15,42 @@ class PromotionsAndTaxesAPI(BaseAPI):
|
|
|
16
15
|
def list_archived_promotions(
|
|
17
16
|
self,
|
|
18
17
|
**kwargs: Any,
|
|
19
|
-
) -> VTEXItemsResponse[
|
|
18
|
+
) -> VTEXItemsResponse[Any, Any]:
|
|
20
19
|
return self._request(
|
|
21
20
|
method="GET",
|
|
22
21
|
environment=self.ENVIRONMENT,
|
|
23
22
|
endpoint="api/rnb/pvt/archive/benefits/calculatorconfiguration",
|
|
24
23
|
config=self.client.config.with_overrides(**kwargs),
|
|
25
|
-
response_class=VTEXItemsResponse[
|
|
24
|
+
response_class=VTEXItemsResponse[Any, Any],
|
|
26
25
|
)
|
|
27
26
|
|
|
28
|
-
def get_promotions(self, **kwargs: Any) -> VTEXDataResponse[
|
|
27
|
+
def get_promotions(self, **kwargs: Any) -> VTEXDataResponse[Any]:
|
|
29
28
|
return self._request(
|
|
30
29
|
method="GET",
|
|
31
30
|
environment=self.ENVIRONMENT,
|
|
32
31
|
endpoint="api/rnb/pvt/benefits/calculatorconfiguration",
|
|
33
32
|
config=self.client.config.with_overrides(**kwargs),
|
|
34
|
-
response_class=VTEXDataResponse[
|
|
33
|
+
response_class=VTEXDataResponse[Any],
|
|
35
34
|
)
|
|
36
35
|
|
|
37
|
-
def get_taxes(self, **kwargs: Any) -> VTEXDataResponse[
|
|
36
|
+
def get_taxes(self, **kwargs: Any) -> VTEXDataResponse[Any]:
|
|
38
37
|
return self._request(
|
|
39
38
|
method="GET",
|
|
40
39
|
environment=self.ENVIRONMENT,
|
|
41
40
|
endpoint="api/rnb/pvt/taxes/calculatorconfiguration",
|
|
42
41
|
config=self.client.config.with_overrides(**kwargs),
|
|
43
|
-
response_class=VTEXDataResponse[
|
|
42
|
+
response_class=VTEXDataResponse[Any],
|
|
44
43
|
)
|
|
45
44
|
|
|
46
45
|
def get_promotion_or_tax(
|
|
47
46
|
self,
|
|
48
47
|
promotion_or_tax_id: str,
|
|
49
48
|
**kwargs: Any,
|
|
50
|
-
) -> VTEXDataResponse[
|
|
49
|
+
) -> VTEXDataResponse[Any]:
|
|
51
50
|
return self._request(
|
|
52
51
|
method="GET",
|
|
53
52
|
environment=self.ENVIRONMENT,
|
|
54
53
|
endpoint=f"/api/rnb/pvt/calculatorconfiguration/{promotion_or_tax_id}",
|
|
55
54
|
config=self.client.config.with_overrides(**kwargs),
|
|
56
|
-
response_class=VTEXDataResponse[
|
|
55
|
+
response_class=VTEXDataResponse[Any],
|
|
57
56
|
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
|
|
3
|
+
from ..._types import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Seller(TypedDict):
|
|
7
|
+
fulfillment_seller_id: Union[str, None]
|
|
8
|
+
is_active: bool
|
|
9
|
+
is_better_scope: bool
|
|
10
|
+
merchant_name: Union[str, None]
|
|
11
|
+
name: str
|
|
12
|
+
seller_id: str
|
|
13
|
+
seller_type: int
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SalesChannel(TypedDict):
|
|
17
|
+
id: int
|
|
18
|
+
is_active: bool
|
|
19
|
+
name: str
|
|
20
|
+
position: Union[int, None]
|
|
21
|
+
time_zone: str
|
vtex/_api/types/generic.py
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
from
|
|
1
|
+
from ..._types import TypedDict
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class CurrentPagePagination(TypedDict
|
|
4
|
+
class CurrentPagePagination(TypedDict):
|
|
5
5
|
current_page: int
|
|
6
6
|
pages: int
|
|
7
7
|
per_page: int
|
|
8
8
|
total: int
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class PagePagination(TypedDict
|
|
11
|
+
class PagePagination(TypedDict):
|
|
12
12
|
page: int
|
|
13
13
|
pages: int
|
|
14
14
|
per_page: int
|
|
15
15
|
total: int
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class RowsPagination(TypedDict
|
|
18
|
+
class RowsPagination(TypedDict):
|
|
19
19
|
page: int
|
|
20
20
|
size: int
|
|
21
21
|
total_page: int
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
from typing import List,
|
|
1
|
+
from typing import List, Union
|
|
2
2
|
|
|
3
|
+
from ..._types import TypedDict
|
|
3
4
|
from .generic import PagePagination
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
class AccountAppKey(TypedDict
|
|
7
|
+
class AccountAppKey(TypedDict):
|
|
7
8
|
app_key: str
|
|
8
9
|
id: str
|
|
9
10
|
is_active: bool
|
|
@@ -11,7 +12,11 @@ class AccountAppKey(TypedDict, total=False):
|
|
|
11
12
|
label: str
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
class
|
|
15
|
+
class AccountSite(TypedDict):
|
|
16
|
+
name: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GetAccountData(TypedDict):
|
|
15
20
|
account_name: str
|
|
16
21
|
app_keys: List[AccountAppKey]
|
|
17
22
|
company_name: str
|
|
@@ -25,19 +30,20 @@ class GetAccountData(TypedDict, total=False):
|
|
|
25
30
|
operation_date: Union[str, None]
|
|
26
31
|
parent_account_id: Union[str, None]
|
|
27
32
|
parent_account_name: Union[str, None]
|
|
33
|
+
sites: List[AccountSite]
|
|
28
34
|
trading_name: str
|
|
29
35
|
|
|
30
36
|
|
|
31
|
-
class UserRole(TypedDict
|
|
37
|
+
class UserRole(TypedDict):
|
|
32
38
|
id: int
|
|
33
39
|
name: str
|
|
34
40
|
|
|
35
41
|
|
|
36
|
-
class RoleProduct(TypedDict
|
|
42
|
+
class RoleProduct(TypedDict):
|
|
37
43
|
name: str
|
|
38
44
|
|
|
39
45
|
|
|
40
|
-
class Role(TypedDict
|
|
46
|
+
class Role(TypedDict):
|
|
41
47
|
id: int
|
|
42
48
|
is_admin: bool
|
|
43
49
|
name: str
|
|
@@ -45,6 +51,6 @@ class Role(TypedDict, total=False):
|
|
|
45
51
|
role_type: int
|
|
46
52
|
|
|
47
53
|
|
|
48
|
-
class ListRolesData(TypedDict
|
|
54
|
+
class ListRolesData(TypedDict):
|
|
49
55
|
items: List[Role]
|
|
50
56
|
paging: PagePagination
|