elemento-loyalty-processing 1.0.4__tar.gz → 1.0.6__tar.gz
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.
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/PKG-INFO +2 -1
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/app/__init__.py +1 -1
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/app/client.py +2 -17
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/app/types.py +3 -2
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/pyproject.toml +2 -1
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/MANIFEST.in +0 -0
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/README.md +0 -0
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/elemento_loyalty_processing.egg-info/SOURCES.txt +0 -0
- {elemento_loyalty_processing-1.0.4 → elemento_loyalty_processing-1.0.6}/setup.cfg +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elemento-loyalty-processing
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: Elemento Loyalty Processing
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Requires-Dist: kaiju-tools<3,>=2.4.9
|
|
7
|
+
Requires-Dist: elemento-customers>=1.0.0
|
|
7
8
|
Requires-Dist: kaiju-models<2,>=1.0.4
|
|
8
9
|
Provides-Extra: server
|
|
9
10
|
Requires-Dist: kaiju-db<3,>=2.3.0; extra == "server"
|
|
@@ -5,6 +5,7 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from kaiju_tools.http import RPCClientService
|
|
7
7
|
from kaiju_tools.services import SERVICE_CLASS_REGISTRY
|
|
8
|
+
from msgspec import convert
|
|
8
9
|
|
|
9
10
|
from .types import *
|
|
10
11
|
|
|
@@ -18,22 +19,6 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
18
19
|
method="Lists.products.set", params=dict(id=id, items=items), max_timeout=_max_timeout, nowait=_nowait
|
|
19
20
|
)
|
|
20
21
|
|
|
21
|
-
async def lists_get_product_list(self, id: str, _max_timeout: int = None, _nowait: bool = False):
|
|
22
|
-
"""Call Lists.products.get."""
|
|
23
|
-
return await self.call(
|
|
24
|
-
method="Lists.products.get", params=dict(id=id), max_timeout=_max_timeout, nowait=_nowait
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
async def lists_set_store_list(self, id: str, items: list, _max_timeout: int = None, _nowait: bool = False):
|
|
28
|
-
"""Call Lists.stores.set."""
|
|
29
|
-
return await self.call(
|
|
30
|
-
method="Lists.stores.set", params=dict(id=id, items=items), max_timeout=_max_timeout, nowait=_nowait
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
async def lists_get_store_list(self, id: str, _max_timeout: int = None, _nowait: bool = False):
|
|
34
|
-
"""Call Lists.stores.get."""
|
|
35
|
-
return await self.call(method="Lists.stores.get", params=dict(id=id), max_timeout=_max_timeout, nowait=_nowait)
|
|
36
|
-
|
|
37
22
|
async def balance_get_balance(
|
|
38
23
|
self, customer_id: CustomerId, _max_timeout: int = None, _nowait: bool = False
|
|
39
24
|
) -> Points:
|
|
@@ -75,7 +60,7 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
75
60
|
max_timeout=_max_timeout,
|
|
76
61
|
nowait=_nowait,
|
|
77
62
|
)
|
|
78
|
-
return
|
|
63
|
+
return convert(data, Cart)
|
|
79
64
|
|
|
80
65
|
async def balance_confirm_transaction(
|
|
81
66
|
self, transaction_id: TransactionId, _max_timeout: int = None, _nowait: bool = False
|
|
@@ -140,7 +140,8 @@ class Item(Struct):
|
|
|
140
140
|
points_sub: Points = 0
|
|
141
141
|
points_sub_max: Points = 0
|
|
142
142
|
params: dict[str, Any] = {}
|
|
143
|
-
|
|
143
|
+
offers_add: list[AppliedOffer] = []
|
|
144
|
+
offers_sub: list[AppliedOffer] = []
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
class Cart(Struct):
|
|
@@ -157,7 +158,7 @@ class Cart(Struct):
|
|
|
157
158
|
|
|
158
159
|
class Transaction(Struct):
|
|
159
160
|
id: TransactionId = None
|
|
160
|
-
order_id: str = None
|
|
161
|
+
order_id: str | None = None
|
|
161
162
|
customer_id: CustomerId = None
|
|
162
163
|
timestamp: datetime = None
|
|
163
164
|
cart: Cart = None
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "elemento-loyalty-processing"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.6"
|
|
4
4
|
description = "Elemento Loyalty Processing"
|
|
5
5
|
requires-python = ">=3.11"
|
|
6
6
|
dependencies = [
|
|
7
7
|
"kaiju-tools>=2.4.9,<3",
|
|
8
|
+
"elemento-customers>=1.0.0",
|
|
8
9
|
"kaiju-models>=1.0.4,<2"
|
|
9
10
|
]
|
|
10
11
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|