Skip to content

Commit fb4a958

Browse files
feat(api): add ach payment update actions/results, card transaction results to auth_rules
1 parent 5ac2427 commit fb4a958

34 files changed

Lines changed: 2775 additions & 117 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 214
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a4afc884f86f30a87445552888031ac1ca18aed0476d7120da555bf457627e65.yml
3-
openapi_spec_hash: ce8d0830986c702f0c7a693b1c3cc5a2
4-
config_hash: 4b618a1df59e555cebe6aa13e8c0218f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-8e691d2dedaea1906ebbe28b28c978855d5e4fe5fe595a8d23917df851123400.yml
3+
openapi_spec_hash: c33e82abb4d7c979d05386ca230464d3
4+
config_hash: 5bb913c05ebeb301ec925b16e75bb251

lib/lithic.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,15 @@
117117
require_relative "lithic/models/address"
118118
require_relative "lithic/models/address_update"
119119
require_relative "lithic/models/api_status"
120+
require_relative "lithic/models/auth_rules/ach_payment_update_action"
120121
require_relative "lithic/models/auth_rules/auth_rule"
121122
require_relative "lithic/models/auth_rules/auth_rule_condition"
122123
require_relative "lithic/models/auth_rules/auth_rule_version"
123124
require_relative "lithic/models/auth_rules/backtest_stats"
124125
require_relative "lithic/models/auth_rules/card_transaction_update_action"
125126
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
126127
require_relative "lithic/models/auth_rules/conditional_ach_action_parameters"
128+
require_relative "lithic/models/auth_rules/conditional_ach_payment_update_action_parameters"
127129
require_relative "lithic/models/auth_rules/conditional_attribute"
128130
require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters"
129131
require_relative "lithic/models/auth_rules/conditional_authorization_adjustment_parameters"
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
module ACHPaymentUpdateAction
7+
extend Lithic::Internal::Type::Union
8+
9+
variant -> { Lithic::AuthRules::ACHPaymentUpdateAction::TagAction }
10+
11+
variant -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction }
12+
13+
class TagAction < Lithic::Internal::Type::BaseModel
14+
# @!attribute key
15+
# The key of the tag to apply to the payment
16+
#
17+
# @return [String]
18+
required :key, String
19+
20+
# @!attribute type
21+
# Tag the payment with key-value metadata
22+
#
23+
# @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::Type]
24+
required :type, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type }
25+
26+
# @!attribute value
27+
# The value of the tag to apply to the payment
28+
#
29+
# @return [String]
30+
required :value, String
31+
32+
# @!method initialize(key:, type:, value:)
33+
# @param key [String] The key of the tag to apply to the payment
34+
#
35+
# @param type [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::Type] Tag the payment with key-value metadata
36+
#
37+
# @param value [String] The value of the tag to apply to the payment
38+
39+
# Tag the payment with key-value metadata
40+
#
41+
# @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction#type
42+
module Type
43+
extend Lithic::Internal::Type::Enum
44+
45+
TAG = :TAG
46+
47+
# @!method self.values
48+
# @return [Array<Symbol>]
49+
end
50+
end
51+
52+
class CreateCaseAction < Lithic::Internal::Type::BaseModel
53+
# @!attribute queue_token
54+
# The token of the queue to create the case in
55+
#
56+
# @return [String]
57+
required :queue_token, String
58+
59+
# @!attribute scope
60+
# The scope of the case to create
61+
#
62+
# @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope]
63+
required :scope, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope }
64+
65+
# @!attribute type
66+
# Create a case for the payment
67+
#
68+
# @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type]
69+
required :type, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type }
70+
71+
# @!method initialize(queue_token:, scope:, type:)
72+
# @param queue_token [String] The token of the queue to create the case in
73+
#
74+
# @param scope [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope] The scope of the case to create
75+
#
76+
# @param type [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type] Create a case for the payment
77+
78+
# The scope of the case to create
79+
#
80+
# @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction#scope
81+
module Scope
82+
extend Lithic::Internal::Type::Enum
83+
84+
FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT
85+
86+
# @!method self.values
87+
# @return [Array<Symbol>]
88+
end
89+
90+
# Create a case for the payment
91+
#
92+
# @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction#type
93+
module Type
94+
extend Lithic::Internal::Type::Enum
95+
96+
CREATE_CASE = :CREATE_CASE
97+
98+
# @!method self.values
99+
# @return [Array<Symbol>]
100+
end
101+
end
102+
103+
# @!method self.variants
104+
# @return [Array(Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction)]
105+
end
106+
end
107+
end
108+
end

lib/lithic/models/auth_rules/auth_rule.rb

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ class AuthRule < Lithic::Internal::Type::BaseModel
8181
# - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
8282
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
8383
# - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
84-
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
85-
# stream.
84+
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
85+
# ACH_PAYMENT_UPDATE event stream.
8686
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
87-
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
88-
# stream.
87+
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
88+
# ACH_PAYMENT_UPDATE event stream.
8989
#
9090
# @return [Symbol, Lithic::Models::AuthRules::AuthRule::Type]
9191
required :type, enum: -> { Lithic::AuthRules::AuthRule::Type }
@@ -147,7 +147,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel
147147
# @!attribute parameters
148148
# Parameters for the Auth Rule
149149
#
150-
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters]
150+
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters]
151151
required :parameters, union: -> { Lithic::AuthRules::AuthRule::CurrentVersion::Parameters }
152152

153153
response_only do
@@ -163,7 +163,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel
163163
# Some parameter documentations has been truncated, see
164164
# {Lithic::Models::AuthRules::AuthRule::CurrentVersion} for more details.
165165
#
166-
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule
166+
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule
167167
#
168168
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
169169

@@ -190,13 +190,15 @@ module Parameters
190190

191191
variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters }
192192

193+
variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters }
194+
193195
# Parameters for defining a TypeScript code rule
194196
variant -> { Lithic::AuthRules::TypescriptCodeParameters }
195197

196198
variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters }
197199

198200
# @!method self.variants
199-
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)]
201+
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)]
200202
end
201203
end
202204

@@ -212,7 +214,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel
212214
# @!attribute parameters
213215
# Parameters for the Auth Rule
214216
#
215-
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters]
217+
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters]
216218
required :parameters, union: -> { Lithic::AuthRules::AuthRule::DraftVersion::Parameters }
217219

218220
# @!attribute state
@@ -245,7 +247,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel
245247
#
246248
# @param error [String, nil] An error message if the draft version failed compilation. Populated when `state`
247249
#
248-
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule
250+
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule
249251
#
250252
# @param state [Symbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State] The state of the draft version. Most rules are created synchronously and the sta
251253
#
@@ -274,13 +276,15 @@ module Parameters
274276

275277
variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters }
276278

279+
variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters }
280+
277281
# Parameters for defining a TypeScript code rule
278282
variant -> { Lithic::AuthRules::TypescriptCodeParameters }
279283

280284
variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters }
281285

282286
# @!method self.variants
283-
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)]
287+
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)]
284288
end
285289

286290
# The state of the draft version. Most rules are created synchronously and the
@@ -330,11 +334,11 @@ module State
330334
# - `VELOCITY_LIMIT`: AUTHORIZATION event stream.
331335
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
332336
# - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
333-
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
334-
# stream.
337+
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
338+
# ACH_PAYMENT_UPDATE event stream.
335339
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
336-
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event
337-
# stream.
340+
# ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
341+
# ACH_PAYMENT_UPDATE event stream.
338342
#
339343
# @see Lithic::Models::AuthRules::AuthRule#type
340344
module Type

0 commit comments

Comments
 (0)