You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lithic/types/card_authorization_approval_request_webhook_event.py
+83-9Lines changed: 83 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,17 @@
6
6
7
7
from .._modelsimportBaseModel
8
8
from .token_infoimportTokenInfo
9
+
from .shared.currencyimportCurrency
9
10
from .shared.merchantimportMerchant
10
11
from .cardholder_authenticationimportCardholderAuthentication
11
12
12
13
__all__= [
13
14
"CardAuthorizationApprovalRequestWebhookEvent",
15
+
"Amounts",
16
+
"AmountsCardholder",
17
+
"AmountsHold",
18
+
"AmountsMerchant",
19
+
"AmountsSettlement",
14
20
"Avs",
15
21
"Card",
16
22
"FleetInfo",
@@ -25,6 +31,56 @@
25
31
]
26
32
27
33
34
+
classAmountsCardholder(BaseModel):
35
+
amount: int
36
+
"""Amount in the smallest unit of the applicable currency (e.g., cents)"""
37
+
38
+
conversion_rate: str
39
+
"""Exchange rate used for currency conversion"""
40
+
41
+
currency: Currency
42
+
"""3-character alphabetic ISO 4217 currency"""
43
+
44
+
45
+
classAmountsHold(BaseModel):
46
+
amount: int
47
+
"""Amount in the smallest unit of the applicable currency (e.g., cents)"""
48
+
49
+
currency: Currency
50
+
"""3-character alphabetic ISO 4217 currency"""
51
+
52
+
53
+
classAmountsMerchant(BaseModel):
54
+
amount: int
55
+
"""Amount in the smallest unit of the applicable currency (e.g., cents)"""
56
+
57
+
currency: Currency
58
+
"""3-character alphabetic ISO 4217 currency"""
59
+
60
+
61
+
classAmountsSettlement(BaseModel):
62
+
amount: int
63
+
"""Amount in the smallest unit of the applicable currency (e.g., cents)"""
64
+
65
+
currency: Currency
66
+
"""3-character alphabetic ISO 4217 currency"""
67
+
68
+
69
+
classAmounts(BaseModel):
70
+
"""Structured amounts for this authorization.
71
+
72
+
The `cardholder` and `merchant` amounts reflect the original network authorization values. For programs with hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the `hold` amount may exceed the `cardholder` and `merchant` amounts to account for anticipated final transaction amounts such as tips or fuel fill-ups
73
+
"""
74
+
75
+
cardholder: AmountsCardholder
76
+
77
+
hold: Optional[AmountsHold] =None
78
+
79
+
merchant: AmountsMerchant
80
+
81
+
settlement: Optional[AmountsSettlement] =None
82
+
83
+
28
84
classAvs(BaseModel):
29
85
address: str
30
86
"""Cardholder address"""
@@ -305,16 +361,28 @@ class CardAuthorizationApprovalRequestWebhookEvent(BaseModel):
305
361
"""
306
362
307
363
amount: int
308
-
"""Authorization amount of the transaction (in cents), including any acquirer fees.
364
+
"""Deprecated, use `amounts`.
309
365
366
+
Authorization amount of the transaction (in cents), including any acquirer fees.
310
367
The contents of this field are identical to `authorization_amount`.
311
368
"""
312
369
370
+
amounts: Amounts
371
+
"""Structured amounts for this authorization.
372
+
373
+
The `cardholder` and `merchant` amounts reflect the original network
374
+
authorization values. For programs with hold adjustments enabled (e.g.,
375
+
automated fuel dispensers or tipping MCCs), the `hold` amount may exceed the
376
+
`cardholder` and `merchant` amounts to account for anticipated final transaction
377
+
amounts such as tips or fuel fill-ups
378
+
"""
379
+
313
380
authorization_amount: int
314
-
"""The base transaction amount (in cents) plus the acquirer fee field.
381
+
"""Deprecated, use `amounts`.
315
382
316
-
This is the amount the issuer should authorize against unless the issuer is
317
-
paying the acquirer fee on behalf of the cardholder.
383
+
The base transaction amount (in cents) plus the acquirer fee field. This is the
384
+
amount the issuer should authorize against unless the issuer is paying the
385
+
acquirer fee on behalf of the cardholder.
318
386
"""
319
387
320
388
avs: Avs
@@ -323,7 +391,10 @@ class CardAuthorizationApprovalRequestWebhookEvent(BaseModel):
323
391
"""Card object in ASA"""
324
392
325
393
cardholder_currency: str
326
-
"""3-character alphabetic ISO 4217 code for cardholder's billing currency."""
394
+
"""Deprecated, use `amounts`.
395
+
396
+
3-character alphabetic ISO 4217 code for cardholder's billing currency.
397
+
"""
327
398
328
399
cash_amount: int
329
400
"""
@@ -343,7 +414,8 @@ class CardAuthorizationApprovalRequestWebhookEvent(BaseModel):
343
414
merchant: Merchant
344
415
345
416
merchant_amount: int
346
-
"""
417
+
"""Deprecated, use `amounts`.
418
+
347
419
The amount that the merchant will receive, denominated in `merchant_currency`
348
420
and in the smallest currency unit. Note the amount includes `acquirer_fee`,
349
421
similar to `authorization_amount`. It will be different from
@@ -355,9 +427,10 @@ class CardAuthorizationApprovalRequestWebhookEvent(BaseModel):
355
427
"""3-character alphabetic ISO 4217 code for the local currency of the transaction."""
356
428
357
429
settled_amount: int
358
-
"""
430
+
"""Deprecated, use `amounts`.
431
+
359
432
Amount (in cents) of the transaction that has been settled, including any
360
-
acquirer fees
433
+
acquirer fees.
361
434
"""
362
435
363
436
status: Literal[
@@ -384,7 +457,8 @@ class CardAuthorizationApprovalRequestWebhookEvent(BaseModel):
384
457
"""Deprecated, use `cash_amount`."""
385
458
386
459
conversion_rate: Optional[float] =None
387
-
"""
460
+
"""Deprecated, use `amounts`.
461
+
388
462
If the transaction was requested in a currency other than the settlement
389
463
currency, this field will be populated to indicate the rate used to translate
390
464
the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
0 commit comments