Skip to content

Commit 5747fda

Browse files
feat(api): add NVS name_validation fields to ASA request and response
1 parent bd7f679 commit 5747fda

4 files changed

Lines changed: 397 additions & 3 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: 195
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

lib/lithic/models/card_authorization.rb

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel
110110
# @return [String]
111111
required :merchant_currency, String
112112

113+
# @!attribute name_validation
114+
# Network name validation data, present when the card network requested name
115+
# validation for this transaction. Contains the cardholder name provided by the
116+
# network and Lithic's computed match result against KYC data on file.
117+
#
118+
# @return [Lithic::Models::CardAuthorization::NameValidation, nil]
119+
required :name_validation, -> { Lithic::CardAuthorization::NameValidation }, nil?: true
120+
113121
# @!attribute service_location
114122
# Where the cardholder received the service, when different from the card acceptor
115123
# location. This is populated from network data elements such as Mastercard DE-122
@@ -233,7 +241,7 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel
233241
# @return [Time, nil]
234242
optional :ttl, Time
235243

236-
# @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil)
244+
# @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, name_validation:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil)
237245
# Some parameter documentations has been truncated, see
238246
# {Lithic::Models::CardAuthorization} for more details.
239247
#
@@ -265,6 +273,8 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel
265273
#
266274
# @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction.
267275
#
276+
# @param name_validation [Lithic::Models::CardAuthorization::NameValidation, nil] Network name validation data, present when the card network requested name valid
277+
#
268278
# @param service_location [Lithic::Models::CardAuthorization::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor
269279
#
270280
# @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se
@@ -623,6 +633,94 @@ class Merchant < Lithic::Models::Merchant
623633
# @param street_address [String, nil] Street address of card acceptor.
624634
end
625635

636+
# @see Lithic::Models::CardAuthorization#name_validation
637+
class NameValidation < Lithic::Internal::Type::BaseModel
638+
# @!attribute name
639+
# Cardholder name as provided by the card network.
640+
#
641+
# @return [Lithic::Models::CardAuthorization::NameValidation::Name]
642+
required :name, -> { Lithic::CardAuthorization::NameValidation::Name }
643+
644+
# @!attribute name_on_file_match
645+
# Lithic's computed match result comparing the network-provided name to the name
646+
# on file.
647+
#
648+
# @return [Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch]
649+
required :name_on_file_match, -> { Lithic::CardAuthorization::NameValidation::NameOnFileMatch }
650+
651+
# @!method initialize(name:, name_on_file_match:)
652+
# Some parameter documentations has been truncated, see
653+
# {Lithic::Models::CardAuthorization::NameValidation} for more details.
654+
#
655+
# Network name validation data, present when the card network requested name
656+
# validation for this transaction. Contains the cardholder name provided by the
657+
# network and Lithic's computed match result against KYC data on file.
658+
#
659+
# @param name [Lithic::Models::CardAuthorization::NameValidation::Name] Cardholder name as provided by the card network.
660+
#
661+
# @param name_on_file_match [Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch] Lithic's computed match result comparing the network-provided name to the name o
662+
663+
# @see Lithic::Models::CardAuthorization::NameValidation#name
664+
class Name < Lithic::Internal::Type::BaseModel
665+
# @!attribute first
666+
# First name
667+
#
668+
# @return [String]
669+
required :first, String
670+
671+
# @!attribute last
672+
# Last name
673+
#
674+
# @return [String]
675+
required :last, String
676+
677+
# @!attribute middle
678+
# Middle name
679+
#
680+
# @return [String, nil]
681+
required :middle, String, nil?: true
682+
683+
# @!method initialize(first:, last:, middle:)
684+
# Cardholder name as provided by the card network.
685+
#
686+
# @param first [String] First name
687+
#
688+
# @param last [String] Last name
689+
#
690+
# @param middle [String, nil] Middle name
691+
end
692+
693+
# @see Lithic::Models::CardAuthorization::NameValidation#name_on_file_match
694+
class NameOnFileMatch < Lithic::Internal::Type::BaseModel
695+
# @!attribute full_name
696+
# Overall name match result.
697+
#
698+
# @return [Symbol, Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::FullName]
699+
required :full_name, enum: -> { Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName }
700+
701+
# @!method initialize(full_name:)
702+
# Lithic's computed match result comparing the network-provided name to the name
703+
# on file.
704+
#
705+
# @param full_name [Symbol, Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::FullName] Overall name match result.
706+
707+
# Overall name match result.
708+
#
709+
# @see Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch#full_name
710+
module FullName
711+
extend Lithic::Internal::Type::Enum
712+
713+
MATCH = :MATCH
714+
PARTIAL_MATCH = :PARTIAL_MATCH
715+
NO_MATCH = :NO_MATCH
716+
UNVERIFIED = :UNVERIFIED
717+
718+
# @!method self.values
719+
# @return [Array<Symbol>]
720+
end
721+
end
722+
end
723+
626724
# @see Lithic::Models::CardAuthorization#service_location
627725
class ServiceLocation < Lithic::Internal::Type::BaseModel
628726
# @!attribute city

rbi/lithic/models/card_authorization.rbi

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ module Lithic
9191
sig { returns(String) }
9292
attr_accessor :merchant_currency
9393

94+
# Network name validation data, present when the card network requested name
95+
# validation for this transaction. Contains the cardholder name provided by the
96+
# network and Lithic's computed match result against KYC data on file.
97+
sig { returns(T.nilable(Lithic::CardAuthorization::NameValidation)) }
98+
attr_reader :name_validation
99+
100+
sig do
101+
params(
102+
name_validation:
103+
T.nilable(Lithic::CardAuthorization::NameValidation::OrHash)
104+
).void
105+
end
106+
attr_writer :name_validation
107+
94108
# Where the cardholder received the service, when different from the card acceptor
95109
# location. This is populated from network data elements such as Mastercard DE-122
96110
# SE1 SF9-14 and Visa F34 DS02.
@@ -263,6 +277,8 @@ module Lithic
263277
merchant: Lithic::CardAuthorization::Merchant::OrHash,
264278
merchant_amount: Integer,
265279
merchant_currency: String,
280+
name_validation:
281+
T.nilable(Lithic::CardAuthorization::NameValidation::OrHash),
266282
service_location:
267283
T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash),
268284
settled_amount: Integer,
@@ -331,6 +347,10 @@ module Lithic
331347
merchant_amount:,
332348
# 3-character alphabetic ISO 4217 code for the local currency of the transaction.
333349
merchant_currency:,
350+
# Network name validation data, present when the card network requested name
351+
# validation for this transaction. Contains the cardholder name provided by the
352+
# network and Lithic's computed match result against KYC data on file.
353+
name_validation:,
334354
# Where the cardholder received the service, when different from the card acceptor
335355
# location. This is populated from network data elements such as Mastercard DE-122
336356
# SE1 SF9-14 and Visa F34 DS02.
@@ -401,6 +421,8 @@ module Lithic
401421
merchant: Lithic::CardAuthorization::Merchant,
402422
merchant_amount: Integer,
403423
merchant_currency: String,
424+
name_validation:
425+
T.nilable(Lithic::CardAuthorization::NameValidation),
404426
service_location:
405427
T.nilable(Lithic::CardAuthorization::ServiceLocation),
406428
settled_amount: Integer,
@@ -1042,6 +1064,209 @@ module Lithic
10421064
end
10431065
end
10441066

1067+
class NameValidation < Lithic::Internal::Type::BaseModel
1068+
OrHash =
1069+
T.type_alias do
1070+
T.any(
1071+
Lithic::CardAuthorization::NameValidation,
1072+
Lithic::Internal::AnyHash
1073+
)
1074+
end
1075+
1076+
# Cardholder name as provided by the card network.
1077+
sig { returns(Lithic::CardAuthorization::NameValidation::Name) }
1078+
attr_reader :name
1079+
1080+
sig do
1081+
params(
1082+
name: Lithic::CardAuthorization::NameValidation::Name::OrHash
1083+
).void
1084+
end
1085+
attr_writer :name
1086+
1087+
# Lithic's computed match result comparing the network-provided name to the name
1088+
# on file.
1089+
sig do
1090+
returns(Lithic::CardAuthorization::NameValidation::NameOnFileMatch)
1091+
end
1092+
attr_reader :name_on_file_match
1093+
1094+
sig do
1095+
params(
1096+
name_on_file_match:
1097+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::OrHash
1098+
).void
1099+
end
1100+
attr_writer :name_on_file_match
1101+
1102+
# Network name validation data, present when the card network requested name
1103+
# validation for this transaction. Contains the cardholder name provided by the
1104+
# network and Lithic's computed match result against KYC data on file.
1105+
sig do
1106+
params(
1107+
name: Lithic::CardAuthorization::NameValidation::Name::OrHash,
1108+
name_on_file_match:
1109+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::OrHash
1110+
).returns(T.attached_class)
1111+
end
1112+
def self.new(
1113+
# Cardholder name as provided by the card network.
1114+
name:,
1115+
# Lithic's computed match result comparing the network-provided name to the name
1116+
# on file.
1117+
name_on_file_match:
1118+
)
1119+
end
1120+
1121+
sig do
1122+
override.returns(
1123+
{
1124+
name: Lithic::CardAuthorization::NameValidation::Name,
1125+
name_on_file_match:
1126+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch
1127+
}
1128+
)
1129+
end
1130+
def to_hash
1131+
end
1132+
1133+
class Name < Lithic::Internal::Type::BaseModel
1134+
OrHash =
1135+
T.type_alias do
1136+
T.any(
1137+
Lithic::CardAuthorization::NameValidation::Name,
1138+
Lithic::Internal::AnyHash
1139+
)
1140+
end
1141+
1142+
# First name
1143+
sig { returns(String) }
1144+
attr_accessor :first
1145+
1146+
# Last name
1147+
sig { returns(String) }
1148+
attr_accessor :last
1149+
1150+
# Middle name
1151+
sig { returns(T.nilable(String)) }
1152+
attr_accessor :middle
1153+
1154+
# Cardholder name as provided by the card network.
1155+
sig do
1156+
params(
1157+
first: String,
1158+
last: String,
1159+
middle: T.nilable(String)
1160+
).returns(T.attached_class)
1161+
end
1162+
def self.new(
1163+
# First name
1164+
first:,
1165+
# Last name
1166+
last:,
1167+
# Middle name
1168+
middle:
1169+
)
1170+
end
1171+
1172+
sig do
1173+
override.returns(
1174+
{ first: String, last: String, middle: T.nilable(String) }
1175+
)
1176+
end
1177+
def to_hash
1178+
end
1179+
end
1180+
1181+
class NameOnFileMatch < Lithic::Internal::Type::BaseModel
1182+
OrHash =
1183+
T.type_alias do
1184+
T.any(
1185+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch,
1186+
Lithic::Internal::AnyHash
1187+
)
1188+
end
1189+
1190+
# Overall name match result.
1191+
sig do
1192+
returns(
1193+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1194+
)
1195+
end
1196+
attr_accessor :full_name
1197+
1198+
# Lithic's computed match result comparing the network-provided name to the name
1199+
# on file.
1200+
sig do
1201+
params(
1202+
full_name:
1203+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::OrSymbol
1204+
).returns(T.attached_class)
1205+
end
1206+
def self.new(
1207+
# Overall name match result.
1208+
full_name:
1209+
)
1210+
end
1211+
1212+
sig do
1213+
override.returns(
1214+
{
1215+
full_name:
1216+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1217+
}
1218+
)
1219+
end
1220+
def to_hash
1221+
end
1222+
1223+
# Overall name match result.
1224+
module FullName
1225+
extend Lithic::Internal::Type::Enum
1226+
1227+
TaggedSymbol =
1228+
T.type_alias do
1229+
T.all(
1230+
Symbol,
1231+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName
1232+
)
1233+
end
1234+
OrSymbol = T.type_alias { T.any(Symbol, String) }
1235+
1236+
MATCH =
1237+
T.let(
1238+
:MATCH,
1239+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1240+
)
1241+
PARTIAL_MATCH =
1242+
T.let(
1243+
:PARTIAL_MATCH,
1244+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1245+
)
1246+
NO_MATCH =
1247+
T.let(
1248+
:NO_MATCH,
1249+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1250+
)
1251+
UNVERIFIED =
1252+
T.let(
1253+
:UNVERIFIED,
1254+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1255+
)
1256+
1257+
sig do
1258+
override.returns(
1259+
T::Array[
1260+
Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol
1261+
]
1262+
)
1263+
end
1264+
def self.values
1265+
end
1266+
end
1267+
end
1268+
end
1269+
10451270
class ServiceLocation < Lithic::Internal::Type::BaseModel
10461271
OrHash =
10471272
T.type_alias do

0 commit comments

Comments
 (0)