elemento-loyalty-processing 1.0.7__py3-none-any.whl → 1.0.9__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.
- elemento_loyalty_processing/client.py +8 -6
- elemento_loyalty_processing/types.py +2 -0
- {elemento_loyalty_processing-1.0.7.dist-info → elemento_loyalty_processing-1.0.9.dist-info}/METADATA +2 -2
- elemento_loyalty_processing-1.0.9.dist-info/RECORD +7 -0
- elemento_loyalty_processing-1.0.7.dist-info/RECORD +0 -7
- {elemento_loyalty_processing-1.0.7.dist-info → elemento_loyalty_processing-1.0.9.dist-info}/WHEEL +0 -0
- {elemento_loyalty_processing-1.0.7.dist-info → elemento_loyalty_processing-1.0.9.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""RPC client services for customer app."""
|
|
2
2
|
|
|
3
|
-
import datetime
|
|
3
|
+
from datetime import datetime
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
from kaiju_tools.http import RPCClientService
|
|
@@ -81,8 +81,8 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
81
81
|
return convert(data, Transaction)
|
|
82
82
|
|
|
83
83
|
async def balance_confirm_transaction(
|
|
84
|
-
self, transaction_id:
|
|
85
|
-
) -> Transaction:
|
|
84
|
+
self, transaction_id: TransactionExtId, _max_timeout: int = None, _nowait: bool = False
|
|
85
|
+
) -> Transaction | None:
|
|
86
86
|
"""Call Balance.transaction.confirm."""
|
|
87
87
|
data = await self.call(
|
|
88
88
|
method="Balance.transaction.confirm",
|
|
@@ -90,10 +90,12 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
90
90
|
max_timeout=_max_timeout,
|
|
91
91
|
nowait=_nowait,
|
|
92
92
|
)
|
|
93
|
+
if not data:
|
|
94
|
+
return None
|
|
93
95
|
return convert(data, Transaction)
|
|
94
96
|
|
|
95
97
|
async def balance_revert_transaction(
|
|
96
|
-
self, transaction_id:
|
|
98
|
+
self, transaction_id: TransactionExtId, _max_timeout: int = None, _nowait: bool = False
|
|
97
99
|
) -> None:
|
|
98
100
|
"""Call Balance.transaction.revert."""
|
|
99
101
|
return await self.call(
|
|
@@ -104,8 +106,8 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
104
106
|
)
|
|
105
107
|
|
|
106
108
|
async def balance_commit_transaction(
|
|
107
|
-
self, transaction_id:
|
|
108
|
-
) -> Transaction:
|
|
109
|
+
self, transaction_id: TransactionExtId, _max_timeout: int = None, _nowait: bool = False
|
|
110
|
+
) -> Transaction | None:
|
|
109
111
|
"""Call Balance.transaction.commit."""
|
|
110
112
|
data = await self.call(
|
|
111
113
|
method="Balance.transaction.commit",
|
|
@@ -131,6 +131,7 @@ class Item(Struct):
|
|
|
131
131
|
quantity: int
|
|
132
132
|
total: Decimal
|
|
133
133
|
price: Decimal
|
|
134
|
+
initial_total: Decimal = None
|
|
134
135
|
cashback: Points = 0
|
|
135
136
|
discount: Decimal = Decimal("0.00")
|
|
136
137
|
points_add: Points = 0
|
|
@@ -151,6 +152,7 @@ class Cart(Struct):
|
|
|
151
152
|
points_available: Points = Points(0)
|
|
152
153
|
cashier_message: str | None = None
|
|
153
154
|
customer_message: str | None = None
|
|
155
|
+
offers_add: list[AppliedOffer] = []
|
|
154
156
|
|
|
155
157
|
|
|
156
158
|
class StoredTransaction(Struct):
|
{elemento_loyalty_processing-1.0.7.dist-info → elemento_loyalty_processing-1.0.9.dist-info}/METADATA
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elemento-loyalty-processing
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.9
|
|
4
4
|
Summary: Elemento Loyalty Processing
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
|
-
Requires-Dist: kaiju-tools<3,>=2.4.
|
|
6
|
+
Requires-Dist: kaiju-tools<3,>=2.4.12
|
|
7
7
|
Requires-Dist: elemento-customers>=1.0.0
|
|
8
8
|
Requires-Dist: kaiju-models<2,>=1.0.4
|
|
9
9
|
Provides-Extra: server
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
elemento_loyalty_processing/__init__.py,sha256=fHuu8DtGv3an9oFY_4YEI9lvKn0w-rLd7ooxKUdlA2g,117
|
|
2
|
+
elemento_loyalty_processing/client.py,sha256=s7-cBBloQTGoQau46Zt_0RUOXpnmY6s5OSwQrh5H7uc,5301
|
|
3
|
+
elemento_loyalty_processing/types.py,sha256=mRf8bfcZx0skKfkGk8z7L5FESBAZerwGtQ04d3NERU8,3770
|
|
4
|
+
elemento_loyalty_processing-1.0.9.dist-info/METADATA,sha256=wuDq4bwfyc4KdNpCBhY3eBahHW6vytn4T4OsjkFuf-M,449
|
|
5
|
+
elemento_loyalty_processing-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
elemento_loyalty_processing-1.0.9.dist-info/top_level.txt,sha256=N_AtPyYKvkr1NkoPAUrVl_4VCTP-kJIehtsLhkdacAc,28
|
|
7
|
+
elemento_loyalty_processing-1.0.9.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
elemento_loyalty_processing/__init__.py,sha256=fHuu8DtGv3an9oFY_4YEI9lvKn0w-rLd7ooxKUdlA2g,117
|
|
2
|
-
elemento_loyalty_processing/client.py,sha256=zV6N6pPc4hAkP2Qb-jUNeWEieMygvzYmjM8onEnvw_Q,5219
|
|
3
|
-
elemento_loyalty_processing/types.py,sha256=dRsMJ_2N20Il0O4BvO_qAdJ8ZcELl0w_poy3LGvJLWs,3696
|
|
4
|
-
elemento_loyalty_processing-1.0.7.dist-info/METADATA,sha256=x_p7WVZM6XNV-SNLTOdmPUwuNXPrcHMvdfdGoefRUOw,448
|
|
5
|
-
elemento_loyalty_processing-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
elemento_loyalty_processing-1.0.7.dist-info/top_level.txt,sha256=N_AtPyYKvkr1NkoPAUrVl_4VCTP-kJIehtsLhkdacAc,28
|
|
7
|
-
elemento_loyalty_processing-1.0.7.dist-info/RECORD,,
|
{elemento_loyalty_processing-1.0.7.dist-info → elemento_loyalty_processing-1.0.9.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|