Skip to content

Commit 764398d

Browse files
algolia-botstevenMevansshortcuts
committed
feat(specs): abtests stopped at (generated)
algolia/api-clients-automation#5275 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Steven Evans <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 0e9466c commit 764398d

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

lib/algolia/models/abtesting-v3/ab_test.rb

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class ABTest
2020
# End date and time of the A/B test, in RFC 3339 format.
2121
attr_accessor :end_at
2222

23+
# Date and time when the A/B test was stopped, in RFC 3339 format.
24+
attr_accessor :stopped_at
25+
2326
# A/B test name.
2427
attr_accessor :name
2528

@@ -40,6 +43,7 @@ def self.attribute_map
4043
:updated_at => :updatedAt,
4144
:created_at => :createdAt,
4245
:end_at => :endAt,
46+
:stopped_at => :stoppedAt,
4347
:name => :name,
4448
:status => :status,
4549
:variants => :variants,
@@ -55,6 +59,7 @@ def self.types_mapping
5559
:updated_at => :"String",
5660
:created_at => :"String",
5761
:end_at => :"String",
62+
:stopped_at => :"String",
5863
:name => :"String",
5964
:status => :"Status",
6065
:variants => :"Array<Variant>",
@@ -66,7 +71,9 @@ def self.types_mapping
6671
# List of attributes with nullable: true
6772
def self.openapi_nullable
6873
Set.new(
69-
[]
74+
[
75+
:stopped_at
76+
]
7077
)
7178
end
7279

@@ -114,6 +121,10 @@ def initialize(attributes = {})
114121
self.end_at = nil
115122
end
116123

124+
if attributes.key?(:stopped_at)
125+
self.stopped_at = attributes[:stopped_at]
126+
end
127+
117128
if attributes.key?(:name)
118129
self.name = attributes[:name]
119130
else
@@ -152,6 +163,7 @@ def ==(other)
152163
updated_at == other.updated_at &&
153164
created_at == other.created_at &&
154165
end_at == other.end_at &&
166+
stopped_at == other.stopped_at &&
155167
name == other.name &&
156168
status == other.status &&
157169
variants == other.variants &&
@@ -168,7 +180,18 @@ def eql?(other)
168180
# Calculates hash code according to all attributes.
169181
# @return [Integer] Hash code
170182
def hash
171-
[ab_test_id, updated_at, created_at, end_at, name, status, variants, configuration, migrated_ab_test_id].hash
183+
[
184+
ab_test_id,
185+
updated_at,
186+
created_at,
187+
end_at,
188+
stopped_at,
189+
name,
190+
status,
191+
variants,
192+
configuration,
193+
migrated_ab_test_id
194+
].hash
172195
end
173196

174197
# Builds the object from hash

lib/algolia/models/abtesting/ab_test.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class ABTest
3030
# End date and time of the A/B test, in RFC 3339 format.
3131
attr_accessor :end_at
3232

33+
# Date and time when the A/B test was stopped, in RFC 3339 format.
34+
attr_accessor :stopped_at
35+
3336
# A/B test name.
3437
attr_accessor :name
3538

@@ -52,6 +55,7 @@ def self.attribute_map
5255
:updated_at => :updatedAt,
5356
:created_at => :createdAt,
5457
:end_at => :endAt,
58+
:stopped_at => :stoppedAt,
5559
:name => :name,
5660
:status => :status,
5761
:variants => :variants,
@@ -71,6 +75,7 @@ def self.types_mapping
7175
:updated_at => :"String",
7276
:created_at => :"String",
7377
:end_at => :"String",
78+
:stopped_at => :"String",
7479
:name => :"String",
7580
:status => :"Status",
7681
:variants => :"Array<Variant>",
@@ -86,7 +91,8 @@ def self.openapi_nullable
8691
:conversion_significance,
8792
:add_to_cart_significance,
8893
:purchase_significance,
89-
:revenue_significance
94+
:revenue_significance,
95+
:stopped_at
9096
]
9197
)
9298
end
@@ -157,6 +163,10 @@ def initialize(attributes = {})
157163
self.end_at = nil
158164
end
159165

166+
if attributes.key?(:stopped_at)
167+
self.stopped_at = attributes[:stopped_at]
168+
end
169+
160170
if attributes.key?(:name)
161171
self.name = attributes[:name]
162172
else
@@ -196,6 +206,7 @@ def ==(other)
196206
updated_at == other.updated_at &&
197207
created_at == other.created_at &&
198208
end_at == other.end_at &&
209+
stopped_at == other.stopped_at &&
199210
name == other.name &&
200211
status == other.status &&
201212
variants == other.variants &&
@@ -221,6 +232,7 @@ def hash
221232
updated_at,
222233
created_at,
223234
end_at,
235+
stopped_at,
224236
name,
225237
status,
226238
variants,

0 commit comments

Comments
 (0)