elemento-loyalty-processing 1.0.12__tar.gz → 1.0.14__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.12 → elemento_loyalty_processing-1.0.14}/PKG-INFO +1 -1
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/app/client.py +3 -3
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/app/types.py +7 -0
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/pyproject.toml +1 -1
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/MANIFEST.in +0 -0
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/README.md +0 -0
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/app/__init__.py +0 -0
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/elemento_loyalty_processing.egg-info/SOURCES.txt +0 -0
- {elemento_loyalty_processing-1.0.12 → elemento_loyalty_processing-1.0.14}/setup.cfg +0 -0
|
@@ -176,14 +176,14 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
176
176
|
customer_id: CustomerId,
|
|
177
177
|
source: str,
|
|
178
178
|
transaction_id: TransactionExtId,
|
|
179
|
-
|
|
179
|
+
items: list[RefundItem],
|
|
180
180
|
_max_timeout: int = None,
|
|
181
181
|
_nowait: bool = False,
|
|
182
182
|
) -> Points:
|
|
183
183
|
"""Call Balance.refund."""
|
|
184
184
|
data = await self.call(
|
|
185
185
|
method="Balance.refund",
|
|
186
|
-
params=dict(customer_id=customer_id, source=source, transaction_id=transaction_id,
|
|
186
|
+
params=dict(customer_id=customer_id, source=source, transaction_id=transaction_id, items=items),
|
|
187
187
|
max_timeout=_max_timeout,
|
|
188
188
|
nowait=_nowait,
|
|
189
189
|
)
|
|
@@ -224,7 +224,7 @@ class ElementoLoyaltyProcessingClient(RPCClientService):
|
|
|
224
224
|
async def balance_history_expiring(
|
|
225
225
|
self, customer_id: int, active_to: date, _max_timeout: int = None, _nowait: bool = False
|
|
226
226
|
):
|
|
227
|
-
"""Call
|
|
227
|
+
"""Call balance.history.expiring."""
|
|
228
228
|
return await self.call(
|
|
229
229
|
method="Balance.history.expiring",
|
|
230
230
|
params={"customer_id": customer_id, "active_to": active_to},
|
|
@@ -22,6 +22,7 @@ __all__ = [
|
|
|
22
22
|
"Transaction",
|
|
23
23
|
"EventTypeId",
|
|
24
24
|
"Item",
|
|
25
|
+
"RefundItem",
|
|
25
26
|
"Cart",
|
|
26
27
|
"BalanceAction",
|
|
27
28
|
"Customer",
|
|
@@ -143,6 +144,11 @@ class Item(Struct):
|
|
|
143
144
|
offers_sub: list[AppliedOffer] = []
|
|
144
145
|
|
|
145
146
|
|
|
147
|
+
class RefundItem(TypedDict):
|
|
148
|
+
pos: int
|
|
149
|
+
quantity: int
|
|
150
|
+
|
|
151
|
+
|
|
146
152
|
class Cart(Struct):
|
|
147
153
|
items: list[Item]
|
|
148
154
|
total: Decimal = Decimal(0)
|
|
@@ -180,6 +186,7 @@ class Transaction(Struct):
|
|
|
180
186
|
timestamp: datetime = None
|
|
181
187
|
cart: Cart = None
|
|
182
188
|
confirmed: bool = False
|
|
189
|
+
payment_type: str | None = None
|
|
183
190
|
|
|
184
191
|
|
|
185
192
|
class PurchaseStats(Struct):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|