Skip to content

Commit df3f09b

Browse files
feat(api): add excluded_account_tokens field to auth_rules
1 parent 5b75c2f commit df3f09b

13 files changed

Lines changed: 189 additions & 11 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: 189
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6eebc524f3f5b6499a79ef544e150cc49ea1dc1e1c76a5392079ca5a83e78100.yml
3-
openapi_spec_hash: 500c46c1194a128c404e17f7a5bff676
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c5b3750e5a69b58f465c8bc61065c0ddd2fd3fec8fef2fa5703fcb10d7ba6a1c.yml
3+
openapi_spec_hash: 3a4cfae4d14318c5e3dfe8bcc751497f
44
config_hash: 7daa8d0d03697920c0c1ca18ce6d4594

lib/lithic/models/auth_rules/auth_rule.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,25 @@ class AuthRule < Lithic::Internal::Type::BaseModel
8888
# @return [Symbol, Lithic::Models::AuthRules::AuthRule::Type]
8989
required :type, enum: -> { Lithic::AuthRules::AuthRule::Type }
9090

91+
# @!attribute excluded_account_tokens
92+
# Account tokens to which the Auth Rule does not apply.
93+
#
94+
# @return [Array<String>, nil]
95+
optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]
96+
97+
# @!attribute excluded_business_account_tokens
98+
# Business account tokens to which the Auth Rule does not apply.
99+
#
100+
# @return [Array<String>, nil]
101+
optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
102+
91103
# @!attribute excluded_card_tokens
92104
# Card tokens to which the Auth Rule does not apply.
93105
#
94106
# @return [Array<String>, nil]
95107
optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
96108

97-
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
109+
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil)
98110
# Some parameter documentations has been truncated, see
99111
# {Lithic::Models::AuthRules::AuthRule} for more details.
100112
#
@@ -122,6 +134,10 @@ class AuthRule < Lithic::Internal::Type::BaseModel
122134
#
123135
# @param type [Symbol, Lithic::Models::AuthRules::AuthRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream
124136
#
137+
# @param excluded_account_tokens [Array<String>] Account tokens to which the Auth Rule does not apply.
138+
#
139+
# @param excluded_business_account_tokens [Array<String>] Business account tokens to which the Auth Rule does not apply.
140+
#
125141
# @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
126142

127143
# @see Lithic::Models::AuthRules::AuthRule#current_version

lib/lithic/models/auth_rules/v2_create_params.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,18 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel
301301
# @return [Symbol, Lithic::Models::AuthRules::EventStream, nil]
302302
optional :event_stream, enum: -> { Lithic::AuthRules::EventStream }
303303

304+
# @!attribute excluded_account_tokens
305+
# Account tokens to which the Auth Rule does not apply.
306+
#
307+
# @return [Array<String>, nil]
308+
optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]
309+
310+
# @!attribute excluded_business_account_tokens
311+
# Business account tokens to which the Auth Rule does not apply.
312+
#
313+
# @return [Array<String>, nil]
314+
optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
315+
304316
# @!attribute excluded_card_tokens
305317
# Card tokens to which the Auth Rule does not apply.
306318
#
@@ -313,7 +325,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel
313325
# @return [String, nil]
314326
optional :name, String, nil?: true
315327

316-
# @!method initialize(parameters:, program_level:, type:, event_stream: nil, excluded_card_tokens: nil, name: nil)
328+
# @!method initialize(parameters:, program_level:, type:, event_stream: nil, excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil, name: nil)
317329
# Some parameter documentations has been truncated, see
318330
# {Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule} for more
319331
# details.
@@ -326,6 +338,10 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel
326338
#
327339
# @param event_stream [Symbol, Lithic::Models::AuthRules::EventStream] The event stream during which the rule will be evaluated.
328340
#
341+
# @param excluded_account_tokens [Array<String>] Account tokens to which the Auth Rule does not apply.
342+
#
343+
# @param excluded_business_account_tokens [Array<String>] Business account tokens to which the Auth Rule does not apply.
344+
#
329345
# @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
330346
#
331347
# @param name [String, nil] Auth Rule Name

lib/lithic/models/auth_rules/v2_update_params.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ module State
143143
end
144144

145145
class ProgramLevelRule < Lithic::Internal::Type::BaseModel
146+
# @!attribute excluded_account_tokens
147+
# Account tokens to which the Auth Rule does not apply.
148+
#
149+
# @return [Array<String>, nil]
150+
optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]
151+
152+
# @!attribute excluded_business_account_tokens
153+
# Business account tokens to which the Auth Rule does not apply.
154+
#
155+
# @return [Array<String>, nil]
156+
optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]
157+
146158
# @!attribute excluded_card_tokens
147159
# Card tokens to which the Auth Rule does not apply.
148160
#
@@ -171,11 +183,15 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel
171183
# @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State, nil]
172184
optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State }
173185

174-
# @!method initialize(excluded_card_tokens: nil, name: nil, program_level: nil, state: nil)
186+
# @!method initialize(excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil, name: nil, program_level: nil, state: nil)
175187
# Some parameter documentations has been truncated, see
176188
# {Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule} for more
177189
# details.
178190
#
191+
# @param excluded_account_tokens [Array<String>] Account tokens to which the Auth Rule does not apply.
192+
#
193+
# @param excluded_business_account_tokens [Array<String>] Business account tokens to which the Auth Rule does not apply.
194+
#
179195
# @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
180196
#
181197
# @param name [String, nil] Auth Rule Name

lib/lithic/resources/auth_rules/v2.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def retrieve(auth_rule_token, params = {})
4949

5050
# Updates a V2 Auth rule's properties
5151
#
52-
# If `account_tokens`, `card_tokens`, `program_level`, or `excluded_card_tokens`
53-
# is provided, this will replace existing associations with the provided list of
54-
# entities.
52+
# If `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`,
53+
# `excluded_account_tokens`, or `excluded_business_account_tokens` is provided,
54+
# this will replace existing associations with the provided list of entities.
5555
#
5656
# @overload update(auth_rule_token, body:, request_options: {})
5757
#

rbi/lithic/models/auth_rules/auth_rule.rbi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ module Lithic
8686
sig { returns(Lithic::AuthRules::AuthRule::Type::TaggedSymbol) }
8787
attr_accessor :type
8888

89+
# Account tokens to which the Auth Rule does not apply.
90+
sig { returns(T.nilable(T::Array[String])) }
91+
attr_reader :excluded_account_tokens
92+
93+
sig { params(excluded_account_tokens: T::Array[String]).void }
94+
attr_writer :excluded_account_tokens
95+
96+
# Business account tokens to which the Auth Rule does not apply.
97+
sig { returns(T.nilable(T::Array[String])) }
98+
attr_reader :excluded_business_account_tokens
99+
100+
sig { params(excluded_business_account_tokens: T::Array[String]).void }
101+
attr_writer :excluded_business_account_tokens
102+
89103
# Card tokens to which the Auth Rule does not apply.
90104
sig { returns(T.nilable(T::Array[String])) }
91105
attr_reader :excluded_card_tokens
@@ -109,6 +123,8 @@ module Lithic
109123
program_level: T::Boolean,
110124
state: Lithic::AuthRules::AuthRule::State::OrSymbol,
111125
type: Lithic::AuthRules::AuthRule::Type::OrSymbol,
126+
excluded_account_tokens: T::Array[String],
127+
excluded_business_account_tokens: T::Array[String],
112128
excluded_card_tokens: T::Array[String]
113129
).returns(T.attached_class)
114130
end
@@ -148,6 +164,10 @@ module Lithic
148164
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
149165
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
150166
type:,
167+
# Account tokens to which the Auth Rule does not apply.
168+
excluded_account_tokens: nil,
169+
# Business account tokens to which the Auth Rule does not apply.
170+
excluded_business_account_tokens: nil,
151171
# Card tokens to which the Auth Rule does not apply.
152172
excluded_card_tokens: nil
153173
)
@@ -170,6 +190,8 @@ module Lithic
170190
program_level: T::Boolean,
171191
state: Lithic::AuthRules::AuthRule::State::TaggedSymbol,
172192
type: Lithic::AuthRules::AuthRule::Type::TaggedSymbol,
193+
excluded_account_tokens: T::Array[String],
194+
excluded_business_account_tokens: T::Array[String],
173195
excluded_card_tokens: T::Array[String]
174196
}
175197
)

rbi/lithic/models/auth_rules/v2_create_params.rbi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,22 @@ module Lithic
596596
end
597597
attr_writer :event_stream
598598

599+
# Account tokens to which the Auth Rule does not apply.
600+
sig { returns(T.nilable(T::Array[String])) }
601+
attr_reader :excluded_account_tokens
602+
603+
sig { params(excluded_account_tokens: T::Array[String]).void }
604+
attr_writer :excluded_account_tokens
605+
606+
# Business account tokens to which the Auth Rule does not apply.
607+
sig { returns(T.nilable(T::Array[String])) }
608+
attr_reader :excluded_business_account_tokens
609+
610+
sig do
611+
params(excluded_business_account_tokens: T::Array[String]).void
612+
end
613+
attr_writer :excluded_business_account_tokens
614+
599615
# Card tokens to which the Auth Rule does not apply.
600616
sig { returns(T.nilable(T::Array[String])) }
601617
attr_reader :excluded_card_tokens
@@ -624,6 +640,8 @@ module Lithic
624640
type:
625641
Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol,
626642
event_stream: Lithic::AuthRules::EventStream::OrSymbol,
643+
excluded_account_tokens: T::Array[String],
644+
excluded_business_account_tokens: T::Array[String],
627645
excluded_card_tokens: T::Array[String],
628646
name: T.nilable(String)
629647
).returns(T.attached_class)
@@ -649,6 +667,10 @@ module Lithic
649667
type:,
650668
# The event stream during which the rule will be evaluated.
651669
event_stream: nil,
670+
# Account tokens to which the Auth Rule does not apply.
671+
excluded_account_tokens: nil,
672+
# Business account tokens to which the Auth Rule does not apply.
673+
excluded_business_account_tokens: nil,
652674
# Card tokens to which the Auth Rule does not apply.
653675
excluded_card_tokens: nil,
654676
# Auth Rule Name
@@ -674,6 +696,8 @@ module Lithic
674696
type:
675697
Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol,
676698
event_stream: Lithic::AuthRules::EventStream::OrSymbol,
699+
excluded_account_tokens: T::Array[String],
700+
excluded_business_account_tokens: T::Array[String],
677701
excluded_card_tokens: T::Array[String],
678702
name: T.nilable(String)
679703
}

rbi/lithic/models/auth_rules/v2_update_params.rbi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,22 @@ module Lithic
314314
)
315315
end
316316

317+
# Account tokens to which the Auth Rule does not apply.
318+
sig { returns(T.nilable(T::Array[String])) }
319+
attr_reader :excluded_account_tokens
320+
321+
sig { params(excluded_account_tokens: T::Array[String]).void }
322+
attr_writer :excluded_account_tokens
323+
324+
# Business account tokens to which the Auth Rule does not apply.
325+
sig { returns(T.nilable(T::Array[String])) }
326+
attr_reader :excluded_business_account_tokens
327+
328+
sig do
329+
params(excluded_business_account_tokens: T::Array[String]).void
330+
end
331+
attr_writer :excluded_business_account_tokens
332+
317333
# Card tokens to which the Auth Rule does not apply.
318334
sig { returns(T.nilable(T::Array[String])) }
319335
attr_reader :excluded_card_tokens
@@ -356,6 +372,8 @@ module Lithic
356372

357373
sig do
358374
params(
375+
excluded_account_tokens: T::Array[String],
376+
excluded_business_account_tokens: T::Array[String],
359377
excluded_card_tokens: T::Array[String],
360378
name: T.nilable(String),
361379
program_level: T::Boolean,
@@ -364,6 +382,10 @@ module Lithic
364382
).returns(T.attached_class)
365383
end
366384
def self.new(
385+
# Account tokens to which the Auth Rule does not apply.
386+
excluded_account_tokens: nil,
387+
# Business account tokens to which the Auth Rule does not apply.
388+
excluded_business_account_tokens: nil,
367389
# Card tokens to which the Auth Rule does not apply.
368390
excluded_card_tokens: nil,
369391
# Auth Rule Name
@@ -382,6 +404,8 @@ module Lithic
382404
sig do
383405
override.returns(
384406
{
407+
excluded_account_tokens: T::Array[String],
408+
excluded_business_account_tokens: T::Array[String],
385409
excluded_card_tokens: T::Array[String],
386410
name: T.nilable(String),
387411
program_level: T::Boolean,

rbi/lithic/resources/auth_rules/v2.rbi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ module Lithic
3434

3535
# Updates a V2 Auth rule's properties
3636
#
37-
# If `account_tokens`, `card_tokens`, `program_level`, or `excluded_card_tokens`
38-
# is provided, this will replace existing associations with the provided list of
39-
# entities.
37+
# If `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`,
38+
# `excluded_account_tokens`, or `excluded_business_account_tokens` is provided,
39+
# this will replace existing associations with the provided list of entities.
4040
sig do
4141
params(
4242
auth_rule_token: String,

sig/lithic/models/auth_rules/auth_rule.rbs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module Lithic
1717
program_level: bool,
1818
state: Lithic::Models::AuthRules::AuthRule::state,
1919
type: Lithic::Models::AuthRules::AuthRule::type_,
20+
excluded_account_tokens: ::Array[String],
21+
excluded_business_account_tokens: ::Array[String],
2022
excluded_card_tokens: ::Array[String]
2123
}
2224

@@ -45,6 +47,16 @@ module Lithic
4547

4648
attr_accessor type: Lithic::Models::AuthRules::AuthRule::type_
4749

50+
attr_reader excluded_account_tokens: ::Array[String]?
51+
52+
def excluded_account_tokens=: (::Array[String]) -> ::Array[String]
53+
54+
attr_reader excluded_business_account_tokens: ::Array[String]?
55+
56+
def excluded_business_account_tokens=: (
57+
::Array[String]
58+
) -> ::Array[String]
59+
4860
attr_reader excluded_card_tokens: ::Array[String]?
4961

5062
def excluded_card_tokens=: (::Array[String]) -> ::Array[String]
@@ -62,6 +74,8 @@ module Lithic
6274
program_level: bool,
6375
state: Lithic::Models::AuthRules::AuthRule::state,
6476
type: Lithic::Models::AuthRules::AuthRule::type_,
77+
?excluded_account_tokens: ::Array[String],
78+
?excluded_business_account_tokens: ::Array[String],
6579
?excluded_card_tokens: ::Array[String]
6680
) -> void
6781

@@ -78,6 +92,8 @@ module Lithic
7892
program_level: bool,
7993
state: Lithic::Models::AuthRules::AuthRule::state,
8094
type: Lithic::Models::AuthRules::AuthRule::type_,
95+
excluded_account_tokens: ::Array[String],
96+
excluded_business_account_tokens: ::Array[String],
8197
excluded_card_tokens: ::Array[String]
8298
}
8399

0 commit comments

Comments
 (0)