Skip to content

Commit b5e5077

Browse files
feat(api): adds Network Programs and Account/Card Sub-statuses
- Add detailed substatus enums for Account and Card state management with fraud, risk, and lifecycle reason codes - Add Network Program endpoints for program management.
1 parent a254fdb commit b5e5077

99 files changed

Lines changed: 3695 additions & 231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 165
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-41b87f6139d55188993492b9c042a6bc1bc0506c166334c387072b57b6c79869.yml
3-
openapi_spec_hash: 3327246caf3bcbd3504ce99c81062075
4-
config_hash: f390dcd4de9109eff9667160949feef2
1+
configured_endpoints: 167
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b9c76d077831114f1e4c5c15ff3f1d835ef3e9361b768af8468f8eb07a09ef3e.yml
3+
openapi_spec_hash: 5f9bcf1afd68f962a870727c35628394
4+
config_hash: e9a46eb8acb9dc2c236f3e1958a1c4dd

lib/lithic.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
require_relative "lithic/models/external_payment_retrieve_params"
214214
require_relative "lithic/models/external_payment_reverse_params"
215215
require_relative "lithic/models/external_payment_settle_params"
216+
require_relative "lithic/models/external_resource"
217+
require_relative "lithic/models/external_resource_type"
216218
require_relative "lithic/models/financial_account"
217219
require_relative "lithic/models/financial_account_create_params"
218220
require_relative "lithic/models/financial_account_list_params"
@@ -258,6 +260,9 @@
258260
require_relative "lithic/models/management_operation_reverse_params"
259261
require_relative "lithic/models/management_operation_transaction"
260262
require_relative "lithic/models/message_attempt"
263+
require_relative "lithic/models/network_program"
264+
require_relative "lithic/models/network_program_list_params"
265+
require_relative "lithic/models/network_program_retrieve_params"
261266
require_relative "lithic/models/owner_type"
262267
require_relative "lithic/models/payment_create_params"
263268
require_relative "lithic/models/payment_create_response"
@@ -379,6 +384,7 @@
379384
require_relative "lithic/resources/fraud/transactions"
380385
require_relative "lithic/resources/funding_events"
381386
require_relative "lithic/resources/management_operations"
387+
require_relative "lithic/resources/network_programs"
382388
require_relative "lithic/resources/payments"
383389
require_relative "lithic/resources/reports"
384390
require_relative "lithic/resources/reports/settlement"

lib/lithic/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ class Client < Lithic::Internal::Transport::BaseClient
104104
# @return [Lithic::Resources::Fraud]
105105
attr_reader :fraud
106106

107+
# @return [Lithic::Resources::NetworkPrograms]
108+
attr_reader :network_programs
109+
107110
# Status of api
108111
#
109112
# @overload api_status(request_options: {})
@@ -205,6 +208,7 @@ def initialize(
205208
@management_operations = Lithic::Resources::ManagementOperations.new(client: self)
206209
@funding_events = Lithic::Resources::FundingEvents.new(client: self)
207210
@fraud = Lithic::Resources::Fraud.new(client: self)
211+
@network_programs = Lithic::Resources::NetworkPrograms.new(client: self)
208212
end
209213
end
210214
end

lib/lithic/models.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ module Lithic
224224

225225
ExternalPaymentSettleParams = Lithic::Models::ExternalPaymentSettleParams
226226

227+
ExternalResource = Lithic::Models::ExternalResource
228+
229+
ExternalResourceType = Lithic::Models::ExternalResourceType
230+
227231
FinancialAccount = Lithic::Models::FinancialAccount
228232

229233
FinancialAccountCreateParams = Lithic::Models::FinancialAccountCreateParams
@@ -272,6 +276,12 @@ module Lithic
272276

273277
MessageAttempt = Lithic::Models::MessageAttempt
274278

279+
NetworkProgram = Lithic::Models::NetworkProgram
280+
281+
NetworkProgramListParams = Lithic::Models::NetworkProgramListParams
282+
283+
NetworkProgramRetrieveParams = Lithic::Models::NetworkProgramRetrieveParams
284+
275285
NonPCICard = Lithic::Models::NonPCICard
276286

277287
OwnerType = Lithic::Models::OwnerType

lib/lithic/models/account.rb

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,51 @@ class Account < Lithic::Internal::Type::BaseModel
6666
# @return [String, nil]
6767
optional :cardholder_currency, String
6868

69+
# @!attribute comment
70+
# Additional context or information related to the account.
71+
#
72+
# @return [String, nil]
73+
optional :comment, String
74+
75+
# @!attribute substatus
76+
# Account state substatus values:
77+
#
78+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
79+
# with stolen or fabricated identity information, encompassing both true
80+
# identity theft and synthetic identities.
81+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
82+
# unauthorized access or fraudulent transactions, necessitating further
83+
# investigation.
84+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
85+
# legitimate account holder. Examples include disputing valid transactions
86+
# without cause, falsely claiming non-receipt of goods, or engaging in
87+
# intentional bust-out schemes to exploit account services.
88+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
89+
# of the account for personal reasons. This encompasses situations such as
90+
# bankruptcy, other financial considerations, or the account holder's death.
91+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
92+
# business strategy, risk management, inactivity, product changes, regulatory
93+
# concerns, or violations of terms and conditions.
94+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
95+
# within a specified period. This status applies to accounts that are paused or
96+
# closed due to inactivity.
97+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
98+
# review. In future implementations, this status may prevent clients from
99+
# activating the account via APIs until the review is completed.
100+
# - `OTHER` - The reason for the account's current status does not fall into any
101+
# of the above categories. A comment should be provided to specify the
102+
# particular reason.
103+
#
104+
# @return [Symbol, Lithic::Models::Account::Substatus, nil]
105+
optional :substatus, enum: -> { Lithic::Account::Substatus }
106+
69107
# @!attribute verification_address
70108
# @deprecated
71109
#
72110
# @return [Lithic::Models::Account::VerificationAddress, nil]
73111
optional :verification_address, -> { Lithic::Account::VerificationAddress }
74112

75-
# @!method initialize(token:, created:, spend_limit:, state:, account_holder: nil, auth_rule_tokens: nil, cardholder_currency: nil, verification_address: nil)
113+
# @!method initialize(token:, created:, spend_limit:, state:, account_holder: nil, auth_rule_tokens: nil, cardholder_currency: nil, comment: nil, substatus: nil, verification_address: nil)
76114
# Some parameter documentations has been truncated, see {Lithic::Models::Account}
77115
# for more details.
78116
#
@@ -90,6 +128,10 @@ class Account < Lithic::Internal::Type::BaseModel
90128
#
91129
# @param cardholder_currency [String] 3-character alphabetic ISO 4217 code for the currency of the cardholder.
92130
#
131+
# @param comment [String] Additional context or information related to the account.
132+
#
133+
# @param substatus [Symbol, Lithic::Models::Account::Substatus] Account state substatus values:
134+
#
93135
# @param verification_address [Lithic::Models::Account::VerificationAddress]
94136

95137
# @see Lithic::Models::Account#spend_limit
@@ -191,6 +233,51 @@ class AccountHolder < Lithic::Internal::Type::BaseModel
191233
# @param phone_number [String] Phone number of the individual.
192234
end
193235

236+
# Account state substatus values:
237+
#
238+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
239+
# with stolen or fabricated identity information, encompassing both true
240+
# identity theft and synthetic identities.
241+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
242+
# unauthorized access or fraudulent transactions, necessitating further
243+
# investigation.
244+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
245+
# legitimate account holder. Examples include disputing valid transactions
246+
# without cause, falsely claiming non-receipt of goods, or engaging in
247+
# intentional bust-out schemes to exploit account services.
248+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
249+
# of the account for personal reasons. This encompasses situations such as
250+
# bankruptcy, other financial considerations, or the account holder's death.
251+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
252+
# business strategy, risk management, inactivity, product changes, regulatory
253+
# concerns, or violations of terms and conditions.
254+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
255+
# within a specified period. This status applies to accounts that are paused or
256+
# closed due to inactivity.
257+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
258+
# review. In future implementations, this status may prevent clients from
259+
# activating the account via APIs until the review is completed.
260+
# - `OTHER` - The reason for the account's current status does not fall into any
261+
# of the above categories. A comment should be provided to specify the
262+
# particular reason.
263+
#
264+
# @see Lithic::Models::Account#substatus
265+
module Substatus
266+
extend Lithic::Internal::Type::Enum
267+
268+
FRAUD_IDENTIFIED = :FRAUD_IDENTIFIED
269+
SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY
270+
RISK_VIOLATION = :RISK_VIOLATION
271+
END_USER_REQUEST = :END_USER_REQUEST
272+
ISSUER_REQUEST = :ISSUER_REQUEST
273+
NOT_ACTIVE = :NOT_ACTIVE
274+
INTERNAL_REVIEW = :INTERNAL_REVIEW
275+
OTHER = :OTHER
276+
277+
# @!method self.values
278+
# @return [Array<Symbol>]
279+
end
280+
194281
# @deprecated
195282
#
196283
# @see Lithic::Models::Account#verification_address

lib/lithic/models/account_update_params.rb

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel
77
extend Lithic::Internal::Type::RequestParameters::Converter
88
include Lithic::Internal::Type::RequestParameters
99

10+
# @!attribute comment
11+
# Additional context or information related to the account.
12+
#
13+
# @return [String, nil]
14+
optional :comment, String
15+
1016
# @!attribute daily_spend_limit
1117
# Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a
1218
# $1,000 limit). By default the daily spend limit is set to $1,250.
@@ -39,6 +45,38 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel
3945
# @return [Symbol, Lithic::Models::AccountUpdateParams::State, nil]
4046
optional :state, enum: -> { Lithic::AccountUpdateParams::State }
4147

48+
# @!attribute substatus
49+
# Account state substatus values:
50+
#
51+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
52+
# with stolen or fabricated identity information, encompassing both true
53+
# identity theft and synthetic identities.
54+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
55+
# unauthorized access or fraudulent transactions, necessitating further
56+
# investigation.
57+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
58+
# legitimate account holder. Examples include disputing valid transactions
59+
# without cause, falsely claiming non-receipt of goods, or engaging in
60+
# intentional bust-out schemes to exploit account services.
61+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
62+
# of the account for personal reasons. This encompasses situations such as
63+
# bankruptcy, other financial considerations, or the account holder's death.
64+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
65+
# business strategy, risk management, inactivity, product changes, regulatory
66+
# concerns, or violations of terms and conditions.
67+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
68+
# within a specified period. This status applies to accounts that are paused or
69+
# closed due to inactivity.
70+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
71+
# review. In future implementations, this status may prevent clients from
72+
# activating the account via APIs until the review is completed.
73+
# - `OTHER` - The reason for the account's current status does not fall into any
74+
# of the above categories. A comment should be provided to specify the
75+
# particular reason.
76+
#
77+
# @return [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil]
78+
optional :substatus, enum: -> { Lithic::AccountUpdateParams::Substatus }
79+
4280
# @!attribute verification_address
4381
# @deprecated
4482
#
@@ -50,10 +88,12 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel
5088
# @return [Lithic::Models::AccountUpdateParams::VerificationAddress, nil]
5189
optional :verification_address, -> { Lithic::AccountUpdateParams::VerificationAddress }
5290

53-
# @!method initialize(daily_spend_limit: nil, lifetime_spend_limit: nil, monthly_spend_limit: nil, state: nil, verification_address: nil, request_options: {})
91+
# @!method initialize(comment: nil, daily_spend_limit: nil, lifetime_spend_limit: nil, monthly_spend_limit: nil, state: nil, substatus: nil, verification_address: nil, request_options: {})
5492
# Some parameter documentations has been truncated, see
5593
# {Lithic::Models::AccountUpdateParams} for more details.
5694
#
95+
# @param comment [String] Additional context or information related to the account.
96+
#
5797
# @param daily_spend_limit [Integer] Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1
5898
#
5999
# @param lifetime_spend_limit [Integer] Amount (in cents) for the account's lifetime spend limit (e.g. 100000 would be a
@@ -62,6 +102,8 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel
62102
#
63103
# @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states.
64104
#
105+
# @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values:
106+
#
65107
# @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction
66108
#
67109
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
@@ -78,6 +120,49 @@ module State
78120
# @return [Array<Symbol>]
79121
end
80122

123+
# Account state substatus values:
124+
#
125+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
126+
# with stolen or fabricated identity information, encompassing both true
127+
# identity theft and synthetic identities.
128+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
129+
# unauthorized access or fraudulent transactions, necessitating further
130+
# investigation.
131+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
132+
# legitimate account holder. Examples include disputing valid transactions
133+
# without cause, falsely claiming non-receipt of goods, or engaging in
134+
# intentional bust-out schemes to exploit account services.
135+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
136+
# of the account for personal reasons. This encompasses situations such as
137+
# bankruptcy, other financial considerations, or the account holder's death.
138+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
139+
# business strategy, risk management, inactivity, product changes, regulatory
140+
# concerns, or violations of terms and conditions.
141+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
142+
# within a specified period. This status applies to accounts that are paused or
143+
# closed due to inactivity.
144+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
145+
# review. In future implementations, this status may prevent clients from
146+
# activating the account via APIs until the review is completed.
147+
# - `OTHER` - The reason for the account's current status does not fall into any
148+
# of the above categories. A comment should be provided to specify the
149+
# particular reason.
150+
module Substatus
151+
extend Lithic::Internal::Type::Enum
152+
153+
FRAUD_IDENTIFIED = :FRAUD_IDENTIFIED
154+
SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY
155+
RISK_VIOLATION = :RISK_VIOLATION
156+
END_USER_REQUEST = :END_USER_REQUEST
157+
ISSUER_REQUEST = :ISSUER_REQUEST
158+
NOT_ACTIVE = :NOT_ACTIVE
159+
INTERNAL_REVIEW = :INTERNAL_REVIEW
160+
OTHER = :OTHER
161+
162+
# @!method self.values
163+
# @return [Array<Symbol>]
164+
end
165+
81166
# @deprecated
82167
class VerificationAddress < Lithic::Internal::Type::BaseModel
83168
# @!attribute address1

lib/lithic/models/aggregate_balance.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ module FinancialAccountType
103103
ISSUING = :ISSUING
104104
OPERATING = :OPERATING
105105
RESERVE = :RESERVE
106+
SECURITY = :SECURITY
106107

107108
# @!method self.values
108109
# @return [Array<Symbol>]

lib/lithic/models/aggregate_balance_list_params.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module FinancialAccountType
2525
ISSUING = :ISSUING
2626
OPERATING = :OPERATING
2727
RESERVE = :RESERVE
28+
SECURITY = :SECURITY
2829

2930
# @!method self.values
3031
# @return [Array<Symbol>]

lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ class Condition < Lithic::Internal::Type::BaseModel
5656
# fee field in the settlement/cardholder billing currency. This is the amount
5757
# the issuer should authorize against unless the issuer is paying the acquirer
5858
# fee on behalf of the cardholder.
59-
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
60-
# given authentication. Scores are on a range of 0-999, with 0 representing the
61-
# lowest risk and 999 representing the highest risk. For Visa transactions,
62-
# where the raw score has a range of 0-99, Lithic will normalize the score by
63-
# multiplying the raw score by 10x.
59+
# - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication
60+
# risk level, with a higher value indicating a higher amount of risk.
6461
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
6562
#
6663
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Attribute, nil]
@@ -113,11 +110,8 @@ class Condition < Lithic::Internal::Type::BaseModel
113110
# fee field in the settlement/cardholder billing currency. This is the amount
114111
# the issuer should authorize against unless the issuer is paying the acquirer
115112
# fee on behalf of the cardholder.
116-
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
117-
# given authentication. Scores are on a range of 0-999, with 0 representing the
118-
# lowest risk and 999 representing the highest risk. For Visa transactions,
119-
# where the raw score has a range of 0-99, Lithic will normalize the score by
120-
# multiplying the raw score by 10x.
113+
# - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication
114+
# risk level, with a higher value indicating a higher amount of risk.
121115
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
122116
#
123117
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#attribute

0 commit comments

Comments
 (0)