Skip to content

Commit 7307a40

Browse files
fix(types): require start/end_, remove auth_rule_token in auth_rules v2 backtest
1 parent 13a1d1b commit 7307a40

4 files changed

Lines changed: 28 additions & 72 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: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-215dc6b4a60a59c6ab935684d1c8a8901e970a7ea9cce62b7dba51d9ec161318.yml
3-
openapi_spec_hash: 21ea7542d2222e3c825b8c337ddf4a99
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d67717d651ba08e30f82e42f4468cfb46f87470f970ae1e19a7c0dc16c275a87.yml
3+
openapi_spec_hash: 969a03848267a110e83a696547b7f2a8
44
config_hash: 2e69ca9699ec18d9d7337604821d3091

lib/lithic/models/auth_rules/v2/backtest_results.rb

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,22 @@ class Results < Lithic::Internal::Type::BaseModel
4848

4949
# @see Lithic::Models::AuthRules::V2::BacktestResults#simulation_parameters
5050
class SimulationParameters < Lithic::Internal::Type::BaseModel
51-
# @!attribute auth_rule_token
52-
# Auth Rule Token
53-
#
54-
# @return [String, nil]
55-
optional :auth_rule_token, String
56-
5751
# @!attribute end_
58-
# The end time of the simulation.
52+
# The end time of the simulation
5953
#
60-
# @return [Time, nil]
61-
optional :end_, Time, api_name: :end
54+
# @return [Time]
55+
required :end_, Time, api_name: :end
6256

6357
# @!attribute start
64-
# The start time of the simulation.
58+
# The start time of the simulation
6559
#
66-
# @return [Time, nil]
67-
optional :start, Time
60+
# @return [Time]
61+
required :start, Time
6862

69-
# @!method initialize(auth_rule_token: nil, end_: nil, start: nil)
70-
# @param auth_rule_token [String] Auth Rule Token
71-
#
72-
# @param end_ [Time] The end time of the simulation.
63+
# @!method initialize(end_:, start:)
64+
# @param end_ [Time] The end time of the simulation
7365
#
74-
# @param start [Time] The start time of the simulation.
66+
# @param start [Time] The start time of the simulation
7567
end
7668
end
7769
end

rbi/lithic/models/auth_rules/v2/backtest_results.rbi

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -134,47 +134,24 @@ module Lithic
134134
)
135135
end
136136

137-
# Auth Rule Token
138-
sig { returns(T.nilable(String)) }
139-
attr_reader :auth_rule_token
137+
# The end time of the simulation
138+
sig { returns(Time) }
139+
attr_accessor :end_
140140

141-
sig { params(auth_rule_token: String).void }
142-
attr_writer :auth_rule_token
141+
# The start time of the simulation
142+
sig { returns(Time) }
143+
attr_accessor :start
143144

144-
# The end time of the simulation.
145-
sig { returns(T.nilable(Time)) }
146-
attr_reader :end_
147-
148-
sig { params(end_: Time).void }
149-
attr_writer :end_
150-
151-
# The start time of the simulation.
152-
sig { returns(T.nilable(Time)) }
153-
attr_reader :start
154-
155-
sig { params(start: Time).void }
156-
attr_writer :start
157-
158-
sig do
159-
params(auth_rule_token: String, end_: Time, start: Time).returns(
160-
T.attached_class
161-
)
162-
end
145+
sig { params(end_: Time, start: Time).returns(T.attached_class) }
163146
def self.new(
164-
# Auth Rule Token
165-
auth_rule_token: nil,
166-
# The end time of the simulation.
167-
end_: nil,
168-
# The start time of the simulation.
169-
start: nil
147+
# The end time of the simulation
148+
end_:,
149+
# The start time of the simulation
150+
start:
170151
)
171152
end
172153

173-
sig do
174-
override.returns(
175-
{ auth_rule_token: String, end_: Time, start: Time }
176-
)
177-
end
154+
sig { override.returns({ end_: Time, start: Time }) }
178155
def to_hash
179156
end
180157
end

sig/lithic/models/auth_rules/v2/backtest_results.rbs

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,16 @@ module Lithic
5050
}
5151
end
5252

53-
type simulation_parameters =
54-
{ auth_rule_token: String, end_: Time, start: Time }
53+
type simulation_parameters = { end_: Time, start: Time }
5554

5655
class SimulationParameters < Lithic::Internal::Type::BaseModel
57-
attr_reader auth_rule_token: String?
56+
attr_accessor end_: Time
5857

59-
def auth_rule_token=: (String) -> String
58+
attr_accessor start: Time
6059

61-
attr_reader end_: Time?
60+
def initialize: (end_: Time, start: Time) -> void
6261

63-
def end_=: (Time) -> Time
64-
65-
attr_reader start: Time?
66-
67-
def start=: (Time) -> Time
68-
69-
def initialize: (
70-
?auth_rule_token: String,
71-
?end_: Time,
72-
?start: Time
73-
) -> void
74-
75-
def to_hash: -> { auth_rule_token: String, end_: Time, start: Time }
62+
def to_hash: -> { end_: Time, start: Time }
7663
end
7764
end
7865
end

0 commit comments

Comments
 (0)