Skip to content

Commit 79aa803

Browse files
feat(api): new fields in Statements APIs
fix(api): fixing spec for Tokenizations and Enhanced data
1 parent 2ccbc8e commit 79aa803

File tree

5 files changed

+74
-21
lines changed

5 files changed

+74
-21
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 167
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c10c01eac94b422808bb16cc1044c67c980791b6d1360b01628d13c5a745dfeb.yml
3-
openapi_spec_hash: 9e6642fdb875a6aa6037c107917ebff4
4-
config_hash: 0b45ea129fca7c4755ef61eb97baa096
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fceec607fd66c8b227edc9f52ca348a906855f9aa1b0727f5eeb9f5975889e91.yml
3+
openapi_spec_hash: 759ede618594b93833ca93a34b97a11f
4+
config_hash: f5a16e702bac54729afed6e50b0de3ff

src/lithic/types/financial_accounts/loan_tape.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ class DayTotals(BaseModel):
130130
cents
131131
"""
132132

133+
debits: int
134+
"""Volume of debit management operation transactions less any interest in cents"""
135+
133136
fees: int
134137
"""Volume of debit management operation transactions less any interest in cents"""
135138

@@ -142,6 +145,12 @@ class DayTotals(BaseModel):
142145
purchases: int
143146
"""Net card transaction volume less any cash advances in cents"""
144147

148+
credit_details: Optional[object] = None
149+
"""Breakdown of credits"""
150+
151+
debit_details: Optional[object] = None
152+
"""Breakdown of debits"""
153+
145154

146155
class InterestDetailsDailyBalanceAmounts(BaseModel):
147156
balance_transfers: str
@@ -210,6 +219,9 @@ class PeriodTotals(BaseModel):
210219
cents
211220
"""
212221

222+
debits: int
223+
"""Volume of debit management operation transactions less any interest in cents"""
224+
213225
fees: int
214226
"""Volume of debit management operation transactions less any interest in cents"""
215227

@@ -222,6 +234,12 @@ class PeriodTotals(BaseModel):
222234
purchases: int
223235
"""Net card transaction volume less any cash advances in cents"""
224236

237+
credit_details: Optional[object] = None
238+
"""Breakdown of credits"""
239+
240+
debit_details: Optional[object] = None
241+
"""Breakdown of debits"""
242+
225243

226244
class PreviousStatementBalance(BaseModel):
227245
amount: int
@@ -242,6 +260,9 @@ class YtdTotals(BaseModel):
242260
cents
243261
"""
244262

263+
debits: int
264+
"""Volume of debit management operation transactions less any interest in cents"""
265+
245266
fees: int
246267
"""Volume of debit management operation transactions less any interest in cents"""
247268

@@ -254,6 +275,12 @@ class YtdTotals(BaseModel):
254275
purchases: int
255276
"""Net card transaction volume less any cash advances in cents"""
256277

278+
credit_details: Optional[object] = None
279+
"""Breakdown of credits"""
280+
281+
debit_details: Optional[object] = None
282+
"""Breakdown of debits"""
283+
257284

258285
class LoanTape(BaseModel):
259286
token: str

src/lithic/types/financial_accounts/statement.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class PeriodTotals(BaseModel):
8181
cents
8282
"""
8383

84+
debits: int
85+
"""Volume of debit management operation transactions less any interest in cents"""
86+
8487
fees: int
8588
"""Volume of debit management operation transactions less any interest in cents"""
8689

@@ -93,6 +96,12 @@ class PeriodTotals(BaseModel):
9396
purchases: int
9497
"""Net card transaction volume less any cash advances in cents"""
9598

99+
credit_details: Optional[object] = None
100+
"""Breakdown of credits"""
101+
102+
debit_details: Optional[object] = None
103+
"""Breakdown of debits"""
104+
96105

97106
class YtdTotals(BaseModel):
98107
balance_transfers: int
@@ -107,6 +116,9 @@ class YtdTotals(BaseModel):
107116
cents
108117
"""
109118

119+
debits: int
120+
"""Volume of debit management operation transactions less any interest in cents"""
121+
110122
fees: int
111123
"""Volume of debit management operation transactions less any interest in cents"""
112124

@@ -119,6 +131,12 @@ class YtdTotals(BaseModel):
119131
purchases: int
120132
"""Net card transaction volume less any cash advances in cents"""
121133

134+
credit_details: Optional[object] = None
135+
"""Breakdown of credits"""
136+
137+
debit_details: Optional[object] = None
138+
"""Breakdown of debits"""
139+
122140

123141
class InterestDetailsDailyBalanceAmounts(BaseModel):
124142
balance_transfers: str

src/lithic/types/tokenization.py

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
3+
from typing import List, Union, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

@@ -63,22 +63,27 @@ class Tokenization(BaseModel):
6363
status: Literal["ACTIVE", "DEACTIVATED", "INACTIVE", "PAUSED", "PENDING_2FA", "PENDING_ACTIVATION", "UNKNOWN"]
6464
"""The status of the tokenization request"""
6565

66-
token_requestor_name: Literal[
67-
"AMAZON_ONE",
68-
"ANDROID_PAY",
69-
"APPLE_PAY",
70-
"FACEBOOK",
71-
"FITBIT_PAY",
72-
"GARMIN_PAY",
73-
"MICROSOFT_PAY",
74-
"NETFLIX",
75-
"SAMSUNG_PAY",
76-
"UNKNOWN",
77-
"VISA_CHECKOUT",
66+
token_requestor_name: Union[
67+
Literal[
68+
"AMAZON_ONE",
69+
"ANDROID_PAY",
70+
"APPLE_PAY",
71+
"FACEBOOK",
72+
"FITBIT_PAY",
73+
"GARMIN_PAY",
74+
"GOOGLE_PAY",
75+
"MICROSOFT_PAY",
76+
"NETFLIX",
77+
"SAMSUNG_PAY",
78+
"UNKNOWN",
79+
"VISA_CHECKOUT",
80+
],
81+
str,
7882
]
7983
"""The entity that requested the tokenization.
8084
81-
Represents a Digital Wallet or merchant.
85+
For digital wallets, this will be one of the defined wallet types. For merchant
86+
tokenizations, this will be a free-form merchant name string.
8287
"""
8388

8489
token_unique_reference: str
@@ -90,9 +95,12 @@ class Tokenization(BaseModel):
9095
updated_at: datetime
9196
"""Latest date and time when the tokenization was updated. UTC time zone."""
9297

98+
device_id: Optional[str] = None
99+
"""The device identifier associated with the tokenization."""
100+
93101
digital_card_art_token: Optional[str] = None
94102
"""
95-
Specifies the digital card art displayed in the users digital wallet after
103+
Specifies the digital card art displayed in the user's digital wallet after
96104
tokenization. This will be null if the tokenization was created without an
97105
associated digital card art. See
98106
[Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).

src/lithic/types/transactions/events/enhanced_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class CommonLineItem(BaseModel):
13-
amount: Optional[float] = None
13+
amount: Optional[str] = None
1414
"""The price of the item purchased in merchant currency."""
1515

1616
description: Optional[str] = None
@@ -19,7 +19,7 @@ class CommonLineItem(BaseModel):
1919
product_code: Optional[str] = None
2020
"""An identifier for the item purchased."""
2121

22-
quantity: Optional[float] = None
22+
quantity: Optional[str] = None
2323
"""The quantity of the item purchased."""
2424

2525

@@ -61,7 +61,7 @@ class FleetAmountTotals(BaseModel):
6161

6262

6363
class FleetFuel(BaseModel):
64-
quantity: Optional[float] = None
64+
quantity: Optional[str] = None
6565
"""The quantity of fuel purchased."""
6666

6767
type: Optional[

0 commit comments

Comments
 (0)