elemento-loyalty-processing 1.0.8__tar.gz → 1.0.10__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,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elemento-loyalty-processing
3
- Version: 1.0.8
3
+ Version: 1.0.10
4
4
  Summary: Elemento Loyalty Processing
5
5
  Requires-Python: >=3.11
6
- Requires-Dist: kaiju-tools<3,>=2.4.9
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
@@ -82,7 +82,7 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
82
82
 
83
83
  async def balance_confirm_transaction(
84
84
  self, transaction_id: TransactionExtId, _max_timeout: int = None, _nowait: bool = False
85
- ) -> Transaction:
85
+ ) -> Transaction | None:
86
86
  """Call Balance.transaction.confirm."""
87
87
  data = await self.call(
88
88
  method="Balance.transaction.confirm",
@@ -90,6 +90,8 @@ 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(
@@ -105,7 +107,7 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
105
107
 
106
108
  async def balance_commit_transaction(
107
109
  self, transaction_id: TransactionExtId, _max_timeout: int = None, _nowait: bool = False
108
- ) -> Transaction:
110
+ ) -> Transaction | None:
109
111
  """Call Balance.transaction.commit."""
110
112
  data = await self.call(
111
113
  method="Balance.transaction.commit",
@@ -113,6 +115,8 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
113
115
  max_timeout=_max_timeout,
114
116
  nowait=_nowait,
115
117
  )
118
+ if not data:
119
+ return None
116
120
  return convert(data, Transaction)
117
121
 
118
122
  async def balance_refund(
@@ -131,6 +131,7 @@ class Item(Struct):
131
131
  quantity: int
132
132
  total: Decimal
133
133
  price: Decimal
134
+ initial_total: Decimal | None = 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):
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "elemento-loyalty-processing"
3
- version = "1.0.8"
3
+ version = "1.0.10"
4
4
  description = "Elemento Loyalty Processing"
5
5
  requires-python = ">=3.11"
6
6
  dependencies = [
7
- "kaiju-tools>=2.4.9,<3",
7
+ "kaiju-tools>=2.4.12,<3",
8
8
  "elemento-customers>=1.0.0",
9
9
  "kaiju-models>=1.0.4,<2"
10
10
  ]