elemento-loyalty-processing 1.0.5__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.
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elemento-loyalty-processing
3
- Version: 1.0.5
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"
@@ -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
@@ -158,7 +158,7 @@ class Cart(Struct):
158
158
 
159
159
  class Transaction(Struct):
160
160
  id: TransactionId = None
161
- order_id: str = None
161
+ order_id: str | None = None
162
162
  customer_id: CustomerId = None
163
163
  timestamp: datetime = None
164
164
  cart: Cart = None
@@ -1,10 +1,11 @@
1
1
  [project]
2
2
  name = "elemento-loyalty-processing"
3
- version = "1.0.5"
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