Skip to content

Commit 337dfb1

Browse files
algolia-botcdhawke
andcommitted
feat(specs): abtesting winsorizedAmount (generated)
algolia/api-clients-automation#5053 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Christopher Hawke <[email protected]>
1 parent 29d9846 commit 337dfb1

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

lib/algolia/models/abtesting/currency.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ class Currency
2020
# Standard deviation for this currency.
2121
attr_accessor :standard_deviation
2222

23+
# The amount of revenue for this currency that was removed after capping purchase amounts to the 95th percentile.
24+
attr_accessor :winsorized_amount
25+
2326
# Attribute mapping from ruby-style variable name to JSON key.
2427
def self.attribute_map
2528
{
2629
:currency => :currency,
2730
:revenue => :revenue,
2831
:mean => :mean,
29-
:standard_deviation => :standardDeviation
32+
:standard_deviation => :standardDeviation,
33+
:winsorized_amount => :winsorizedAmount
3034
}
3135
end
3236

@@ -36,7 +40,8 @@ def self.types_mapping
3640
:currency => :"String",
3741
:revenue => :"Float",
3842
:mean => :"Float",
39-
:standard_deviation => :"Float"
43+
:standard_deviation => :"Float",
44+
:winsorized_amount => :"Float"
4045
}
4146
end
4247

@@ -82,6 +87,10 @@ def initialize(attributes = {})
8287
if attributes.key?(:standard_deviation)
8388
self.standard_deviation = attributes[:standard_deviation]
8489
end
90+
91+
if attributes.key?(:winsorized_amount)
92+
self.winsorized_amount = attributes[:winsorized_amount]
93+
end
8594
end
8695

8796
# Checks equality by comparing each attribute.
@@ -92,7 +101,8 @@ def ==(other)
92101
currency == other.currency &&
93102
revenue == other.revenue &&
94103
mean == other.mean &&
95-
standard_deviation == other.standard_deviation
104+
standard_deviation == other.standard_deviation &&
105+
winsorized_amount == other.winsorized_amount
96106
end
97107

98108
# @see the `==` method
@@ -104,7 +114,7 @@ def eql?(other)
104114
# Calculates hash code according to all attributes.
105115
# @return [Integer] Hash code
106116
def hash
107-
[currency, revenue, mean, standard_deviation].hash
117+
[currency, revenue, mean, standard_deviation, winsorized_amount].hash
108118
end
109119

110120
# Builds the object from hash

0 commit comments

Comments
 (0)