Skip to content

Commit 2e5be17

Browse files
feat(api): adds support for Auto-Collections
1 parent f6e749e commit 2e5be17

60 files changed

Lines changed: 938 additions & 208 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 170
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1a0e3a42c88b88140af0f9ad05ab0026fc87f0a500d6879c86b93dfa7f923810.yml
3-
openapi_spec_hash: 2b4db6185c6e4ab3626461a448c97d4b
4-
config_hash: 7a6a0c0bab3306093c6c171cd7407a45
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b1839661d8405911184d5cb7230f16e626a616e5b744634bd7f0bb4e730bf899.yml
3+
openapi_spec_hash: c1c2c5a5c2a4067a714b35f873e3846f
4+
config_hash: 98214f2eab6804b5c0048331e32c08e3

lib/lithic/models/account_activity_list_params.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ module Category
111111

112112
ACH = :ACH
113113
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
114+
FEE = :FEE
115+
REWARD = :REWARD
116+
ADJUSTMENT = :ADJUSTMENT
117+
DERECOGNITION = :DERECOGNITION
118+
DISPUTE = :DISPUTE
114119
CARD = :CARD
115120
EXTERNAL_ACH = :EXTERNAL_ACH
116121
EXTERNAL_CHECK = :EXTERNAL_CHECK

lib/lithic/models/account_activity_list_response.rb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ module Category
143143

144144
ACH = :ACH
145145
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
146+
FEE = :FEE
147+
REWARD = :REWARD
148+
ADJUSTMENT = :ADJUSTMENT
149+
DERECOGNITION = :DERECOGNITION
150+
DISPUTE = :DISPUTE
146151
CARD = :CARD
147152
EXTERNAL_ACH = :EXTERNAL_ACH
148153
EXTERNAL_CHECK = :EXTERNAL_CHECK
@@ -232,12 +237,14 @@ module Type
232237
ACH_ORIGINATION_INITIATED = :ACH_ORIGINATION_INITIATED
233238
ACH_ORIGINATION_PROCESSED = :ACH_ORIGINATION_PROCESSED
234239
ACH_ORIGINATION_RELEASED = :ACH_ORIGINATION_RELEASED
240+
ACH_ORIGINATION_REJECTED = :ACH_ORIGINATION_REJECTED
235241
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
236242
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
237243
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
238244
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
239245
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
240246
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
247+
ACH_RETURN_REJECTED = :ACH_RETURN_REJECTED
241248
ACH_RETURN_SETTLED = :ACH_RETURN_SETTLED
242249
AUTHORIZATION = :AUTHORIZATION
243250
AUTHORIZATION_ADVICE = :AUTHORIZATION_ADVICE
@@ -486,19 +493,15 @@ class BookTransferTransaction < Lithic::Internal::Type::BaseModel
486493
module Category
487494
extend Lithic::Internal::Type::Enum
488495

489-
ACH = :ACH
496+
ADJUSTMENT = :ADJUSTMENT
490497
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
491-
CARD = :CARD
492-
EXTERNAL_ACH = :EXTERNAL_ACH
493-
EXTERNAL_CHECK = :EXTERNAL_CHECK
494-
EXTERNAL_TRANSFER = :EXTERNAL_TRANSFER
495-
EXTERNAL_WIRE = :EXTERNAL_WIRE
496-
MANAGEMENT_ADJUSTMENT = :MANAGEMENT_ADJUSTMENT
497-
MANAGEMENT_DISPUTE = :MANAGEMENT_DISPUTE
498-
MANAGEMENT_FEE = :MANAGEMENT_FEE
499-
MANAGEMENT_REWARD = :MANAGEMENT_REWARD
500-
MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT
498+
DERECOGNITION = :DERECOGNITION
499+
DISPUTE = :DISPUTE
500+
FEE = :FEE
501+
INTERNAL = :INTERNAL
502+
REWARD = :REWARD
501503
PROGRAM_FUNDING = :PROGRAM_FUNDING
504+
TRANSFER = :TRANSFER
502505

503506
# @!method self.values
504507
# @return [Array<Symbol>]
@@ -611,6 +614,7 @@ module Result
611614
module Type
612615
extend Lithic::Internal::Type::Enum
613616

617+
ATM_BALANCE_INQUIRY = :ATM_BALANCE_INQUIRY
614618
ATM_WITHDRAWAL = :ATM_WITHDRAWAL
615619
ATM_DECLINE = :ATM_DECLINE
616620
INTERNATIONAL_ATM_WITHDRAWAL = :INTERNATIONAL_ATM_WITHDRAWAL
@@ -981,6 +985,11 @@ module Category
981985

982986
ACH = :ACH
983987
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
988+
FEE = :FEE
989+
REWARD = :REWARD
990+
ADJUSTMENT = :ADJUSTMENT
991+
DERECOGNITION = :DERECOGNITION
992+
DISPUTE = :DISPUTE
984993
CARD = :CARD
985994
EXTERNAL_ACH = :EXTERNAL_ACH
986995
EXTERNAL_CHECK = :EXTERNAL_CHECK

lib/lithic/models/account_activity_retrieve_transaction_response.rb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ module Category
146146

147147
ACH = :ACH
148148
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
149+
FEE = :FEE
150+
REWARD = :REWARD
151+
ADJUSTMENT = :ADJUSTMENT
152+
DERECOGNITION = :DERECOGNITION
153+
DISPUTE = :DISPUTE
149154
CARD = :CARD
150155
EXTERNAL_ACH = :EXTERNAL_ACH
151156
EXTERNAL_CHECK = :EXTERNAL_CHECK
@@ -235,12 +240,14 @@ module Type
235240
ACH_ORIGINATION_INITIATED = :ACH_ORIGINATION_INITIATED
236241
ACH_ORIGINATION_PROCESSED = :ACH_ORIGINATION_PROCESSED
237242
ACH_ORIGINATION_RELEASED = :ACH_ORIGINATION_RELEASED
243+
ACH_ORIGINATION_REJECTED = :ACH_ORIGINATION_REJECTED
238244
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
239245
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
240246
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
241247
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
242248
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
243249
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
250+
ACH_RETURN_REJECTED = :ACH_RETURN_REJECTED
244251
ACH_RETURN_SETTLED = :ACH_RETURN_SETTLED
245252
AUTHORIZATION = :AUTHORIZATION
246253
AUTHORIZATION_ADVICE = :AUTHORIZATION_ADVICE
@@ -489,19 +496,15 @@ class BookTransferTransaction < Lithic::Internal::Type::BaseModel
489496
module Category
490497
extend Lithic::Internal::Type::Enum
491498

492-
ACH = :ACH
499+
ADJUSTMENT = :ADJUSTMENT
493500
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
494-
CARD = :CARD
495-
EXTERNAL_ACH = :EXTERNAL_ACH
496-
EXTERNAL_CHECK = :EXTERNAL_CHECK
497-
EXTERNAL_TRANSFER = :EXTERNAL_TRANSFER
498-
EXTERNAL_WIRE = :EXTERNAL_WIRE
499-
MANAGEMENT_ADJUSTMENT = :MANAGEMENT_ADJUSTMENT
500-
MANAGEMENT_DISPUTE = :MANAGEMENT_DISPUTE
501-
MANAGEMENT_FEE = :MANAGEMENT_FEE
502-
MANAGEMENT_REWARD = :MANAGEMENT_REWARD
503-
MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT
501+
DERECOGNITION = :DERECOGNITION
502+
DISPUTE = :DISPUTE
503+
FEE = :FEE
504+
INTERNAL = :INTERNAL
505+
REWARD = :REWARD
504506
PROGRAM_FUNDING = :PROGRAM_FUNDING
507+
TRANSFER = :TRANSFER
505508

506509
# @!method self.values
507510
# @return [Array<Symbol>]
@@ -614,6 +617,7 @@ module Result
614617
module Type
615618
extend Lithic::Internal::Type::Enum
616619

620+
ATM_BALANCE_INQUIRY = :ATM_BALANCE_INQUIRY
617621
ATM_WITHDRAWAL = :ATM_WITHDRAWAL
618622
ATM_DECLINE = :ATM_DECLINE
619623
INTERNATIONAL_ATM_WITHDRAWAL = :INTERNATIONAL_ATM_WITHDRAWAL
@@ -992,6 +996,11 @@ module Category
992996

993997
ACH = :ACH
994998
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
999+
FEE = :FEE
1000+
REWARD = :REWARD
1001+
ADJUSTMENT = :ADJUSTMENT
1002+
DERECOGNITION = :DERECOGNITION
1003+
DISPUTE = :DISPUTE
9951004
CARD = :CARD
9961005
EXTERNAL_ACH = :EXTERNAL_ACH
9971006
EXTERNAL_CHECK = :EXTERNAL_CHECK

lib/lithic/models/auth_rules/v2_update_params.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ class V2UpdateParams < Lithic::Internal::Type::BaseModel
88
extend Lithic::Internal::Type::RequestParameters::Converter
99
include Lithic::Internal::Type::RequestParameters
1010

11+
# @!attribute account_tokens
12+
# Account tokens to which the Auth Rule applies.
13+
#
14+
# @return [Array<String>, nil]
15+
optional :account_tokens, Lithic::Internal::Type::ArrayOf[String]
16+
17+
# @!attribute business_account_tokens
18+
# Business Account tokens to which the Auth Rule applies.
19+
#
20+
# @return [Array<String>, nil]
21+
optional :business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
22+
1123
# @!attribute name
1224
# Auth Rule Name
1325
#
@@ -42,10 +54,14 @@ class V2UpdateParams < Lithic::Internal::Type::BaseModel
4254
# @return [Boolean, nil]
4355
optional :program_level, Lithic::Internal::Type::Boolean
4456

45-
# @!method initialize(name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
57+
# @!method initialize(account_tokens: nil, business_account_tokens: nil, name: nil, state: nil, card_tokens: nil, excluded_card_tokens: nil, program_level: nil, request_options: {})
4658
# Some parameter documentations has been truncated, see
4759
# {Lithic::Models::AuthRules::V2UpdateParams} for more details.
4860
#
61+
# @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
62+
#
63+
# @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
64+
#
4965
# @param name [String, nil] Auth Rule Name
5066
#
5167
# @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::State] The desired state of the Auth Rule.

lib/lithic/models/book_transfer_create_params.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class BookTransferCreateParams < Lithic::Internal::Type::BaseModel
1515
required :amount, Integer
1616

1717
# @!attribute category
18-
# Category of the book transfer
1918
#
2019
# @return [Symbol, Lithic::Models::BookTransferCreateParams::Category]
2120
required :category, enum: -> { Lithic::BookTransferCreateParams::Category }
@@ -77,7 +76,7 @@ class BookTransferCreateParams < Lithic::Internal::Type::BaseModel
7776
#
7877
# @param amount [Integer] Amount to be transferred in the currency's smallest unit (e.g., cents for USD).
7978
#
80-
# @param category [Symbol, Lithic::Models::BookTransferCreateParams::Category] Category of the book transfer
79+
# @param category [Symbol, Lithic::Models::BookTransferCreateParams::Category]
8180
#
8281
# @param from_financial_account_token [String] Globally unique identifier for the financial account or card that will send the
8382
#
@@ -97,7 +96,6 @@ class BookTransferCreateParams < Lithic::Internal::Type::BaseModel
9796
#
9897
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
9998

100-
# Category of the book transfer
10199
module Category
102100
extend Lithic::Internal::Type::Enum
103101

@@ -106,7 +104,9 @@ module Category
106104
DERECOGNITION = :DERECOGNITION
107105
DISPUTE = :DISPUTE
108106
FEE = :FEE
107+
INTERNAL = :INTERNAL
109108
REWARD = :REWARD
109+
PROGRAM_FUNDING = :PROGRAM_FUNDING
110110
TRANSFER = :TRANSFER
111111

112112
# @!method self.values
@@ -117,6 +117,7 @@ module Category
117117
module Type
118118
extend Lithic::Internal::Type::Enum
119119

120+
ATM_BALANCE_INQUIRY = :ATM_BALANCE_INQUIRY
120121
ATM_WITHDRAWAL = :ATM_WITHDRAWAL
121122
ATM_DECLINE = :ATM_DECLINE
122123
INTERNATIONAL_ATM_WITHDRAWAL = :INTERNATIONAL_ATM_WITHDRAWAL

lib/lithic/models/book_transfer_list_params.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ class BookTransferListParams < Lithic::Internal::Type::BaseModel
108108
module Category
109109
extend Lithic::Internal::Type::Enum
110110

111-
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
112-
FEE = :FEE
113-
REWARD = :REWARD
114111
ADJUSTMENT = :ADJUSTMENT
112+
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
115113
DERECOGNITION = :DERECOGNITION
116114
DISPUTE = :DISPUTE
115+
FEE = :FEE
117116
INTERNAL = :INTERNAL
117+
REWARD = :REWARD
118+
PROGRAM_FUNDING = :PROGRAM_FUNDING
119+
TRANSFER = :TRANSFER
118120

119121
# @!method self.values
120122
# @return [Array<Symbol>]

lib/lithic/models/book_transfer_response.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class BookTransferResponse < Lithic::Internal::Type::BaseModel
1212
required :token, String
1313

1414
# @!attribute category
15-
# Category of the book transfer
1615
#
1716
# @return [Symbol, Lithic::Models::BookTransferResponse::Category]
1817
required :category, enum: -> { Lithic::BookTransferResponse::Category }
@@ -112,7 +111,7 @@ class BookTransferResponse < Lithic::Internal::Type::BaseModel
112111
#
113112
# @param token [String] Customer-provided token that will serve as an idempotency token. This token will
114113
#
115-
# @param category [Symbol, Lithic::Models::BookTransferResponse::Category] Category of the book transfer
114+
# @param category [Symbol, Lithic::Models::BookTransferResponse::Category]
116115
#
117116
# @param created [Time] Date and time when the transfer occurred. UTC time zone.
118117
#
@@ -140,8 +139,6 @@ class BookTransferResponse < Lithic::Internal::Type::BaseModel
140139
#
141140
# @param updated [Time] Date and time when the financial transaction was last updated. UTC time zone.
142141

143-
# Category of the book transfer
144-
#
145142
# @see Lithic::Models::BookTransferResponse#category
146143
module Category
147144
extend Lithic::Internal::Type::Enum
@@ -151,7 +148,9 @@ module Category
151148
DERECOGNITION = :DERECOGNITION
152149
DISPUTE = :DISPUTE
153150
FEE = :FEE
151+
INTERNAL = :INTERNAL
154152
REWARD = :REWARD
153+
PROGRAM_FUNDING = :PROGRAM_FUNDING
155154
TRANSFER = :TRANSFER
156155

157156
# @!method self.values
@@ -261,6 +260,7 @@ module Result
261260
module Type
262261
extend Lithic::Internal::Type::Enum
263262

263+
ATM_BALANCE_INQUIRY = :ATM_BALANCE_INQUIRY
264264
ATM_WITHDRAWAL = :ATM_WITHDRAWAL
265265
ATM_DECLINE = :ATM_DECLINE
266266
INTERNATIONAL_ATM_WITHDRAWAL = :INTERNATIONAL_ATM_WITHDRAWAL

lib/lithic/models/financial_account.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,13 @@ class CreditConfiguration < Lithic::Internal::Type::BaseModel
138138
# @return [String, nil]
139139
required :tier, String, nil?: true
140140

141-
# @!method initialize(charged_off_reason:, credit_limit:, credit_product_token:, external_bank_account_token:, financial_account_state:, is_spend_blocked:, tier:)
141+
# @!attribute auto_collection_configuration
142+
#
143+
# @return [Lithic::Models::FinancialAccount::CreditConfiguration::AutoCollectionConfiguration, nil]
144+
optional :auto_collection_configuration,
145+
-> { Lithic::FinancialAccount::CreditConfiguration::AutoCollectionConfiguration }
146+
147+
# @!method initialize(charged_off_reason:, credit_limit:, credit_product_token:, external_bank_account_token:, financial_account_state:, is_spend_blocked:, tier:, auto_collection_configuration: nil)
142148
# @param charged_off_reason [Symbol, Lithic::Models::FinancialAccount::CreditConfiguration::ChargedOffReason, nil] Reason for the financial account being marked as Charged Off
143149
#
144150
# @param credit_limit [Integer, nil]
@@ -152,6 +158,8 @@ class CreditConfiguration < Lithic::Internal::Type::BaseModel
152158
# @param is_spend_blocked [Boolean]
153159
#
154160
# @param tier [String, nil] Tier assigned to the financial account
161+
#
162+
# @param auto_collection_configuration [Lithic::Models::FinancialAccount::CreditConfiguration::AutoCollectionConfiguration]
155163

156164
# Reason for the financial account being marked as Charged Off
157165
#
@@ -180,6 +188,18 @@ module FinancialAccountState
180188
# @!method self.values
181189
# @return [Array<Symbol>]
182190
end
191+
192+
# @see Lithic::Models::FinancialAccount::CreditConfiguration#auto_collection_configuration
193+
class AutoCollectionConfiguration < Lithic::Internal::Type::BaseModel
194+
# @!attribute auto_collection_enabled
195+
# If auto collection is enabled for this account
196+
#
197+
# @return [Boolean]
198+
required :auto_collection_enabled, Lithic::Internal::Type::Boolean
199+
200+
# @!method initialize(auto_collection_enabled:)
201+
# @param auto_collection_enabled [Boolean] If auto collection is enabled for this account
202+
end
183203
end
184204

185205
# Status of the financial account

lib/lithic/models/financial_accounts/credit_configuration_update_params.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ class CreditConfigurationUpdateParams < Lithic::Internal::Type::BaseModel
88
extend Lithic::Internal::Type::RequestParameters::Converter
99
include Lithic::Internal::Type::RequestParameters
1010

11+
# @!attribute auto_collection_configuration
12+
#
13+
# @return [Lithic::Models::FinancialAccounts::CreditConfigurationUpdateParams::AutoCollectionConfiguration, nil]
14+
optional :auto_collection_configuration,
15+
-> { Lithic::FinancialAccounts::CreditConfigurationUpdateParams::AutoCollectionConfiguration }
16+
1117
# @!attribute credit_limit
1218
#
1319
# @return [Integer, nil]
@@ -30,7 +36,9 @@ class CreditConfigurationUpdateParams < Lithic::Internal::Type::BaseModel
3036
# @return [String, nil]
3137
optional :tier, String
3238

33-
# @!method initialize(credit_limit: nil, credit_product_token: nil, external_bank_account_token: nil, tier: nil, request_options: {})
39+
# @!method initialize(auto_collection_configuration: nil, credit_limit: nil, credit_product_token: nil, external_bank_account_token: nil, tier: nil, request_options: {})
40+
# @param auto_collection_configuration [Lithic::Models::FinancialAccounts::CreditConfigurationUpdateParams::AutoCollectionConfiguration]
41+
#
3442
# @param credit_limit [Integer]
3543
#
3644
# @param credit_product_token [String] Globally unique identifier for the credit product
@@ -40,6 +48,17 @@ class CreditConfigurationUpdateParams < Lithic::Internal::Type::BaseModel
4048
# @param tier [String] Tier to assign to a financial account
4149
#
4250
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
51+
52+
class AutoCollectionConfiguration < Lithic::Internal::Type::BaseModel
53+
# @!attribute auto_collection_enabled
54+
# If auto collection is enabled for this account
55+
#
56+
# @return [Boolean, nil]
57+
optional :auto_collection_enabled, Lithic::Internal::Type::Boolean
58+
59+
# @!method initialize(auto_collection_enabled: nil)
60+
# @param auto_collection_enabled [Boolean] If auto collection is enabled for this account
61+
end
4362
end
4463
end
4564
end

0 commit comments

Comments
 (0)