elemento-loyalty-processing 1.0.4__py3-none-any.whl → 1.0.6__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.
@@ -2,4 +2,4 @@
2
2
 
3
3
  __author__ = "Anton Taraskin"
4
4
  __email__ = "hel.nidhoggr@gmail.com"
5
- __version__ = "1.0.4"
5
+ __version__ = "1.0.6"
@@ -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 Cart(**data)
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
- offers: list[AppliedOffer] = []
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,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elemento-loyalty-processing
3
- Version: 1.0.4
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"
@@ -0,0 +1,7 @@
1
+ elemento_loyalty_processing/__init__.py,sha256=fHuu8DtGv3an9oFY_4YEI9lvKn0w-rLd7ooxKUdlA2g,117
2
+ elemento_loyalty_processing/client.py,sha256=nR4LReAjNf6Aj-bB8-WItcaPtWiqoE0RsZJJrsc0VDQ,3936
3
+ elemento_loyalty_processing/types.py,sha256=HF7XeeMpBEiQ64dT-ZPGR0FqQ_w56FD9K7FjTvPKQ88,3492
4
+ elemento_loyalty_processing-1.0.6.dist-info/METADATA,sha256=MtNd0FWclt3cVUluQD5j8i6UTQ2GiQgVqs2sBM3HAc4,448
5
+ elemento_loyalty_processing-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ elemento_loyalty_processing-1.0.6.dist-info/top_level.txt,sha256=N_AtPyYKvkr1NkoPAUrVl_4VCTP-kJIehtsLhkdacAc,28
7
+ elemento_loyalty_processing-1.0.6.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- elemento_loyalty_processing/__init__.py,sha256=8xRRN_yvBcEDEbrYXNdDI_xuIm73EKEdgZKNO1sBXq0,117
2
- elemento_loyalty_processing/client.py,sha256=tCq7WdT7aX5Rba9W7fZLTt-Jk0BlqK6O339TKV_nPrc,4751
3
- elemento_loyalty_processing/types.py,sha256=aPnOLFSGbXWCwZ8yiz4HmOrgOHIiID9VjvK5bepP-tU,3441
4
- elemento_loyalty_processing-1.0.4.dist-info/METADATA,sha256=QvsJk-TJ_AwA1lpgnotW8oRIS1PfDcvUJLZVL0iJfx0,407
5
- elemento_loyalty_processing-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- elemento_loyalty_processing-1.0.4.dist-info/top_level.txt,sha256=N_AtPyYKvkr1NkoPAUrVl_4VCTP-kJIehtsLhkdacAc,28
7
- elemento_loyalty_processing-1.0.4.dist-info/RECORD,,