Skip to content

Commit 5bde4bc

Browse files
feat(api): add name_validation field to card_authorization
1 parent 71b5283 commit 5bde4bc

2 files changed

Lines changed: 49 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 194
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c1cfc621309e4d49899f9b055c399d7ad3eb24c05bad299322c1e03804d3d130.yml
3-
openapi_spec_hash: 799d9da903ff2e4d51fe3f1566d17c92
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-841a8ecd13fc28d3df06e6e11f63df6106be819aad9fe3dd6637afd7bc142a56.yml
3+
openapi_spec_hash: 705fb3eb9dc54e3b2b542896154cff80
44
config_hash: a0a579b0564a5c18568a78f5ba2b6653

src/lithic/types/card_authorization.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"Avs",
2121
"Card",
2222
"Merchant",
23+
"NameValidation",
24+
"NameValidationName",
25+
"NameValidationNameOnFileMatch",
2326
"ServiceLocation",
2427
"FleetInfo",
2528
"LatestChallenge",
@@ -149,6 +152,43 @@ class Merchant(merchant.Merchant):
149152
"""Street address of card acceptor."""
150153

151154

155+
class NameValidationName(BaseModel):
156+
"""Cardholder name as provided by the card network."""
157+
158+
first: str
159+
"""First name"""
160+
161+
last: str
162+
"""Last name"""
163+
164+
middle: Optional[str] = None
165+
"""Middle name"""
166+
167+
168+
class NameValidationNameOnFileMatch(BaseModel):
169+
"""
170+
Lithic's computed match result comparing the network-provided name to the name on file.
171+
"""
172+
173+
full_name: Literal["MATCH", "PARTIAL_MATCH", "NO_MATCH", "UNVERIFIED"]
174+
"""Overall name match result."""
175+
176+
177+
class NameValidation(BaseModel):
178+
"""
179+
Network name validation data, present when the card network requested name validation for this transaction. Contains the cardholder name provided by the network and Lithic's computed match result against KYC data on file.
180+
"""
181+
182+
name: NameValidationName
183+
"""Cardholder name as provided by the card network."""
184+
185+
name_on_file_match: NameValidationNameOnFileMatch
186+
"""
187+
Lithic's computed match result comparing the network-provided name to the name
188+
on file.
189+
"""
190+
191+
152192
class ServiceLocation(BaseModel):
153193
"""
154194
Where the cardholder received the service, when different from the card acceptor location. This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa F34 DS02.
@@ -470,6 +510,13 @@ class CardAuthorization(BaseModel):
470510
merchant_currency: str
471511
"""3-character alphabetic ISO 4217 code for the local currency of the transaction."""
472512

513+
name_validation: Optional[NameValidation] = None
514+
"""
515+
Network name validation data, present when the card network requested name
516+
validation for this transaction. Contains the cardholder name provided by the
517+
network and Lithic's computed match result against KYC data on file.
518+
"""
519+
473520
service_location: Optional[ServiceLocation] = None
474521
"""
475522
Where the cardholder received the service, when different from the card acceptor

0 commit comments

Comments
 (0)